[pve-devel] [PATCH manager] gui: node disks: show if an osd is encrypted

Dominik Csapak d.csapak at proxmox.com
Mon Jul 15 15:18:19 CEST 2019


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
we could also add a new 'encrypted' column, but this would currently
only show anything for osd, in the future maybe for zfs?

 www/manager6/node/Disks.js | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/www/manager6/node/Disks.js b/www/manager6/node/Disks.js
index 555956f6..aeb079a4 100644
--- a/www/manager6/node/Disks.js
+++ b/www/manager6/node/Disks.js
@@ -38,11 +38,18 @@ Ext.define('PVE.node.DiskList', {
 	    renderer: function(v, metaData, rec) {
 		if (rec) {
 		    if (rec.data.osdid >= 0) {
-			var bluestore = '';
+			var tags = [];
+			var tagtext = "";
 			if (rec.data.bluestore === 1) {
-			    bluestore = ' (Bluestore)';
+			    tags.push('Bluestore');
 			}
-			return "Ceph osd." + rec.data.osdid.toString() + bluestore;
+			if (rec.data.osdencrypted === 1) {
+			    tags.push('Encrypted');
+			}
+			if (tags.length) {
+			    tagtext = ' (' + tags.join(', ') + ')';
+			}
+			return "Ceph osd." + rec.data.osdid.toString() + tagtext;
 		    }
 
 		    var types = [];
-- 
2.20.1





More information about the pve-devel mailing list