From b13181749be180d3ce63b1af10561e931fdcb693 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 7 Dec 2023 22:58:52 +0530 Subject: [PATCH] mgr/dashboard: small fixes to directories view Increased the precedence for Directories Expand the node by default and select them as well Fixes: https://tracker.ceph.com/issues/63754 Signed-off-by: Nizamudeen A (cherry picked from commit 4eb42ff15db14680c0798ceb752fa6578b76fb92) --- .../cephfs-directories.component.html | 2 +- .../cephfs-directories.component.scss | 4 ++++ .../cephfs-directories.component.ts | 11 +++++++++++ .../cephfs/cephfs-tabs/cephfs-tabs.component.html | 14 +++++++------- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html index ce6cc71c5ea..c4c4728bab5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html @@ -10,7 +10,7 @@ [class.fa-spin]="loadingIndicator"> -
+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.scss index 3334f06182d..5228f35426e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.scss @@ -15,3 +15,7 @@ color: vv.$gray-900; } } + +.card-tree { + height: 50vh; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts index 841d635b1a0..387a21b6f57 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts @@ -293,6 +293,10 @@ export class CephfsDirectoriesComponent implements OnInit, OnChanges { this.updateTree(); resolve(this.getChildren(path)); this.setLoadingIndicator(path, false); + + if (path === '/' && this.treeComponent.treeModel.activeNodes?.length === 0) { + this.selectNode(this.getNode('/')); + } }); }); } @@ -318,6 +322,13 @@ export class CephfsDirectoriesComponent implements OnInit, OnChanges { if (!subTree) { this.getSubTree(dir.parent); } + + if (dir.path === '/volumes') { + const innerNode = this.treeComponent.treeModel.getNodeById('/volumes'); + if (innerNode) { + innerNode.expand(); + } + } return { name: dir.name, id: dir.path, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html index 6a50ad2e078..e0326343463 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html @@ -12,6 +12,13 @@ + + Directories + + + + Subvolumes @@ -49,13 +56,6 @@ - - Directories - - - - Performance Details -- 2.39.5