Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
071ec3d
reworked validations
Sep 15, 2026
271bf0f
trigger validation also in non-keyboard cases
Sep 16, 2026
119720c
improved some validation messages
Sep 16, 2026
ef8fa36
error list may replace the waiting indicator also
Sep 16, 2026
783d73d
fixed form-validation indicator
Sep 16, 2026
27d754c
the whitespace-checker is now a regular validator
Sep 16, 2026
f5fee69
removed (functionally) duplicate code
Sep 17, 2026
f42527a
removed duplicate validations
Sep 17, 2026
34b5377
simplify now that validations are already done
Sep 17, 2026
fdff6e1
explain a (somewhat strange) error message
Sep 17, 2026
c9a93af
allow validation to succeed for nodegroup-names with '#' still attached
Sep 30, 2026
af18bb8
FIX1 should have used original string when it is too big
Oct 7, 2026
b962497
FIX2 now catch BigInt conversion errors
Oct 7, 2026
e5ac1f0
FIX3 always treat integers as bigint in requests
Oct 8, 2026
9cac5f5
FIX4 warn about integers that will loose precision in a response
Oct 8, 2026
4623ae4
FIX5 warn for unsafe integers in the output
Oct 8, 2026
042cbd7
FIX6 warn for sexagesimal variants that SaltStack would reject
Oct 8, 2026
a730f78
FIX7 warn for binary/hex differences with salt commandline
Oct 8, 2026
f3dff0e
FIX8 allow invalid Sexagesimal values (which then become string)
Oct 8, 2026
8cea19f
fix1 use official regexp for sexagesimal and warn for lookalikes
Oct 9, 2026
553e49b
fix2 support multiple warnings
Oct 9, 2026
a6bcc15
fix3 warns for decimal number with octal prefix
Oct 9, 2026
76a96f9
hide the JS datatypes and be more generic
Oct 11, 2026
a726c3d
fix4 sexagesimal also has a float-variant
Oct 11, 2026
d8f1fcc
(fix5) restrict floats to same format as in salt
Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions saltgui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ <h1 id="docu" class='docu'>&#x1F4D6;&#xFE0E;</h1>
<!-- FE0E = VARIATION SELECTOR-15 (render as text) -->
<span id="help" class="small-button small-button-right small-button-for-click" style="cursor: help">&#x2753;&#xFE0E;</span>
<div><h1>Manual Run</h1><p id="template-catmenu-here"></p><p id="template-tmplmenu-here"></p></div>
<div id="target-box"><!-- //NOSONAR --><input list="data-list-target" id='target' type='text' placeholder="Target" spellcheck="false" style="margin-right: 10px"/></div>
<div id="cmd-box"><!-- //NOSONAR --><input id='command' type='text' placeholder="Command" spellcheck="false" style="margin-right: 10px"/></div>
<div id="run-block"><input id="run-command" type='submit' value="Run command" style="margin-right: 10px"/></div>
<div id="target-box"><!-- //NOSONAR --><input list="data-list-target" id='target' type='text' placeholder="Target" spellcheck="false" style="margin-right: 10px"/><span id="target-validation-indicator" class="cmd-validation-indicator" style="cursor: help; margin-right: 5px;"></span></div>
<div id="cmd-box"><!-- //NOSONAR --><input id='command' type='text' placeholder="Command" spellcheck="false" style="margin-right: 10px"/><span id="cmd-validation-indicator" class="cmd-validation-indicator" style="cursor: help; margin-right: 5px;"></span></div>
<div id="run-block"><input id="run-command" type='submit' value="Run command" style="margin-right: 10px"/><span id="form-validation-indicator" class="cmd-validation-indicator" style="cursor: help; margin-right: 5px;"></span></div>
<pre id="popup-output" class='output'>Waiting for command...</pre>
</div>
</div>
Expand Down
13 changes: 10 additions & 3 deletions saltgui/static/scripts/Api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* global config EventSource window */

import {Character} from "./Character.js";
import {CommandBox} from "./CommandBox.js";
import {Router} from "./Router.js";
import {TargetType} from "./TargetType.js";
Expand Down Expand Up @@ -359,7 +358,15 @@ export class API {
};

if (pMethod === "POST") {
options.body = JSON.stringify(pParams);
// BigInt is not JSON-serializable; convert to marker string so JSON.stringify
// can process it, then regex removes quotes to produce unquoted JSON numbers.
// Use \x00 (null byte) as delimiter since it cannot be typed, preventing collisions.
options.body = JSON.stringify(pParams, (_key, value) => { // eslint-disable-line no-unused-vars
if (typeof value === 'bigint') {
return `\x00BIGINT${value.toString()}\x00`;
}
return value;
}).replace(/"\\u0000BIGINT(-?\d+)\\u0000"/g, '$1');
}

/* eslint-disable compat/compat */
Expand Down Expand Up @@ -481,7 +488,7 @@ export class API {
// the character counts include "-----BEGIN PUBLIC KEY-----" at the beginning and
// include "-----END PUBLIC KEY-----" at the end.
if (data.pub && data.pub.length > 75) {
data.pub = data.pub.substring(0, 35) + Character.HORIZONTAL_ELLIPSIS + data.pub.substring(data.pub.length - 33);
data.pub = Utils.truncateString(data.pub, 35, 33);
}

// salt/beacon/<minion>/<beacon>/
Expand Down
1 change: 1 addition & 0 deletions saltgui/static/scripts/Character.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class Character {
Character.BALLOT_BOX_WITH_CHECK = "\u2611";
Character.GEAR = "\u2699";
Character.WARNING_SIGN = "\u26A0" + Character._VARIATION_SELECTOR_16;
Character.NO_ENTRY_SIGN = "\u26D4" + Character._VARIATION_SELECTOR_16;
Character.HEAVY_CHECK_MARK = "\u2714";
Character.HEAVY_MULTIPLICATION_X = "\u2716" + Character._VARIATION_SELECTOR_15;
Character.BLACK_QUESTION_MARK_ORNAMENT = "\u2753" + Character._VARIATION_SELECTOR_15;
Expand Down
Loading
Loading