]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts
import ceph 14.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / nfs / nfs-list / nfs-list.component.ts
index 2a52098923e092d9c04ad6d35c5e796e3bde4af5..3b819a14b685117bd8694ed9634d80639c3e12c6 100644 (file)
@@ -7,6 +7,7 @@ import { Subscription } from 'rxjs';
 
 import { NfsService } from '../../../shared/api/nfs.service';
 import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
+import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
 import { TableComponent } from '../../../shared/datatable/table/table.component';
 import { CellTemplate } from '../../../shared/enum/cell-template.enum';
 import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum';
@@ -61,7 +62,8 @@ export class NfsListComponent implements OnInit, OnDestroy {
     private modalService: BsModalService,
     private nfsService: NfsService,
     private taskListService: TaskListService,
-    private taskWrapper: TaskWrapperService
+    private taskWrapper: TaskWrapperService,
+    public actionLabels: ActionLabelsI18n
   ) {
     this.permission = this.authStorageService.getPermissions().nfs;
     const getNfsUri = () =>
@@ -70,39 +72,44 @@ export class NfsListComponent implements OnInit, OnDestroy {
         this.selection.first().export_id
       )}`;
 
-    const addAction: CdTableAction = {
+    const createAction: CdTableAction = {
       permission: 'create',
       icon: 'fa-plus',
-      routerLink: () => '/nfs/add',
+      routerLink: () => '/nfs/create',
       canBePrimary: (selection: CdTableSelection) => !selection.hasSingleSelection,
-      name: this.i18n('Add')
+      name: this.actionLabels.CREATE
     };
 
     const editAction: CdTableAction = {
       permission: 'update',
       icon: 'fa-pencil',
       routerLink: () => `/nfs/edit/${getNfsUri()}`,
-      name: this.i18n('Edit')
+      name: this.actionLabels.EDIT
     };
 
     const deleteAction: CdTableAction = {
       permission: 'delete',
       icon: 'fa-times',
       click: () => this.deleteNfsModal(),
-      name: this.i18n('Delete')
+      name: this.actionLabels.DELETE
     };
 
-    this.tableActions = [addAction, editAction, deleteAction];
+    this.tableActions = [createAction, editAction, deleteAction];
   }
 
   ngOnInit() {
     this.columns = [
       {
-        name: this.i18n('Export'),
+        name: this.i18n('Path'),
         prop: 'path',
         flexGrow: 2,
         cellTransformation: CellTemplate.executing
       },
+      {
+        name: this.i18n('Pseudo'),
+        prop: 'pseudo',
+        flexGrow: 2
+      },
       {
         name: this.i18n('Cluster'),
         prop: 'cluster_id',
@@ -134,7 +141,7 @@ export class NfsListComponent implements OnInit, OnDestroy {
           .value();
 
         this.isDefaultCluster = clusters.length === 1 && clusters[0] === '_default_';
-        this.columns[1].isHidden = this.isDefaultCluster;
+        this.columns[2].isHidden = this.isDefaultCluster;
         if (this.table) {
           this.table.updateColumns();
         }
@@ -198,7 +205,8 @@ export class NfsListComponent implements OnInit, OnDestroy {
 
     this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
       initialState: {
-        itemDescription: this.i18n('NFS'),
+        itemDescription: this.i18n('NFS export'),
+        itemNames: [`${cluster_id}:${export_id}`],
         submitActionObservable: () =>
           this.taskWrapper.wrapTaskAroundCall({
             task: new FinishedTask('nfs/delete', {