From 670fe76249bf74dffe6e40a5e31384c943bd8ae3 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Wed, 13 Jul 2022 11:16:07 +0200 Subject: [PATCH] Module as link to dashboard --- gui/modules/webservicedashboard.svelte | 14 ++ gui/modules/webservicemonitor.svelte | 176 ------------------------- index.js | 11 +- 3 files changed, 19 insertions(+), 182 deletions(-) create mode 100644 gui/modules/webservicedashboard.svelte delete mode 100644 gui/modules/webservicemonitor.svelte diff --git a/gui/modules/webservicedashboard.svelte b/gui/modules/webservicedashboard.svelte new file mode 100644 index 0000000..6755765 --- /dev/null +++ b/gui/modules/webservicedashboard.svelte @@ -0,0 +1,14 @@ + diff --git a/gui/modules/webservicemonitor.svelte b/gui/modules/webservicemonitor.svelte deleted file mode 100644 index 0868ac5..0000000 --- a/gui/modules/webservicemonitor.svelte +++ /dev/null @@ -1,176 +0,0 @@ - - -{#if error} -
- {translate('Failed to fetch fresh data', language)} -
-{/if} - -{#if mounted} - - - - - {#if webservices.length} -
- {#each webservices as service} - {@const name = service.name[language] || service.name.en} -
-
{name}
- -
- {@html translate('Status last checked on: ', [ `${new Date(service.lastChecked).toLocaleString()}`, language ])} -
- -
- {#if service.heartbeat[service.heartbeat.length - 1]?.down == true} - DOWN - {:else} - UP - {/if} - - openWebService(name, service.id)}> - open - -
-
- {/each} -
- {:else} - No webservices - {/if} - -
-
- -{:else} -

Loading...

-{/if} - - diff --git a/index.js b/index.js index 9b29ce6..3d01a5b 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ const guiCluster = 'web service status'; const icons = { server: '', outage: '', - checks: '', + external: '', }; let renderedDashboard = null; @@ -148,12 +148,11 @@ module.exports = { }, }, - { path: 'webservicemonitor.svelte', - requires: [ 'seeMonitor' ], + { path: 'webservicedashboard.svelte', menu: { cluster: guiCluster, - icon: icons.checks, - title: 'monitor', + icon: icons.external, + title: 'dashboard', }, }, ], @@ -236,7 +235,7 @@ module.exports = { }, ], - routes: ({ server, settings }) => [ + routes: ({ server }) => [ // Get all services { route: '/status/webservices',