[pve-devel] [PATCH manager v2 08/11] use better icons in the ceph osd tree view
Dominik Csapak
d.csapak at proxmox.com
Mon Jul 31 15:15:30 CEST 2017
this uses the same icons for hosts/osds as in the resource tree,
and also uses the same arrow style
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* give the root node the 'server' icon
www/manager6/ceph/OSD.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index a56e3070..d1c57988 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -487,6 +487,7 @@ Ext.define('PVE.node.CephOsdTree', {
Ext.apply(me, {
tbar: [ create_btn, reload_btn, noout_btn, '->', osd_label, start_btn, stop_btn, osd_out_btn, osd_in_btn, remove_btn ],
rootVisible: false,
+ useArrows: true,
fields: ['name', 'type', 'status', 'host', 'in', 'id' ,
{ type: 'number', name: 'reweight' },
{ type: 'number', name: 'percent_used' },
@@ -494,6 +495,24 @@ Ext.define('PVE.node.CephOsdTree', {
{ type: 'integer', name: 'total_space' },
{ type: 'integer', name: 'apply_latency_ms' },
{ type: 'integer', name: 'commit_latency_ms' },
+ { type: 'string', name: 'device_class' },
+ { type: 'string', name: 'iconCls', calculate: function(data) {
+ var iconCls = 'x-fa x-fa-tree fa-';
+ switch (data.type) {
+ case 'host':
+ iconCls += 'building';
+ break;
+ case 'osd':
+ iconCls += 'hdd-o';
+ break;
+ case 'root':
+ iconCls += 'server';
+ break;
+ default:
+ return undefined;
+ }
+ return iconCls;
+ } },
{ type: 'number', name: 'crush_weight' }],
selModel: sm,
--
2.11.0
More information about the pve-devel
mailing list