mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-09 05:41:00 +00:00
node network view: rework finding free interface ID
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
13220ad1f5
commit
bcd21f899e
@ -151,13 +151,14 @@ Ext.define('Proxmox.node.NetworkView', {
|
||||
};
|
||||
|
||||
let find_next_iface_id = function(prefix) {
|
||||
let next;
|
||||
for (next = 0; next <= 9999; next++) {
|
||||
if (!store.getById(prefix + next.toString())) {
|
||||
break;
|
||||
for (let next = 0; next <= 9999; next++) {
|
||||
let id = `${prefix}${next.toString()}`;
|
||||
if (!store.getById(id)) {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
return prefix + next.toString();
|
||||
Ext.Msg.alert('Error', `No free ID for ${prefix} found!`);
|
||||
return '';
|
||||
};
|
||||
|
||||
let menu_items = [];
|
||||
|
Loading…
Reference in New Issue
Block a user