]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts
0463230ac01e0e3334adcf7a0871574755c8cf04
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / rbd-details / rbd-details.component.ts
1 import { Component, Input, OnChanges, TemplateRef, ViewChild } from '@angular/core';
2
3 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
4 import { RbdFormModel } from '../rbd-form/rbd-form.model';
5
6 @Component({
7 selector: 'cd-rbd-details',
8 templateUrl: './rbd-details.component.html',
9 styleUrls: ['./rbd-details.component.scss']
10 })
11 export class RbdDetailsComponent implements OnChanges {
12 @Input()
13 selection: CdTableSelection;
14 selectedItem: RbdFormModel;
15 @Input()
16 images: any;
17 @ViewChild('poolConfigurationSourceTpl', { static: true })
18 poolConfigurationSourceTpl: TemplateRef<any>;
19
20 constructor() {}
21
22 ngOnChanges() {
23 if (this.selection.hasSelection) {
24 this.selectedItem = this.selection.first();
25 }
26 }
27 }