Some checks failed
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 4m4s
CI / Security Audit (push) Successful in 1m42s
CI / Tests (push) Successful in 4m38s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 1s
CI / Deploy MCP (push) Failing after 2s
CI / Detect Changes (push) Successful in 7s
CI / Deploy Docs (push) Successful in 2s
New `compliance-mcp` crate providing a Model Context Protocol server with 7 tools: list/get/summarize findings, list SBOM packages, SBOM vulnerability report, list DAST findings, and DAST scan summary. Supports stdio (local dev) and Streamable HTTP (deployment via MCP_PORT). Includes Dockerfile, CI clippy check, and Coolify deploy job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #5
44 lines
1.2 KiB
Rust
44 lines
1.2 KiB
Rust
use dioxus::prelude::*;
|
|
|
|
use crate::app::Route;
|
|
use crate::components::sidebar::Sidebar;
|
|
use crate::components::toast::{ToastContainer, Toasts};
|
|
use crate::infrastructure::auth_check::check_auth;
|
|
|
|
#[component]
|
|
pub fn AppShell() -> Element {
|
|
use_context_provider(Toasts::new);
|
|
|
|
let auth = use_server_future(check_auth)?;
|
|
|
|
match auth() {
|
|
Some(Ok(info)) if info.authenticated => {
|
|
use_context_provider(|| Signal::new(info.clone()));
|
|
rsx! {
|
|
div { class: "app-shell",
|
|
Sidebar {}
|
|
main { class: "main-content",
|
|
Outlet::<Route> {}
|
|
}
|
|
ToastContainer {}
|
|
}
|
|
}
|
|
}
|
|
Some(Ok(_)) | Some(Err(_)) => {
|
|
// Not authenticated — redirect to Keycloak login
|
|
rsx! {
|
|
document::Script {
|
|
dangerous_inner_html: "window.location.href = '/auth';"
|
|
}
|
|
}
|
|
}
|
|
None => {
|
|
rsx! {
|
|
div { class: "flex items-center justify-center h-screen bg-gray-950",
|
|
p { class: "text-gray-400", "Loading..." }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|