From: Aashish Sharma Date: Thu, 3 Apr 2025 06:26:19 +0000 (+0530) Subject: mgr/dashboard: add nvmeof performance and overview grafana dashboards to Block -... X-Git-Tag: v20.3.0~153^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=258a455dd6983350bce891fb8a30e4e851d8a6e5;p=ceph.git mgr/dashboard: add nvmeof performance and overview grafana dashboards to Block -> Nvme/TCP tab in dashboard Fixes: https://tracker.ceph.com/issues/70793 Signed-off-by: Aashish Sharma --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts index 2f1a5768d9440..ba930c549865c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts @@ -63,7 +63,8 @@ import { RadioModule, SelectModule, UIShellModule, - TreeviewModule + TreeviewModule, + TabsModule } from 'carbon-components-angular'; // Icons @@ -97,7 +98,8 @@ import Reset from '@carbon/icons/es/reset/32'; NumberModule, ModalModule, DatePickerModule, - ComboBoxModule + ComboBoxModule, + TabsModule ], declarations: [ RbdListComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.html index 556033e89e547..5e3c6b2af107f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.html @@ -15,18 +15,6 @@ - - Gateways - - Ceph NVMe-oF gateways provide Ceph Block Device storage through NVMe/TCP. For VMware clients the NVMe/TCP volumes display as VMFS Datastores. For Linux clients the NVMe/TCP volumes display as as block devices. - -
- - -
- + + + + + + + + + + + + + Gateways + + Ceph NVMe-oF gateways provide Ceph Block Device storage through NVMe/TCP. For VMware clients the NVMe/TCP volumes display as VMFS Datastores. For Linux clients the NVMe/TCP volumes display as as block devices. + + +
+ + +
+
+ + + + + + + + + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.ts index 468fc2c4026ca..5364d7ea342bf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-gateway/nvmeof-gateway.component.ts @@ -23,12 +23,28 @@ type Gateway = { status_desc: string; }; +enum TABS { + 'gateways', + 'overview' +} + @Component({ selector: 'cd-nvmeof-gateway', templateUrl: './nvmeof-gateway.component.html', styleUrls: ['./nvmeof-gateway.component.scss'] }) export class NvmeofGatewayComponent implements OnInit { + selectedTab: TABS; + selectedGatewayGroup: string = null; + + onSelected(tab: TABS) { + this.selectedTab = tab; + } + + public get Tabs(): typeof TABS { + return TABS; + } + @ViewChild('statusTpl', { static: true }) statusTpl: TemplateRef; @@ -96,6 +112,7 @@ export class NvmeofGatewayComponent implements OnInit { onGroupSelection(selected: ComboBoxItem) { selected.selected = true; this.groupService = selected.serviceName; + this.selectedGatewayGroup = selected.content; this.getGateways(); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.html index 58a1e01a52510..65f8efea79397 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.html @@ -38,6 +38,20 @@ + + Performance Details + + + + +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts index 80cdf927b9a7b..90817e13f9ead 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.spec.ts @@ -3,7 +3,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; - +import { Permissions } from '~/app/shared/models/permissions'; import { SharedModule } from '~/app/shared/shared.module'; import { NvmeofSubsystemsDetailsComponent } from './nvmeof-subsystems-details.component'; @@ -29,6 +29,9 @@ describe('NvmeofSubsystemsDetailsComponent', () => { namespace_count: 1, max_namespaces: 256 }; + component.permissions = new Permissions({ + grafana: ['read'] + }); component.ngOnChanges(); fixture.detectChanges(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.ts index cc561266677ca..106a0d5042e1d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-details/nvmeof-subsystems-details.component.ts @@ -1,5 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; import { NvmeofSubsystem } from '~/app/shared/models/nvmeof'; +import { Permissions } from '~/app/shared/models/permissions'; @Component({ selector: 'cd-nvmeof-subsystems-details', @@ -10,7 +11,9 @@ export class NvmeofSubsystemsDetailsComponent implements OnChanges { @Input() selection: NvmeofSubsystem; @Input() - group: NvmeofSubsystem; + group: string; + @Input() + permissions: Permissions; selectedItem: any; data: any; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.html index 5fe69509715f1..38456d06d03d8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.html @@ -31,7 +31,7 @@ (updateSelection)="updateSelection($event)">
- @@ -40,6 +40,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.ts index 7d712ba2d5cd7..b1f28d9cb6faf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems/nvmeof-subsystems.component.ts @@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { ActionLabelsI18n, URLVerbs } from '~/app/shared/constants/app.constants'; import { CdTableSelection } from '~/app/shared/models/cd-table-selection'; import { NvmeofSubsystem } from '~/app/shared/models/nvmeof'; -import { Permission } from '~/app/shared/models/permissions'; +import { Permissions } from '~/app/shared/models/permissions'; import { AuthStorageService } from '~/app/shared/services/auth-storage.service'; import { ListWithDetails } from '~/app/shared/classes/list-with-details.class'; import { CdTableAction } from '~/app/shared/models/cd-table-action'; @@ -31,7 +31,7 @@ const BASE_URL = 'block/nvmeof/subsystems'; export class NvmeofSubsystemsComponent extends ListWithDetails implements OnInit { subsystems: NvmeofSubsystem[] = []; subsystemsColumns: any; - permission: Permission; + permissions: Permissions; selection = new CdTableSelection(); tableActions: CdTableAction[]; subsystemDetails: any[]; @@ -48,7 +48,7 @@ export class NvmeofSubsystemsComponent extends ListWithDetails implements OnInit private route: ActivatedRoute ) { super(); - this.permission = this.authStorageService.getPermissions().nvmeof; + this.permissions = this.authStorageService.getPermissions(); } ngOnInit() {