mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 19:09:52 +00:00
NetworkView: conditionally view pending changes
This commit is contained in:
parent
ab29b73d6b
commit
89f5745205
@ -45,6 +45,7 @@ Ext.define('Proxmox.node.NetworkView', {
|
|||||||
failure: function(response, opts) {
|
failure: function(response, opts) {
|
||||||
changeitem.update(gettext('Error') + ': ' + response.htmlStatus);
|
changeitem.update(gettext('Error') + ': ' + response.htmlStatus);
|
||||||
store.loadData({});
|
store.loadData({});
|
||||||
|
changeitem.setHidden(true);
|
||||||
},
|
},
|
||||||
success: function(response, opts) {
|
success: function(response, opts) {
|
||||||
var result = Ext.decode(response.responseText);
|
var result = Ext.decode(response.responseText);
|
||||||
@ -52,8 +53,11 @@ Ext.define('Proxmox.node.NetworkView', {
|
|||||||
var changes = result.changes;
|
var changes = result.changes;
|
||||||
if (changes === undefined || changes === '') {
|
if (changes === undefined || changes === '') {
|
||||||
changes = gettext("No changes");
|
changes = gettext("No changes");
|
||||||
}
|
changeitem.setHidden(true);
|
||||||
|
} else {
|
||||||
changeitem.update("<pre>" + Ext.htmlEncode(changes) + "</pre>");
|
changeitem.update("<pre>" + Ext.htmlEncode(changes) + "</pre>");
|
||||||
|
changeitem.setHidden(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -326,6 +330,7 @@ Ext.define('Proxmox.node.NetworkView', {
|
|||||||
border: false,
|
border: false,
|
||||||
region: 'south',
|
region: 'south',
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
|
hidden: true,
|
||||||
itemId: 'changes',
|
itemId: 'changes',
|
||||||
tbar: [
|
tbar: [
|
||||||
gettext('Pending changes') + ' (' +
|
gettext('Pending changes') + ' (' +
|
||||||
|
Loading…
Reference in New Issue
Block a user