From 42cc172ce6e2ddb01041f7a39636a6bcff2f54d3 Mon Sep 17 00:00:00 2001 From: cloudbehl Date: Wed, 9 Aug 2023 12:42:14 +0530 Subject: [PATCH] mgr/dashboard: minor usability improvements Fixes: https://tracker.ceph.com/issues/62365 Signed-off-by: cloudbehl (cherry picked from commit c49435e88992c90145553556811464872b5bf786) --- .../cephfs/cephfs-form/cephfs-form.component.ts | 2 +- .../cephfs/cephfs-list/cephfs-list.component.ts | 13 +++++++------ .../dashboard/dashboard-v3.component.html | 2 +- .../rgw-overview-dashboard.component.html | 2 +- src/pybind/mgr/dashboard/services/cluster.py | 4 +--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts index 4bf722df5115d..8df74f149d0f7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts @@ -63,7 +63,7 @@ export class CephfsVolumeFormComponent extends CdForm implements OnInit { super(); this.editing = this.router.url.startsWith(`/pool/${URLVerbs.EDIT}`); this.action = this.editing ? this.actionLabels.EDIT : this.actionLabels.CREATE; - this.resource = $localize`volume`; + this.resource = $localize`File System`; this.hosts = { options: [], messages: new SelectMessages({ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts index b0f61fc6d516f..88bc34813924c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts @@ -66,16 +66,17 @@ export class CephfsListComponent extends ListWithDetails implements OnInit { flexGrow: 2 }, { - name: $localize`Created`, - prop: 'mdsmap.created', + name: $localize`Enabled`, + prop: 'mdsmap.enabled', flexGrow: 2, - pipe: this.cdDatePipe + cellTransformation: CellTemplate.checkIcon }, { - name: $localize`Enabled`, - prop: 'mdsmap.enabled', + name: $localize`Created`, + prop: 'mdsmap.created', flexGrow: 1, - cellTransformation: CellTemplate.checkIcon + pipe: this.cdDatePipe, + cellTransformation: CellTemplate.timeAgo } ]; this.tableActions = [ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html index b3baaf1117f16..bac58e15e0b28 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard/dashboard-v3.component.html @@ -7,7 +7,7 @@ [ngClass]="{'d-flex': flexHeight}" aria-label="Details card">
-
FSID
+
Cluster ID
{{ detailsCardData.fsid }}
Orchestrator
{{ detailsCardData.orchestrator || 'Orchestrator is not available' }}
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html index 359e9dd9b853c..e4bc1293feef3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-overview-dashboard/rgw-overview-dashboard.component.html @@ -8,7 +8,7 @@
  • diff --git a/src/pybind/mgr/dashboard/services/cluster.py b/src/pybind/mgr/dashboard/services/cluster.py index 70619e8b8b90f..f5df9bc0d9f41 100644 --- a/src/pybind/mgr/dashboard/services/cluster.py +++ b/src/pybind/mgr/dashboard/services/cluster.py @@ -47,7 +47,6 @@ class ClusterModel: @classmethod def get_capacity(cls) -> ClusterCapacity: df = mgr.get('df') - total_objects = 0 total_pool_bytes_used = 0 average_object_size = 0 total_data_pool_objects = 0 @@ -59,7 +58,6 @@ class ClusterModel: if pool_name in rgw_pools_data: objects = pool['stats']['objects'] pool_bytes_used = pool['stats']['bytes_used'] - total_objects += objects total_pool_bytes_used += pool_bytes_used if pool_name.endswith('.data'): total_data_pool_objects += objects @@ -72,7 +70,7 @@ class ClusterModel: total_avail_bytes=df['stats']['total_avail_bytes'], total_bytes=df['stats']['total_bytes'], total_used_raw_bytes=df['stats']['total_used_raw_bytes'], - total_objects=total_objects, + total_objects=total_data_pool_objects, total_pool_bytes_used=total_pool_bytes_used, average_object_size=average_object_size )._asdict() -- 2.39.5