78 lines
2.8 KiB
TypeScript
78 lines
2.8 KiB
TypeScript
import { Button } from "@astryxdesign/core/Button";
|
|
import { Heading } from "@astryxdesign/core/Heading";
|
|
import { Layout, LayoutContent, LayoutHeader } from "@astryxdesign/core/Layout";
|
|
import { Section } from "@astryxdesign/core/Section";
|
|
import { HStack, VStack } from "@astryxdesign/core/Stack";
|
|
import { Text } from "@astryxdesign/core/Text";
|
|
import type { Area } from "./ShellFrame";
|
|
|
|
type AreaPageProps = {
|
|
area: Exclude<Area, "Composer" | "Runs">;
|
|
onOpenRun: () => void;
|
|
};
|
|
|
|
const copy = {
|
|
Events: {
|
|
heading: "What Archie heard",
|
|
subheading: "Incoming evidence and the work it started.",
|
|
title: "Checkout timeout rate exceeded 5%",
|
|
eyebrow: "Monitoring · 09:38 UTC",
|
|
body: "Checkout timeouts rose after the latest release. Archie authenticated the event, bound it to the production checkout target, and started an investigation run.",
|
|
action: "Open investigation",
|
|
},
|
|
Governance: {
|
|
heading: "Governance",
|
|
subheading: "Policies, autonomy levels and action limits.",
|
|
title: "Production rollback requires approval",
|
|
eyebrow: "Production · Checkout · Rollback",
|
|
body: "The current autonomy level permits read-only investigation. The rollback is reversible, but it changes production. Hard rules and the Timing guard therefore require an operator decision.",
|
|
action: "Review decision",
|
|
},
|
|
Reports: {
|
|
heading: "What Archie delivered",
|
|
subheading: "Outcomes, evidence and the remaining work.",
|
|
title: "Checkout investigation delivered",
|
|
eyebrow: "Operations · Waiting on approval",
|
|
body: "The investigation and evidence are in Operations. No production change has been made. The underlying release defect remains to be confirmed.",
|
|
action: "Open decision trail",
|
|
},
|
|
} as const;
|
|
|
|
export function AreaPage({ area, onOpenRun }: AreaPageProps) {
|
|
const content = copy[area];
|
|
|
|
return (
|
|
<Layout
|
|
height="fill"
|
|
padding={4}
|
|
contentWidth={960}
|
|
header={
|
|
<LayoutHeader padding={4} hasDivider>
|
|
<VStack gap={1}>
|
|
<Heading level={1}>{content.heading}</Heading>
|
|
<Text color="secondary">{content.subheading}</Text>
|
|
</VStack>
|
|
</LayoutHeader>
|
|
}
|
|
content={
|
|
<LayoutContent padding={4}>
|
|
<Section>
|
|
<VStack gap={3}>
|
|
<HStack gap={1} wrap="wrap" vAlign="center">
|
|
<Text size="sm" color="secondary">
|
|
{content.eyebrow}
|
|
</Text>
|
|
</HStack>
|
|
<Heading level={2}>{content.title}</Heading>
|
|
<Text as="p">{content.body}</Text>
|
|
<HStack>
|
|
<Button label={content.action} variant="primary" onClick={onOpenRun} />
|
|
</HStack>
|
|
</VStack>
|
|
</Section>
|
|
</LayoutContent>
|
|
}
|
|
/>
|
|
);
|
|
}
|