[pve-devel] [PATCH manager] add information about bluestore in the gui disklist

Dominik Csapak d.csapak at proxmox.com
Tue Aug 1 15:34:45 CEST 2017


this adds if an osd uses bluestore in the disklist,
and shows if a disk is used for osd journal/db/wal

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/node/Disks.js | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/www/manager6/node/Disks.js b/www/manager6/node/Disks.js
index a1a8d366..e2b24ae5 100644
--- a/www/manager6/node/Disks.js
+++ b/www/manager6/node/Disks.js
@@ -33,9 +33,33 @@ Ext.define('PVE.node.DiskList', {
 	    width: 80,
 	    sortable: false,
 	    renderer: function(v, metaData, rec) {
-		if (rec && (rec.data.osdid >= 0)) {
-		    return "osd." + rec.data.osdid.toString();
+		if (rec) {
+		    if (rec.data.osdid >= 0) {
+			var bluestore = '';
+			if (rec.data.bluestore === 1) {
+			    bluestore = ' (Bluestore)';
+			}
+			return "osd." + rec.data.osdid.toString() + bluestore;
+		    }
+
+		    var types = [];
+		    if (rec.data.journals > 0) {
+			types.push('Journal');
+		    }
+
+		    if (rec.data.db > 0) {
+			types.push('DB');
+		    }
+
+		    if (rec.data.wal > 0) {
+			types.push('WAL');
+		    }
+
+		    if (types.length > 0) {
+			return types.join(', ');
+		    }
 		}
+
 		return v || PVE.Utils.noText;
 	    },
 	    dataIndex: 'used'
-- 
2.11.0




More information about the pve-devel mailing list