Skip to content

Commit 883956c

Browse files
Erwin Dondorperwindon
authored andcommitted
get the minion-list when not available yet
1 parent 161167f commit 883956c

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+
/* eslint-disable no-unused-vars */
465+
wheelKeyListAllPromise.then((pWheelKeyListAllData) => {
466+
const minions = pWheelKeyListAllData.return[0].data.return.minions;
467+
Utils.setStorageItem("session", "minions", JSON.stringify(minions));
468+
}, (pWheelKeyListAllMsg) => {
469+
// VOID
470+
});
471+
/* eslint-enable no-unused-vars */
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)