diff --git a/src/routes/_Trend.svelte b/src/routes/_Trend.svelte
new file mode 100644
index 000000000..140ac6d6d
--- /dev/null
+++ b/src/routes/_Trend.svelte
@@ -0,0 +1,39 @@
+
+
+{#if trend === 'up'}
+
+
+{:else if trend === 'down'}
+
+
+
+{/if}
diff --git a/src/routes/applications/[id]/logs/_Loading.svelte b/src/routes/applications/[id]/logs/_Loading.svelte
index 73fbe709e..7add70c19 100644
--- a/src/routes/applications/[id]/logs/_Loading.svelte
+++ b/src/routes/applications/[id]/logs/_Loading.svelte
@@ -1,4 +1,8 @@
-
+
+
+
diff --git a/src/routes/index.svelte b/src/routes/index.svelte
index 224b796b1..40d78899c 100644
--- a/src/routes/index.svelte
+++ b/src/routes/index.svelte
@@ -24,6 +24,7 @@
import { get } from '$lib/api';
import { onDestroy, onMount } from 'svelte';
import Loading from './applications/[id]/logs/_Loading.svelte';
+ import Trend from './_Trend.svelte';
export let applicationsCount: number;
export let sourcesCount: number;
@@ -67,7 +68,6 @@
try {
loading.usage = true;
const data = await get(`/dashboard.json?usage=true`);
- console.log(usage.memory.freeMemPercentage);
if (data.memory.freeMemPercentage === usage.memory.freeMemPercentage) {
trends.memory = 'stable';
} else {
@@ -135,7 +135,6 @@
Server Usage
-
@@ -156,56 +155,8 @@
- Free Memory
-
{usage?.memory.freeMemPercentage}%
- {#if trends.memory === 'stable' || trends.memory === '' || usage.memory.freeMemPercentage === 0}
-
- {:else if trends.memory === 'up'}
-
-
- {:else if trends.memory === 'down'}
-
-
-
+ {#if !memoryWarning}
+
{/if}
@@ -214,69 +165,21 @@
- Total CPUs
-
- {(usage?.cpu.count).toFixed(0)}
+ {usage?.cpu.count}
-
- Load Average
+ - Load Average (5/10/30mins)
-
- {usage?.cpu.load}
+ {usage?.cpu.load.join('/')}
- CPU Usage
-
- {(usage?.cpu.usage).toFixed(0)}%
- {#if trends.cpu === 'stable' || trends.cpu === '' || usage.cpu.usage === 0}
-
- {:else if trends.cpu === 'up'}
-
-
- {:else if trends.cpu === 'down'}
-
-
-
+ {usage?.cpu.usage}%
+ {#if !cpuWarning}
+
{/if}
@@ -298,56 +201,8 @@
- Free Disk
-
{usage?.disk.freePercentage}%
- {#if trends.disk === 'stable' || trends.disk === '' || usage.disk.freePercentage === 0}
-
- {:else if trends.disk === 'up'}
-
-
- {:else if trends.disk === 'down'}
-
-
-
+ {#if !diskWarning}
+
{/if}