From 25684438e9943bf3c989019e28d2e6a66c1896f4 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Fri, 31 Mar 2023 19:40:49 +0200 Subject: [PATCH] Use new Table View --- client/src/pages/network/Interfaces.vue | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/client/src/pages/network/Interfaces.vue b/client/src/pages/network/Interfaces.vue index 6d174ce..9b66903 100644 --- a/client/src/pages/network/Interfaces.vue +++ b/client/src/pages/network/Interfaces.vue @@ -2,6 +2,9 @@ import { apiCall } from "../../api"; let interfaces = $ref({}); +let loading = $ref(false); +let selection = $ref([] as number[]); + const columns = [ {heading: 'Name', path: 'name'}, {heading: 'Type', path: 'type'}, @@ -23,16 +26,10 @@ const displayData = $computed(() => { }); } return data; -}); - -function getServicePortRange(s:any): string { - if (s.dport_end) { - return s.dport_start + "-" + s.dport_end; - } - return s.dport_start; -} +}); async function load(){ + loading = true let res = await apiCall("Network.GetInterfaces", {}); if (res.Error === null) { console.debug("interfaces", res.Data.Interfaces); @@ -40,6 +37,7 @@ async function load(){ } else { console.debug("error", res); } + loading = false } onMounted(async() => { @@ -49,5 +47,11 @@ onMounted(async() => { \ No newline at end of file