feat(ui): port dashboard components to react
This commit is contained in:
parent
a71d66b1b8
commit
73abcc1b69
33 changed files with 1304 additions and 182 deletions
27
src/lib/ui/components/ServicePanel.tsx
Normal file
27
src/lib/ui/components/ServicePanel.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import type { UiServiceGroup } from "../types";
|
||||
import { Panel } from "./Panel";
|
||||
import { ServiceRow } from "./ServiceRow";
|
||||
import { StatusStrip } from "./StatusStrip";
|
||||
|
||||
export interface ServicePanelProps {
|
||||
group: UiServiceGroup;
|
||||
}
|
||||
|
||||
export function ServicePanel({ group }: ServicePanelProps) {
|
||||
return (
|
||||
<div
|
||||
className="service-panel"
|
||||
data-layout={group.layout || "list"}
|
||||
data-model-id={group.id}
|
||||
>
|
||||
<Panel title={group.title}>
|
||||
{group.summary?.length ? (
|
||||
<StatusStrip id={`${group.id}:summary`} items={group.summary} compact />
|
||||
) : null}
|
||||
{group.services.map((service) => (
|
||||
<ServiceRow key={service.id} service={service} />
|
||||
))}
|
||||
</Panel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue