From: Nizamudeen A Date: Thu, 7 Dec 2023 17:28:52 +0000 (+0530) Subject: mgr/dashboard: small fixes to directories view X-Git-Tag: v19.3.0~318^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F54835%2Fhead;p=ceph.git 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 --- 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 ce6cc71c5ea4..c4c4728bab5d 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 3334f06182d6..5228f35426e0 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 812176717a1d..55cf3b8ae75b 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 @@ -289,6 +289,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('/')); + } }); }); } @@ -314,6 +318,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 87268858be50..d21d47034f80 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 @@ -14,6 +14,13 @@ + + Directories + + + + - - Directories - - - -