mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 13:36:37 +00:00
ui: ha/Group Edit: use simple map+join to serialize nodes-prio
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1bcc556fe7
commit
ad9091d0d1
@ -123,19 +123,9 @@ Ext.define('PVE.ha.GroupInputPanel', {
|
||||
};
|
||||
|
||||
update_nodefield = function(selected) {
|
||||
var nodes = '';
|
||||
var first_iteration = true;
|
||||
Ext.Array.each(selected, function(record) {
|
||||
if (!first_iteration) {
|
||||
nodes += ',';
|
||||
}
|
||||
first_iteration = false;
|
||||
|
||||
nodes += record.data.node;
|
||||
if (record.data.priority) {
|
||||
nodes += ':' + record.data.priority;
|
||||
}
|
||||
});
|
||||
let nodes = selected
|
||||
.map(({ data }) => data.node + (data.priority ? `:${data.priority}` : ''))
|
||||
.join(',');
|
||||
|
||||
// nodefield change listener calls us again, which results in a
|
||||
// endless recursion, suspend the event temporary to avoid this
|
||||
|
Loading…
Reference in New Issue
Block a user