@scalio-cloud/ui 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +1 -1
- package/react/agents.js +25 -5
package/README.md
CHANGED
|
@@ -700,6 +700,12 @@ list. Test IDs: `agents-panel`, `agents-code-create`, `agents-code-value`, `agen
|
|
|
700
700
|
`agent-role-<id>-<role>`, `agent-worker-state-<id>-<worker>`, `agent-worker-restart|stop|start-<id>-<worker>`,
|
|
701
701
|
`agent-block-<id>`, `agent-remove-<id>`, `agents-tasks`.
|
|
702
702
|
|
|
703
|
+
Since 0.102.0 «Agent hinzufügen» shows every offered role as a checkbox, also a single one, and none is preselected;
|
|
704
|
+
without a role the dialog says the agent fetches no tasks (`agents-code-norole`; BL-770, Markus 2026-12-01). The update
|
|
705
|
+
reasons `data_folder_unsafe` and `data_folder_uncheckable` are shown in words with the link «Anleitung zur Reparatur»
|
|
706
|
+
(`agent-update-help-<id>`) to the manual; `dataFolderHelpUrl` replaces the default address (docs.scalionexus.com,
|
|
707
|
+
section «Datenordner unsicher»; BL-775). Other reasons stay raw.
|
|
708
|
+
|
|
703
709
|
Since 0.84.0 a saved agent setting stays in its field with the badge «gesendet, wird übernommen»
|
|
704
710
|
(`agent-setting-sent-<id>-<name>`) until the agent reports it in its next heartbeat; before, the field fell back to the
|
|
705
711
|
old value right after «Speichern» (Markus 2026-11-15). The script editor of `AgentScriptsPanel` is at least 60 % of the window high
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|
package/react/agents.js
CHANGED
|
@@ -31,6 +31,7 @@ const LABELS = {
|
|
|
31
31
|
noErrors: "Keine Fehler.",
|
|
32
32
|
updShort: "Updates",
|
|
33
33
|
codeRoles: "Rollen für den neuen Agent",
|
|
34
|
+
noRoleHint: "Ohne Rolle holt der Agent keine Aufträge. Sie können die Rolle auch später setzen.",
|
|
34
35
|
codeNote: "Notiz (z. B. Servername)",
|
|
35
36
|
codeTitle: "Registrierungscode",
|
|
36
37
|
codeOnce: "Der Code wird nur jetzt angezeigt. Er gilt 24 Stunden und nur für einen Server.",
|
|
@@ -120,6 +121,9 @@ const LABELS = {
|
|
|
120
121
|
updStates: { installing: "Wird aktualisiert auf {version}", verifying: "Prüft Version {version}", installed: "Aktualisiert auf {version}",
|
|
121
122
|
rolled_back: "Zurückgerollt auf {from} ({reason})", rollback_failed: "Rollback fehlgeschlagen ({reason})", failed: "Update fehlgeschlagen ({reason})",
|
|
122
123
|
refused: "Update abgelehnt ({reason})" },
|
|
124
|
+
updReasons: { data_folder_unsafe: "Datenordner C:\\ProgramData\\Scalio hat unsichere Berechtigungen",
|
|
125
|
+
data_folder_uncheckable: "Datenordner C:\\ProgramData\\Scalio nicht prüfbar" },
|
|
126
|
+
repairGuide: "Anleitung zur Reparatur",
|
|
123
127
|
},
|
|
124
128
|
en: {
|
|
125
129
|
title: "Scalio Agent",
|
|
@@ -133,6 +137,7 @@ const LABELS = {
|
|
|
133
137
|
noErrors: "No errors.",
|
|
134
138
|
updShort: "Updates",
|
|
135
139
|
codeRoles: "Roles of the new agent",
|
|
140
|
+
noRoleHint: "Without a role the agent fetches no tasks. You can also set the role later.",
|
|
136
141
|
codeNote: "Note (e.g. server name)",
|
|
137
142
|
codeTitle: "Enrollment code",
|
|
138
143
|
codeOnce: "The code is shown only now. It is valid for 24 hours and for one server.",
|
|
@@ -222,6 +227,9 @@ const LABELS = {
|
|
|
222
227
|
updStates: { installing: "Updating to {version}", verifying: "Checking version {version}", installed: "Updated to {version}",
|
|
223
228
|
rolled_back: "Rolled back to {from} ({reason})", rollback_failed: "Rollback failed ({reason})", failed: "Update failed ({reason})",
|
|
224
229
|
refused: "Update refused ({reason})" },
|
|
230
|
+
updReasons: { data_folder_unsafe: "data folder C:\\ProgramData\\Scalio has unsafe permissions",
|
|
231
|
+
data_folder_uncheckable: "data folder C:\\ProgramData\\Scalio not checkable" },
|
|
232
|
+
repairGuide: "Repair guide",
|
|
225
233
|
},
|
|
226
234
|
};
|
|
227
235
|
|
|
@@ -230,6 +238,11 @@ const UPDATE_TONE = { installing: "running", verifying: "running", installed: "o
|
|
|
230
238
|
const RETRY_STATES = ["rolled_back", "rollback_failed", "failed", "refused"];
|
|
231
239
|
const TASK_TONE = { queued: "neutral", claimed: "running", finished: "ok", error: "error" };
|
|
232
240
|
|
|
241
|
+
// public manual section for an unsafe or uncheckable data folder (BL-775); apps may pass dataFolderHelpUrl
|
|
242
|
+
const DATA_FOLDER_HELP = { de: "https://docs.scalionexus.com/de/admin/scalio-agent/#datenordner-unsicher",
|
|
243
|
+
en: "https://docs.scalionexus.com/admin/scalio-agent/#data-folder-unsafe" };
|
|
244
|
+
const DATA_FOLDER_REASONS = ["data_folder_unsafe", "data_folder_uncheckable"];
|
|
245
|
+
|
|
233
246
|
function labels(lang, overrides) {
|
|
234
247
|
return Object.assign({}, LABELS[lang === "en" ? "en" : "de"], overrides || {});
|
|
235
248
|
}
|
|
@@ -480,9 +493,9 @@ function AgentsPanel(props) {
|
|
|
480
493
|
}, [load, props.refreshMs]);
|
|
481
494
|
|
|
482
495
|
const offered = (data && data.roles) || [];
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
const selectedRoles = codeRoles ||
|
|
496
|
+
// offered roles are never preselected, also a single one (BL-770): the admin ticks them;
|
|
497
|
+
// an agent without a role fetches no tasks, the dialog says so
|
|
498
|
+
const selectedRoles = codeRoles || [];
|
|
486
499
|
|
|
487
500
|
const run = async (fn, okText) => {
|
|
488
501
|
setBusy(true);
|
|
@@ -551,12 +564,14 @@ function AgentsPanel(props) {
|
|
|
551
564
|
h("p", { className: "scalio-settings-text", style: { margin: 0 } }, L.addHint),
|
|
552
565
|
props.downloadUrl ? h("a", { className: "scalio-btn", href: props.downloadUrl, style: { justifySelf: "start" } },
|
|
553
566
|
h(Icons.Download, { className: "scalio-icon" }), L.download) : null,
|
|
554
|
-
offered.length >
|
|
567
|
+
offered.length > 0 ? h("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.75rem" } },
|
|
555
568
|
h("span", { className: "scalio-settings-text" }, `${L.codeRoles}:`),
|
|
556
569
|
offered.map((r) => h("label", { key: r.name, className: "scalio-settings-check" },
|
|
557
570
|
h("input", { type: "checkbox", checked: selectedRoles.includes(r.name), disabled: busy || !!shown, "data-testid": `agents-code-role-${r.name}`,
|
|
558
571
|
onChange: () => setCodeRoles(selectedRoles.includes(r.name) ? selectedRoles.filter((x) => x !== r.name) : selectedRoles.concat([r.name])) }),
|
|
559
572
|
h("span", null, r.label || r.name)))) : null,
|
|
573
|
+
offered.length > 0 && !shown && selectedRoles.length === 0
|
|
574
|
+
? h("p", { className: "scalio-settings-text", style: { margin: 0 }, "data-testid": "agents-code-norole" }, L.noRoleHint) : null,
|
|
560
575
|
shown ? null : h("div", { style: { display: "flex", gap: "0.5rem", flexWrap: "wrap" } },
|
|
561
576
|
h("input", { className: "scalio-input", placeholder: L.codeNote, "aria-label": L.codeNote, value: note, maxLength: 200, disabled: busy,
|
|
562
577
|
style: { flex: "1 1 14rem" }, "data-testid": "agents-code-note", onChange: (e) => setNote(e.target.value) }),
|
|
@@ -619,8 +634,13 @@ function AgentsPanel(props) {
|
|
|
619
634
|
const running = String(a.version || "").split("+")[0];
|
|
620
635
|
const bundled = upd && upd.available && upd.available.version === u.version && upd.available.build;
|
|
621
636
|
const shown = u.state === "installed" && running.startsWith(u.version || "\u0000") ? running : (bundled || u.version);
|
|
622
|
-
const text = fill((L.updStates || {})[u.state] || u.state, { version: shown, from: String(u.from_version || a.version || "").split("+")[0], reason: u.reason || "–" });
|
|
637
|
+
const text = fill((L.updStates || {})[u.state] || u.state, { version: shown, from: String(u.from_version || a.version || "").split("+")[0], reason: (L.updReasons || {})[u.reason] || u.reason || "–" });
|
|
623
638
|
out.push(h("div", { key: "s" }, h(StatusBadge, { tone: UPDATE_TONE[u.state] || "neutral", testId: `agent-update-state-${a.id}` }, text)));
|
|
639
|
+
if (DATA_FOLDER_REASONS.includes(u.reason)) {
|
|
640
|
+
out.push(h("div", { key: "help", className: "scalio-settings-text" },
|
|
641
|
+
h("a", { href: props.dataFolderHelpUrl || DATA_FOLDER_HELP[props.lang === "en" ? "en" : "de"], target: "_blank", rel: "noopener noreferrer",
|
|
642
|
+
"data-testid": `agent-update-help-${a.id}` }, L.repairGuide)));
|
|
643
|
+
}
|
|
624
644
|
}
|
|
625
645
|
if (a.scripts) {
|
|
626
646
|
out.push(h("div", { key: "sc", className: "scalio-settings-text", "data-testid": `agent-scripts-${a.id}` },
|