]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
a79b01d6704dd0216754d8c49e676802316f7f52
[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
16   ngOnChanges() {
17     if (this.selection) {
18       this.selectedItem = this.selection;
19       this.data = {};
20       this.data[$localize`Serial Number`] = this.selectedItem.serial_number;
21       this.data[$localize`Model Number`] = this.selectedItem.model_number;
22       this.data[$localize`Minimum Controller Identifier`] = this.selectedItem.min_cntlid;
23       this.data[$localize`Maximum Controller Identifier`] = this.selectedItem.max_cntlid;
24       this.data[$localize`Subsystem Type`] = this.selectedItem.subtype;
25     }
26   }
27 }