diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts new file mode 100644 index 000000000..ee06198d1 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-details/rbd-details.component.ts @@ -0,0 +1,31 @@ +import { Component, Input, OnChanges, TemplateRef, ViewChild } from '@angular/core'; + +import { NgbNav } from '@ng-bootstrap/ng-bootstrap'; + +import { RbdFormModel } from '../rbd-form/rbd-form.model'; + +@Component({ + selector: 'cd-rbd-details', + templateUrl: './rbd-details.component.html', + styleUrls: ['./rbd-details.component.scss'] +}) +export class RbdDetailsComponent implements OnChanges { + @Input() + selection: RbdFormModel; + @Input() + images: any; + + @ViewChild('poolConfigurationSourceTpl', { static: true }) + poolConfigurationSourceTpl: TemplateRef<any>; + + @ViewChild(NgbNav, { static: true }) + nav: NgbNav; + + rbdDashboardUrl: string; + + ngOnChanges() { + if (this.selection) { + this.rbdDashboardUrl = `rbd-details?var-Pool=${this.selection['pool_name']}&var-Image=${this.selection['name']}`; + } + } +} |