mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-02 20:53:50 +00:00
ui: window/Migrate: avoid triggering another info request if already in-progress
use the node as key, so that a target switch would still trigger a new one - else there's a slight chance that a user could get the check out-of-sync (from another node). Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d8d4c14b73
commit
685b52f58c
@ -98,7 +98,6 @@ Ext.define('PVE.window.Migrate', {
|
|||||||
me.lookup('proxmoxHelpButton').setHelpConfig({
|
me.lookup('proxmoxHelpButton').setHelpConfig({
|
||||||
onlineHelp: vm.get(view.vmtype).onlineHelp,
|
onlineHelp: vm.get(view.vmtype).onlineHelp,
|
||||||
});
|
});
|
||||||
me.checkMigratePreconditions();
|
|
||||||
me.lookup('formPanel').isValid();
|
me.lookup('formPanel').isValid();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -190,11 +189,16 @@ Ext.define('PVE.window.Migrate', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (me.fetchingNodeMigrateInfo && me.fetchingNodeMigrateInfo === vm.get('nodename')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
me.fetchingNodeMigrateInfo = vm.get('nodename');
|
||||||
let { result } = await Proxmox.Async.api2({
|
let { result } = await Proxmox.Async.api2({
|
||||||
url: `/nodes/${vm.get('nodename')}/${vm.get('vmtype')}/${vm.get('vmid')}/migrate`,
|
url: `/nodes/${vm.get('nodename')}/${vm.get('vmtype')}/${vm.get('vmid')}/migrate`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
migrateStats = result.data;
|
migrateStats = result.data;
|
||||||
|
me.fetchingNodeMigrateInfo = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Ext.Msg.alert(gettext('Error'), error.htmlStatus);
|
Ext.Msg.alert(gettext('Error'), error.htmlStatus);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user