diff --git a/src/App.svelte b/src/App.svelte index 3a02390..f837425 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -214,9 +214,10 @@ function wsEventAdd(ws) { if (socket[ws]) { - if (debug) console.log("[i]", getIP(ws), "web socket events added"); + let ip = getIP(ws); + if (debug) console.log("[i]", ip, "web socket events added"); socket[ws].addEventListener("open", function (event) { - if (debug) console.log("[i]", getIP(ws), "completed connecting"); + if (debug) console.log("[i]", ip, "completed connecting"); markDeviceStatus(ws, true); //socket[ws].send("HELLO"); }); @@ -229,11 +230,11 @@ } }); socket[ws].addEventListener("close", (event) => { - if (debug) console.log("[e]", getIP(ws), "connection closed"); + if (debug) console.log("[e]", ip, "connection closed"); markDeviceStatus(ws, false); }); socket[ws].addEventListener("error", function (event) { - if (debug) console.log("[e]", getIP(ws), "connection error"); + if (debug) console.log("[e]", ip, "connection error"); markDeviceStatus(ws, false); }); } else { @@ -326,7 +327,7 @@ function dropdownChange() { socketConnected = selectedDeviceData.status; - if (debug) console.log("[i]", "user choose dev:", selectedDeviceData.name); + if (debug) console.log("[i]", "user selected device:", selectedDeviceData.name); } onMount(async () => { @@ -438,23 +439,24 @@ - - - - + + + + {#each deviceList as device} - - - - + + + + {/each}
Название устройстваIP адресИдентификаторСостояниеНазвание устройстваIP адресИдентификаторСостояние
{device.name}{device.ip}{device.id}{device.status ? "online" : "offline"}{device.name}{device.ip}{device.id}{device.status ? "online" : "offline"}
+ @@ -515,6 +517,13 @@ .widget-anydata-style { @apply text-center text-gray-500 font-bold; } + /*====================================================table=====================================================*/ + .table-head-element { + @apply border border-gray-300 text-center break-words w-1/4 text-gray-500 font-bold; + } + .table-body-element { + @apply border border-gray-300 text-center break-words w-1/4; + } } #menu__toggle {