From 99bfbb56de55657919dcfc3c2330bd2984b40596 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Mon, 11 Aug 2025 19:58:24 +1000 Subject: [PATCH] better check for available device #1132 --- front/js/ui_components.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/front/js/ui_components.js b/front/js/ui_components.js index 33dd7929..42952779 100755 --- a/front/js/ui_components.js +++ b/front/js/ui_components.js @@ -784,7 +784,7 @@ function initSelect2() { function renderDeviceLink(data, container, useName = false) { // If no valid MAC, return placeholder text if (!data.id || !isValidMac(data.id)) { - return data.text; + return `${data.text}`; } const device = getDevDataByMac(data.id); @@ -792,6 +792,13 @@ function renderDeviceLink(data, container, useName = false) { return data.text; } + // Build and return badge parts + const badge = getStatusBadgeParts( + device.devPresentLastScan, + device.devAlertDown, + device.devMac + ); + // badge class and hover-info class to container $(container) .addClass(`${badge.cssClass} hover-node-info`)