File

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

Implements

OnChanges

Metadata

selector cd-mgr-module-details
styleUrls ./mgr-module-details.component.scss
templateUrl ./mgr-module-details.component.html

Index

Properties
Methods
Inputs

Constructor

constructor(mgrModuleService: MgrModuleService)
Parameters :
Name Type Optional
mgrModuleService MgrModuleService No

Inputs

selection
Type : CdTableSelection

Methods

ngOnChanges
ngOnChanges()
Returns : void

Properties

module_config
Type : any
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',
  templateUrl: './mgr-module-details.component.html',
  styleUrls: ['./mgr-module-details.component.scss']
})
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;
      });
    }
  }
}
<tabset *ngIf="selection.hasSingleSelection">
  <tab i18n-heading heading="Details">
    <cd-table-key-value [data]="module_config">
    </cd-table-key-value>
  </tab>
</tabset>

./mgr-module-details.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""