diff --git a/docs/README.md b/docs/README.md index 25cf4db36..509f93d4f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -280,6 +280,7 @@ The display of the IP-numbers can simply be disabled by choosing a non-existing SaltGUI will retrieve cached grains information when variable `saltgui_use_cache_for_grains` is set to `true`. In that case, unreachable minions will appear without warnings for that. In all cases, the information may be less accurate. +A warning for offline minions is only shown on the Minions panel. ## Pillars Pillars potentially contain security senstitive information. @@ -298,6 +299,7 @@ saltgui_public_pillars: SaltGUI will retrieve cached pillar information when variable `saltgui_use_cache_for_pillar` is set to `true`. In that case, unreachable minions will appear without warnings for that. In all cases, the information may be less accurate. +A warning for offline minions is only shown on the Minions panel. ## Nodegroups The Nodegroups page shows all minions, but groups the minions by their nodegroup. diff --git a/saltgui/static/scripts/panels/Minions.js b/saltgui/static/scripts/panels/Minions.js index f91a87e51..f4be11fa1 100644 --- a/saltgui/static/scripts/panels/Minions.js +++ b/saltgui/static/scripts/panels/Minions.js @@ -157,7 +157,9 @@ export class MinionsPanel extends Panel { const minionIds = pWheelMinionsConnectedData.return[0].data.return; for (const tr of this.table.tBodies[0].childNodes) { - if (minionIds.indexOf(tr.dataset.minionId) >= 0) { + tr.dataset.isConnected = minionIds.indexOf(tr.dataset.minionId) >= 0; + + if (tr.dataset.isConnected) { // skip the connected minions continue; } diff --git a/saltgui/static/scripts/panels/Panel.js b/saltgui/static/scripts/panels/Panel.js index 9db7d8ca3..67d1cd7cc 100644 --- a/saltgui/static/scripts/panels/Panel.js +++ b/saltgui/static/scripts/panels/Panel.js @@ -569,7 +569,10 @@ export class Panel { const minionTr = this.getElement(Utils.getIdFromMinionId(pMinionId)); - minionTr.appendChild(Utils.createTd("minion-id", pMinionId)); + const minionSpan = Utils.createSpan("minion-id", pMinionId); + const minionTd = Utils.createTd(); + minionTd.append(minionSpan); + minionTr.appendChild(minionTd); // which grain to use for IP-number display // typical choices are "fqdn_ip4", "ipv4", "fqdn_ip6" or "ipv6" @@ -611,6 +614,14 @@ export class Panel { minionTr.appendChild(accepted); } + if (minionTr.dataset.isConnected === "false") { + Panel.addPrefixIcon(minionSpan, Character.WARNING_SIGN); + Utils.addToolTip( + minionSpan, + "This minion is currently not connected", + "bottom-left"); + } + minionTr.dataset.minionId = pMinionId; let saltversion = Character.EM_DASH;