[pve-devel] [PATCH pve-manager 2/2] sdn: enable SDN menu if /cluster/sdn api exist
Alexandre Derumier
aderumier at odiso.com
Tue Feb 18 08:19:58 CET 2020
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
www/manager6/Workspace.js | 8 ++++++++
www/manager6/dc/Config.js | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 1cc86999..8b5d5cff 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -161,6 +161,14 @@ Ext.define('PVE.StdWorkspace', {
me.updateVersionInfo();
}
});
+
+ Proxmox.Utils.API2Request({
+ url: '/cluster/sdn',
+ method: 'GET',
+ success: function(response) {
+ PVE.SDNInfo = response.result.data;
+ }
+ });
}
},
diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js
index bbc4f5c7..65ba3993 100644
--- a/www/manager6/dc/Config.js
+++ b/www/manager6/dc/Config.js
@@ -56,7 +56,7 @@ Ext.define('PVE.dc.Config', {
});
}
- if (caps.dc['Sys.Audit']) {
+ if (caps.dc['Sys.Audit'] && PVE.SDNInfo) {
me.items.push({
xtype: 'pveSDNStatus',
@@ -73,6 +73,7 @@ Ext.define('PVE.dc.Config', {
iconCls: 'fa fa-database',
itemId: 'sdncontroller'
});
+
me.items.push({
xtype: 'pveSDNZoneView',
groups: ['sdn'],
--
2.20.1
More information about the pve-devel
mailing list