From 89f57452059886c56698091a1fe9749338237c92 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 7 Mar 2017 17:29:12 +0100 Subject: [PATCH] NetworkView: conditionally view pending changes --- node/NetworkView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/node/NetworkView.js b/node/NetworkView.js index b80cefe..ad0ce36 100644 --- a/node/NetworkView.js +++ b/node/NetworkView.js @@ -45,6 +45,7 @@ Ext.define('Proxmox.node.NetworkView', { failure: function(response, opts) { changeitem.update(gettext('Error') + ': ' + response.htmlStatus); store.loadData({}); + changeitem.setHidden(true); }, success: function(response, opts) { var result = Ext.decode(response.responseText); @@ -52,8 +53,11 @@ Ext.define('Proxmox.node.NetworkView', { var changes = result.changes; if (changes === undefined || changes === '') { changes = gettext("No changes"); + changeitem.setHidden(true); + } else { + changeitem.update("
" + Ext.htmlEncode(changes) + "
"); + changeitem.setHidden(false); } - changeitem.update("
" + Ext.htmlEncode(changes) + "
"); } }); }; @@ -326,6 +330,7 @@ Ext.define('Proxmox.node.NetworkView', { border: false, region: 'south', autoScroll: true, + hidden: true, itemId: 'changes', tbar: [ gettext('Pending changes') + ' (' +