Updates get nodes
parent
c9126a710e
commit
a7d481e5a0
|
@ -51,7 +51,6 @@ settings:
|
||||||
- caption: Backup storage
|
- caption: Backup storage
|
||||||
type: list
|
type: list
|
||||||
tooltip: "The environment with backup storage to be used for backups creation. Presence of this environment is obligatory."
|
tooltip: "The environment with backup storage to be used for backups creation. Presence of this environment is obligatory."
|
||||||
value: {nodes.(group)[(i)].(storage)}
|
|
||||||
name: storageName
|
name: storageName
|
||||||
dependsOn: region
|
dependsOn: region
|
||||||
required: true
|
required: true
|
||||||
|
|
|
@ -6,15 +6,21 @@ for (var i = 0, envInfo, env; envInfo = resp.infos[i]; i++) {
|
||||||
env = envInfo.env;
|
env = envInfo.env;
|
||||||
if (env.status == 1) {
|
if (env.status == 1) {
|
||||||
for (var j = 0, node; node = envInfo.nodes[j]; j++) {
|
for (var j = 0, node; node = envInfo.nodes[j]; j++) {
|
||||||
if (node.nodeGroup == "storage") {
|
if (node.nodeGroup === "storage") {
|
||||||
nodes[env.envName] = nodes[env.envName] || [];
|
nodes[env.envName] = nodes[env.envName] || [];
|
||||||
if (!nodes[env.envName].includes(node.id)) {
|
nodes[env.envName].groups = nodes[env.envName].groups || {};
|
||||||
nodes[env.envName].push({
|
if (!nodes[env.envName].groups[node.nodeGroup]) nodes[env.envName].push({
|
||||||
id: node.id,
|
value: node.nodeGroup,
|
||||||
caption: (node.displayName || node.name) + ' (' + node.nodeGroup + ')'
|
caption: (node.displayName || node.name) + ' (' + node.nodeGroup + ')'
|
||||||
});
|
});
|
||||||
|
nodes[env.envName].groups[node.nodeGroup] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (nodes[env.envName] && nodes[env.envName].length > 0) {
|
||||||
|
envs.push({
|
||||||
|
value: env.envName,
|
||||||
|
caption: (env.displayName + " (" + env.envName + ")" || env.envName)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue