[pve-devel] [PATCH manager 5/5] show in/out/up/down icons in osd overview

Dominik Csapak d.csapak at proxmox.com
Tue Nov 29 15:53:53 CET 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/ceph/OSD.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index 25c4f12..d53d46d 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -188,8 +188,17 @@ Ext.define('PVE.node.CephOsdTree', {
 		if (!value) {
 		    return value;
 		}
-		var data = rec.data;
-		return value + '/' + (data['in'] ? 'in' : 'out');
+		var inout = rec.data['in'] ? 'in' : 'out';
+		var updownicon = value === 'up' ? 'good fa-arrow-circle-up' :
+						  'critical fa-arrow-circle-down';
+
+		var inouticon = rec.data['in'] ? 'good fa-circle' :
+						 'warning fa-circle-o';
+
+		var text = value + ' <i class="fa ' + updownicon + '"></i> / ' +
+			   inout + ' <i class="fa ' + inouticon + '"></i>';
+
+		return text;
 	    },
 	    width: 80
 	},
-- 
2.1.4





More information about the pve-devel mailing list