From 16f959221c270e1dc623eaf7c7683ba16f0d7cfa Mon Sep 17 00:00:00 2001 From: Erwin Dondorp Date: Sat, 6 Feb 2021 23:34:04 +0100 Subject: [PATCH] added warning about strange formats in minions.txt --- saltgui/static/scripts/panels/Panel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/saltgui/static/scripts/panels/Panel.js b/saltgui/static/scripts/panels/Panel.js index 3d5e23625..4f4816999 100644 --- a/saltgui/static/scripts/panels/Panel.js +++ b/saltgui/static/scripts/panels/Panel.js @@ -238,8 +238,10 @@ export class Panel { const fields = line.split(/[ \t]+/); if (fields.length === 1) { minions[fields[0]] = "true"; - } else { + } else if (fields.length === 2) { minions[fields[0]] = fields[1]; + } else { + console.warn("lines in 'minions.txt' must have 1 or 2 words, not " + fields.length + " like in: " + line); } } Utils.setStorageItem("session", "minions-txt", JSON.stringify(minions));