[pve-devel] [PATCH manager v2] add summary to the ceph warning window

Dominik Csapak d.csapak at proxmox.com
Mon Aug 14 10:15:07 CEST 2017


and format it better

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* htmlEncode the summary and detail fields, so that <text> does not
  get interpreted as html

left it as <pre> since nobody complained, and this is in line with the log
window

 www/manager6/ceph/Status.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index 132c5e0a..4d0d6176 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -90,7 +90,10 @@ Ext.define('PVE.node.CephStatus', {
 						scrollable: true,
 						padding: '10',
 						xtype: 'box',
-						html: record.data.detail
+						html: [
+						    '<span>' + Ext.htmlEncode(record.data.summary) + '</span>',
+						    '<pre>'+ Ext.htmlEncode(record.data.detail) + '</pre>'
+						]
 					    }]
 					});
 					win.show();
@@ -179,7 +182,7 @@ Ext.define('PVE.node.CephStatus', {
 	    result.push({
 		id: key,
 		summary: checks[key].message,
-		detail: details.join("<br>\n"),
+		detail: details.join("\n"),
 		severity: checks[key].severity
 	    });
 	});
-- 
2.11.0




More information about the pve-devel mailing list