From 3f1fd8f20d52634666f2ee8bd551b2c118d31fd7 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Sun, 28 Dec 2025 12:02:48 -0700 Subject: [PATCH] Add technician login and dashboard pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add /login page with dark theme matching portal - Add /dashboard with 4 tabs: Support, Access, Build, Settings - Add clean URL routes (/login, /dashboard) to server - Add "Technician Login" link to portal footer - Dashboard shows active support codes with generate/cancel - Build tab has installer builder form (placeholder for agent) - Access tab has 3-panel layout for machine management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- server/src/main.rs | 19 ++ server/static/dashboard.html | 481 +++++++++++++++++++++++++++++++++++ server/static/index.html | 1 + server/static/login.html | 230 +++++++++++++++++ 4 files changed, 731 insertions(+) create mode 100644 server/static/dashboard.html create mode 100644 server/static/login.html diff --git a/server/src/main.rs b/server/src/main.rs index 521895a..5ecedb5 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -82,6 +82,10 @@ async fn main() -> Result<()> { .route("/api/sessions", get(list_sessions)) .route("/api/sessions/:id", get(get_session)) + // HTML page routes (clean URLs) + .route("/login", get(serve_login)) + .route("/dashboard", get(serve_dashboard)) + // State .with_state(state) @@ -173,3 +177,18 @@ async fn get_session( Ok(Json(api::SessionInfo::from(session))) } + +// Static page handlers +async fn serve_login() -> impl IntoResponse { + match tokio::fs::read_to_string("static/login.html").await { + Ok(content) => Html(content).into_response(), + Err(_) => (StatusCode::NOT_FOUND, "Page not found").into_response(), + } +} + +async fn serve_dashboard() -> impl IntoResponse { + match tokio::fs::read_to_string("static/dashboard.html").await { + Ok(content) => Html(content).into_response(), + Err(_) => (StatusCode::NOT_FOUND, "Page not found").into_response(), + } +} diff --git a/server/static/dashboard.html b/server/static/dashboard.html new file mode 100644 index 0000000..05e3a9c --- /dev/null +++ b/server/static/dashboard.html @@ -0,0 +1,481 @@ + + + + + + GuruConnect - Dashboard + + + +
+
+ +
+
+ + +
+
+ + + +
+ +
+
+
+
+

Active Support Sessions

+

Temporary sessions initiated by support codes

+
+ +
+
+ + + + + + + + + + + + + + + +
CodeStatusCreatedTechnicianActions
+
+

No active sessions

+

Generate a code to start a support session

+
+
+
+
+
+ + +
+
+ +
+
+

No machines

+

Install the agent on a machine to see it here

+
+
+
+
+

Select a machine

+

Click a machine to view details

+
+
+
+
+ + +
+
+
+
+

Installer Builder

+

Create customized agent installers for unattended access

+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + +
+

+ Agent builds will be available once the agent is compiled. +

+
+
+ + +
+
+
+
+

Settings

+

Configure your GuruConnect preferences

+
+
+
+
+ + +
+
+ + +
+
+

+ Additional settings coming soon. +

+
+
+
+ + + + diff --git a/server/static/index.html b/server/static/index.html index d12b7af..0ec763a 100644 --- a/server/static/index.html +++ b/server/static/index.html @@ -254,6 +254,7 @@ diff --git a/server/static/login.html b/server/static/login.html new file mode 100644 index 0000000..23c5819 --- /dev/null +++ b/server/static/login.html @@ -0,0 +1,230 @@ + + + + + + GuruConnect - Technician Login + + + +
+ + + + +
+

Auth not yet configured. Skip to Dashboard

+
+ + +
+ + + +