Skip to content

Commit eea0fd0

Browse files
author
Erwin Dondorp
committed
get the minion-list when not available yet
1 parent f5917bf commit eea0fd0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

saltgui/static/scripts/CommandBox.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,17 @@ export class CommandBox {
459459
targetList.appendChild(option);
460460
}
461461

462+
if (Utils.getStorageItem("session", "minions", "N/A") === "N/A") {
463+
const wheelKeyListAllPromise = pApi.getWheelKeyListAll();
464+
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
465+
for (const m of pWheelKeyListAllData.return[0].data.return.minions) {
466+
minions.push(m);
467+
}
468+
Utils.setStorageItem("session", "minions", JSON.stringify(minions));
469+
}, (pWheelKeyListAllMsg) => {
470+
// never mind, don't complain
471+
});
472+
}
462473
const minions = Utils.getStorageItemList("session", "minions");
463474
for (const minionId of [...minions].sort()) {
464475
const option = Utils.createElem("option");

0 commit comments

Comments
 (0)