]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: small fixes to directories view 54835/head
authorNizamudeen A <nia@redhat.com>
Thu, 7 Dec 2023 17:28:52 +0000 (22:58 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 19 Dec 2023 08:51:02 +0000 (14:21 +0530)
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 <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.html

index ce6cc71c5ea498518bd8f6a7feb02ba3afb815e9..c4c4728bab5da21a5423c00c61180172ef8de226 100644 (file)
@@ -10,7 +10,7 @@
              [class.fa-spin]="loadingIndicator"></i>
         </button>
       </div>
-      <div class="card-body">
+      <div class="card-body card-tree">
         <tree-root *ngIf="nodes"
                    [nodes]="nodes"
                    [options]="treeOptions">
index 812176717a1dd9a7f2efcda0657304bd05df0b84..55cf3b8ae75b8b9ff7d5480604fb81a5575bedae 100644 (file)
@@ -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,
index 87268858be503938183b8e7e4fac53de183d66a0..d21d47034f802e6433d77bcb1776e560fff59001 100644 (file)
         <cd-cephfs-detail [data]="details"> </cd-cephfs-detail>
       </ng-template>
     </ng-container>
+    <ng-container ngbNavItem="directories">
+      <a ngbNavLink
+         i18n>Directories</a>
+      <ng-template ngbNavContent>
+        <cd-cephfs-directories [id]="id"></cd-cephfs-directories>
+      </ng-template>
+    </ng-container>
     <ng-container ngbNavItem="subvolumes">
       <a
       ngbNavLink
         </cd-cephfs-clients>
       </ng-template>
     </ng-container>
-    <ng-container ngbNavItem="directories">
-      <a
-      ngbNavLink
-      i18n>Directories</a>
-      <ng-template ngbNavContent>
-        <cd-cephfs-directories [id]="id"></cd-cephfs-directories>
-      </ng-template>
-    </ng-container>
     <ng-container ngbNavItem="performance-details">
       <a
       ngbNavLink