Initial curated ServiceMap source from 7a0a61232d05ba9097432abef6f7f4102a64d0b8
This commit is contained in:
commit
105251b9c8
96 files changed
+23587
No files matched your search
@@ -0,0 +1,77 @@
|
||||
export const demoWalkthroughSteps = [
|
||||
{
|
||||
title: "See the infrastructure",
|
||||
description:
|
||||
"Start with the semantic domain landscape: Edge, Application and Data.",
|
||||
},
|
||||
{
|
||||
title: "Follow the data layer",
|
||||
description:
|
||||
"Open Data Platform to compare PostgreSQL with its healthy Redis sibling.",
|
||||
},
|
||||
{
|
||||
title: "Trace the impact",
|
||||
description:
|
||||
"Follow the dependency path from the unavailable database to affected applications.",
|
||||
},
|
||||
{
|
||||
title: "Inspect the root cause",
|
||||
description:
|
||||
"Review PostgreSQL direct health, effective health, probe history and downstream impact.",
|
||||
},
|
||||
] as const;
|
||||
|
||||
type DemoWalkthroughProps = {
|
||||
step: number;
|
||||
affectedCount: number;
|
||||
busy: boolean;
|
||||
onStepChange: (step: number) => void;
|
||||
onExit: () => void;
|
||||
};
|
||||
|
||||
export function DemoWalkthrough({
|
||||
step,
|
||||
affectedCount,
|
||||
busy,
|
||||
onStepChange,
|
||||
onExit,
|
||||
}: DemoWalkthroughProps) {
|
||||
const current = demoWalkthroughSteps[step] ?? demoWalkthroughSteps[0];
|
||||
return (
|
||||
<section className="demo-walkthrough" aria-label="Demo walkthrough">
|
||||
<div className="demo-walkthrough-copy">
|
||||
<span className="eyebrow">
|
||||
Demo walkthrough · {step + 1} / {demoWalkthroughSteps.length}
|
||||
</span>
|
||||
<strong>{current.title}</strong>
|
||||
<p>
|
||||
{current.description} PostgreSQL is the likely root cause affecting{" "}
|
||||
{affectedCount} downstream services.
|
||||
</p>
|
||||
</div>
|
||||
<div className="demo-walkthrough-actions">
|
||||
<button
|
||||
className="ghost"
|
||||
onClick={() => onStepChange(Math.max(0, step - 1))}
|
||||
disabled={step === 0 || busy}
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
className="ghost"
|
||||
onClick={() =>
|
||||
onStepChange(
|
||||
step === demoWalkthroughSteps.length - 1 ? 0 : step + 1,
|
||||
)
|
||||
}
|
||||
disabled={busy}
|
||||
>
|
||||
{step === demoWalkthroughSteps.length - 1 ? "Restart" : "Next"}
|
||||
</button>
|
||||
<button onClick={onExit} disabled={busy}>
|
||||
Exit demo
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user