]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
5e8abf9a4852f1475e1aa76e60def2f87d4cd686
[ceph.git] /
1 import { Component, Input, OnChanges } from '@angular/core';
2 import { NvmeofSubsystem } from '~/app/shared/models/nvmeof';
3
4 @Component({
5   selector: 'cd-nvmeof-subsystems-details',
6   templateUrl: './nvmeof-subsystems-details.component.html',
7   styleUrls: ['./nvmeof-subsystems-details.component.scss']
8 })
9 export class NvmeofSubsystemsDetailsComponent implements OnChanges {
10   @Input()
11   selection: NvmeofSubsystem;
12
13   selectedItem: any;
14   data: any;
15   subsystemNQN: string;
16
17   ngOnChanges() {
18     if (this.selection) {
19       this.selectedItem = this.selection;
20       this.subsystemNQN = this.selectedItem.nqn;
21       this.data = {};
22       this.data[$localize`Serial Number`] = this.selectedItem.serial_number;
23       this.data[$localize`Model Number`] = this.selectedItem.model_number;
24       this.data[$localize`Minimum Controller Identifier`] = this.selectedItem.min_cntlid;
25       this.data[$localize`Maximum Controller Identifier`] = this.selectedItem.max_cntlid;
26       this.data[$localize`Subsystem Type`] = this.selectedItem.subtype;
27     }
28   }
29 }