[pve-devel] [PATCH manager 2/2] ui: make Datacenter subscription info clickable when not valid

Dominik Csapak d.csapak at proxmox.com
Fri Apr 5 13:02:46 CEST 2019


to make it easier for the user to buy the subscriptions

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/dc/Summary.js | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index 6254395b..091ece76 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -66,7 +66,16 @@ Ext.define('PVE.dc.Summary', {
 	    items: [
 		{
 		    itemId: 'subscriptions',
-		    xtype: 'pveHealthWidget'
+		    xtype: 'pveHealthWidget',
+		    userCls: 'pointer',
+		    listeners: {
+			element: 'el',
+			click: function() {
+			    if (this.component.userCls === 'pointer') {
+				window.open('https://www.proxmox.com/en/proxmox-ve/pricing', '_blank');
+			    }
+			}
+		    }
 		}
 	    ]
 	}
@@ -245,18 +254,21 @@ Ext.define('PVE.dc.Summary', {
 		    iconCls: PVE.Utils.get_health_icon('critical', true),
 		    text: gettext('You have at least one node without subscription.')
 		});
+		subs.setUserCls('pointer');
 	    } else if (level !== curlevel) {
 		subs.setData({
 		    title: gettext('Mixed Subscriptions'),
 		    iconCls: PVE.Utils.get_health_icon('warning', true),
 		    text: gettext('Warning: Your subscription levels are not the same.')
 		});
+		subs.setUserCls('pointer');
 	    } else {
 		subs.setData({
 		    title: PVE.Utils.render_support_level(level),
 		    iconCls: PVE.Utils.get_health_icon('good', true),
 		    text: gettext('Your subscription status is valid.')
 		});
+		subs.setUserCls('');
 	    }
 	});
 
-- 
2.11.0





More information about the pve-devel mailing list