From 5917a2a77d293bac1b2b02ec1f82643306b1e363 Mon Sep 17 00:00:00 2001 From: dvtate Date: Mon, 17 Apr 2023 22:33:37 -0500 Subject: [PATCH] improve homepage --- api/src/public_api.ts | 2 +- frontend/src/lib/page.ts | 6 +++--- frontend/static/index.html | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api/src/public_api.ts b/api/src/public_api.ts index 3fe4240..4da6810 100644 --- a/api/src/public_api.ts +++ b/api/src/public_api.ts @@ -24,7 +24,7 @@ router.get('/stats', async (req, res) => { completedTasks: completedTasksCount[0]["COUNT(*)"], workers: stats.workers, threads: stats.threads, - loadavg: stats.loadAverage, + loadAverage: stats.loadAverage, activeTasks: stats.tasks, }); } catch (e) { diff --git a/frontend/src/lib/page.ts b/frontend/src/lib/page.ts index 33d92ca..ed04117 100644 --- a/frontend/src/lib/page.ts +++ b/frontend/src/lib/page.ts @@ -7,8 +7,8 @@ if (link) { link.innerHTML = 'Portal'; link.href = '/portal'; } else { - link.innerHTML = 'Log In'; - link.href = '/portal/login.html'; + link.innerHTML = 'Sign Up'; + link.href = '/portal/signup.html'; } } @@ -45,4 +45,4 @@ if (themeToggle) // If they have a preferred theme already const themeCookie = getCookie('theme') as 'dark' | 'light' | null; if (themeCookie) - setTheme(themeCookie); \ No newline at end of file + setTheme(themeCookie); diff --git a/frontend/static/index.html b/frontend/static/index.html index 0d366f6..2b320ee 100644 --- a/frontend/static/index.html +++ b/frontend/static/index.html @@ -114,9 +114,12 @@

How it works

@@ -125,8 +128,8 @@

How it works

(function getStats() { fetch('/api/public/stats').then(r => r.json()).then(stats => { document.getElementById('completed-tasks').innerHTML = `${stats.completedTasks} completed tasks`; - document.getElementById('worker-count').innerHTML = `${stats.workers} workers`; - document.getElementById('thread-count').innerHTML = `${stats.threads} threads`; + document.getElementById('worker-count').innerHTML = `${stats.workers} active workers`; + document.getElementById('thread-count').innerHTML = `${stats.threads} active threads`; document.getElementById('load-average').innerHTML = `${stats.loadAverage} load average`; setTimeout(getStats, 3000); }).catch(console.error);