# All files / src/app/ceph/cluster/mgr-modules/mgr-module-details mgr-module-details.component.ts

78.57% Statements 11/14
66.67% Branches 4/6
66.67% Functions 2/3
72.73% Lines 8/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    286x

    6x
    6x

    6x

    6x

    8x

    6x

    6x
     import { Component, Input, OnChanges } from '@angular/core';

    import { MgrModuleService } from '../../../../shared/api/mgr-module.service';
    import { CdTableSelection } from '../../../../shared/models/cd-table-selection';

    @Component({
      selector: 'cd-mgr-module-details',
      template: require('./mgr-module-details.component.html'),
      styles: []
    })
    export class MgrModuleDetailsComponent implements OnChanges {
      module_config: any;

      @Input()
      selection: CdTableSelection;

      constructor(private mgrModuleService: MgrModuleService) {}

      ngOnChanges() {
        if (this.selection.hasSelection) {
          const selectedItem = this.selection.first();
          this.mgrModuleService.getConfig(selectedItem.name).subscribe((resp: any) => {
            this.module_config = resp;
          });
        }
      }
    }