]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Display check icon instead of true|false in various datatables 35892/head
authorVolker Theile <vtheile@suse.com>
Thu, 25 Jun 2020 15:03:51 +0000 (17:03 +0200)
committerLaura Paduano <lpaduano@suse.com>
Thu, 2 Jul 2020 10:44:58 +0000 (12:44 +0200)
- Convert the boolean values true|false to a check icon in datatable columns.
- Remove unused code in the user management list.

Fixes: https://tracker.ceph.com/issues/46209
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 277b3f636e6c65291bed037c1b9c69563e28de35)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts

index 79744611fd7d8430e39813a5c9dbed9d226c7091..4fefc23f2bbdca322dccf2d5d0bbe4f19c6e1b8e 100644 (file)
@@ -116,7 +116,9 @@ export class InventoryDevicesComponent implements OnInit, OnDestroy {
       {
         name: this.i18n('Available'),
         prop: 'available',
-        flexGrow: 1
+        flexGrow: 1,
+        cellClass: 'text-center',
+        cellTransformation: CellTemplate.checkIcon
       },
       {
         name: this.i18n('Vendor'),
index 757d4f9da41b8f7b9bb992280b9ab3ef1830e724..ddb14cca189dcc725183f567197348b91fc60822 100644 (file)
@@ -72,7 +72,9 @@ export class ServicesComponent extends ListWithDetails implements OnChanges, OnI
       {
         name: this.i18n('Running'),
         prop: 'status.running',
-        flexGrow: 1
+        flexGrow: 1,
+        cellClass: 'text-center',
+        cellTransformation: CellTemplate.checkIcon
       },
       {
         name: this.i18n('Size'),
index 7ba6a5ade50268aea8289cabe83e5ce4b272c75e..89ed21be83313028405b17d53ad2700805195132 100644 (file)
@@ -20,8 +20,3 @@
     {{ role }}{{ !isLast ? ", " : "" }}
   </span>
 </ng-template>
-
-<ng-template #userEnabledTpl
-             let-value="value">
-  <span>{{ value | booleanText }}</span>
-</ng-template>
index c9f4a0c8ec4646360f4560509d033b6eef6c9f66..82b15d9dbbe8f7539985474e702e26c3393b6dfe 100644 (file)
@@ -30,8 +30,6 @@ const BASE_URL = 'user-management/users';
 export class UserListComponent implements OnInit {
   @ViewChild('userRolesTpl', { static: true })
   userRolesTpl: TemplateRef<any>;
-  @ViewChild('userEnabledTpl', { static: true })
-  userEnabledTpl: TemplateRef<any>;
 
   permission: Permission;
   tableActions: CdTableAction[];