ui: trigger datastore update after maintenance mode edit
This provides immediate feedback for adding the respective icon in
the navigation tree entry most of the time, and we can then increase
the query period of the datastore list store to the original 15
again, as it was lowered to 5 seconds for just this reason in commit
fbd6f54f39
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
9f4d9abbf6
commit
2e63a46414
|
@ -155,7 +155,7 @@ Ext.define('PBS.view.main.NavigationTree', {
|
||||||
init: function(view) {
|
init: function(view) {
|
||||||
view.rstore = Ext.create('Proxmox.data.UpdateStore', {
|
view.rstore = Ext.create('Proxmox.data.UpdateStore', {
|
||||||
autoStart: true,
|
autoStart: true,
|
||||||
interval: 5 * 1000,
|
interval: 15 * 1000,
|
||||||
storeId: 'pbs-datastore-list', // NOTE: this is queried by selectors, avoid change!
|
storeId: 'pbs-datastore-list', // NOTE: this is queried by selectors, avoid change!
|
||||||
model: 'pbs-datastore-list',
|
model: 'pbs-datastore-list',
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,6 +21,16 @@ Ext.define('PBS.window.MaintenanceOptions', {
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
apiCallDone: function(success, response, options) {
|
||||||
|
if (success) {
|
||||||
|
let datastoreStore = Ext.data.StoreManager.lookup('pbs-datastore-list');
|
||||||
|
if (datastoreStore) {
|
||||||
|
// delay a bit to allow the window to close and maintenance mode to take effect
|
||||||
|
setTimeout(() => datastoreStore.load(), 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
items: {
|
items: {
|
||||||
xtype: 'inputpanel',
|
xtype: 'inputpanel',
|
||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
|
|
Loading…
Reference in New Issue