[pve-devel] [PATCH manager 08/10] use better icons in the ceph osd tree view

Dominik Csapak d.csapak at proxmox.com
Mon Jul 31 11:28:40 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>
---
 www/manager6/ceph/OSD.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index a56e3070..32b0a20a 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,21 @@ 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;
+			    default:
+				 return undefined;
+			 }
+			 return iconCls;
+		     } },
 		     { type: 'number', name: 'crush_weight' }],
 	    selModel: sm,
 
-- 
2.11.0





More information about the pve-devel mailing list