]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / datatable / table / table.component.ts
index 3fc62a9d673857f68f506f1ee5635a279ddafbbc..6e39f4bff138eabe8172f34be07f33192474ab50 100644 (file)
@@ -37,6 +37,7 @@ import { CdTableSelection } from '~/app/shared/models/cd-table-selection';
 import { CdUserConfig } from '~/app/shared/models/cd-user-config';
 import { TimerService } from '~/app/shared/services/timer.service';
 
+const TABLE_LIST_LIMIT = 10;
 @Component({
   selector: 'cd-table',
   templateUrl: './table.component.html',
@@ -72,6 +73,8 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
   rowDetailsTpl: TemplateRef<any>;
   @ViewChild('rowSelectionTpl', { static: true })
   rowSelectionTpl: TemplateRef<any>;
+  @ViewChild('pathTpl', { static: true })
+  pathTpl: TemplateRef<any>;
 
   // This is the array with the items to be shown.
   @Input()
@@ -102,7 +105,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
   footer? = true;
   // Page size to show. Set to 0 to show unlimited number of rows.
   @Input()
-  limit? = 10;
+  limit? = TABLE_LIST_LIMIT;
   @Input()
   maxLimit? = 9999;
   // Has the row details?
@@ -341,7 +344,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
       this._loadUserConfig();
       this._initUserConfigAutoSave();
     }
-    if (!this.userConfig.limit) {
+    if (this.limit !== TABLE_LIST_LIMIT || !this.userConfig.limit) {
       this.userConfig.limit = this.limit;
     }
     if (!(this.userConfig.offset >= 0)) {
@@ -608,6 +611,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     this.cellTemplates.map = this.mapTpl;
     this.cellTemplates.truncate = this.truncateTpl;
     this.cellTemplates.timeAgo = this.timeAgoTpl;
+    this.cellTemplates.path = this.pathTpl;
   }
 
   useCustomClass(value: any): string {