Dashboard: Deployments nav group, tool detail page, deployment links, static-aware detail
- Nav: Services/Scheduled/Tools nested under a 'Deployments' group (expandable; flattened to icons when the sidebar is collapsed). Programs stays top-level. - Overview: Tools tile (Wrench, count of tool programs). - New /tools/:name tool detail page (useDeployment): Install/Uninstall lifecycle, a link up to its program, and an editable ToolFields (description + env). - ServiceDetail is static-aware: a caddy deployment shows served-by-gateway + URL + root, no start/stop, and edits via a new StaticFields (root + public + env) so a launcher is never injected into a caddy deployment. - Program detail's Deployment section is now a clean list of links — every deployment (tool→/tools, service/static→/services, job→/jobs) links to its detail page; lifecycle controls moved onto those pages. clean pnpm build + tsc.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Link } from "react-router-dom"
|
||||
import { Clock, Globe, Package, Server, Share2 } from "lucide-react"
|
||||
import { Clock, Globe, Package, Server, Share2, Wrench } from "lucide-react"
|
||||
import {
|
||||
useGateway,
|
||||
useJobs,
|
||||
@@ -15,6 +15,7 @@ import { PageHeader } from "@/components/PageHeader"
|
||||
export function Overview() {
|
||||
const { data: services } = useServices()
|
||||
const { data: jobs } = useJobs()
|
||||
const { data: tools } = usePrograms("tool")
|
||||
const { data: programs } = usePrograms()
|
||||
const { data: statusResp } = useStatus()
|
||||
const { data: gateway } = useGateway()
|
||||
@@ -43,6 +44,13 @@ export function Overview() {
|
||||
value: jobs?.length ?? 0,
|
||||
detail: jobs ? `${jobs.length === 1 ? "job" : "jobs"}` : "",
|
||||
},
|
||||
{
|
||||
to: "/tools",
|
||||
icon: Wrench,
|
||||
label: "Tools",
|
||||
value: tools?.length ?? 0,
|
||||
detail: tools ? "on PATH" : "",
|
||||
},
|
||||
{
|
||||
to: "/programs",
|
||||
icon: Package,
|
||||
@@ -72,7 +80,7 @@ export function Overview() {
|
||||
|
||||
{nodes && <NodeBar nodes={nodes} />}
|
||||
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4">
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4">
|
||||
{tiles.map(({ to, icon: Icon, label, value, detail }) => (
|
||||
<Link
|
||||
key={to}
|
||||
|
||||
Reference in New Issue
Block a user