Skip to content

Commit 4326364

Browse files
author
Erwin Dondorp
committed
allow validation to succeed for nodegroup-names with '#' still attached
1 parent c58a2e3 commit 4326364

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎saltgui/static/scripts/CommandBox.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,12 @@ export class CommandBox {
979979

980980
static _validateTargetFieldNodegroupExists (pTarget, pTargetType) {
981981
if (pTarget.trim() !== "" && pTargetType === "nodegroup") {
982+
let nodeGroupName = pTarget;
983+
if (nodeGroupName.startsWith("#")) {
984+
nodeGroupName = nodeGroupName.substring(1);
985+
}
982986
const nodeGroups = Utils.getStorageItemObject("session", "nodegroups");
983-
if (!(pTarget in nodeGroups)) {
987+
if (!(nodeGroupName in nodeGroups)) {
984988
return "Unknown nodegroup\nin: " + pTarget;
985989
}
986990
}

0 commit comments

Comments
 (0)