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

+
+ + +
+ + + +