Files
jerapah-flow/packages/web/src/components/HttpProcessCard.jsx
T
nsrbandCursor f9f21052d9 chore: trim distribution clutter and add lint/test tooling
Keep only example workflows in default/, move site-specific YAMLs to gitignored local/, remove the duplicate get-current-time plugin install, document personal plugins, clarify PM2 ecosystem usage, add shared Vitest and web ESLint, and extract OpsStatusCard for ops cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 06:30:37 +07:00

47 lines
1.1 KiB
React

import { LuCircleCheck, LuCircleX } from "react-icons/lu";
import { OpsStatusCard } from "./OpsStatusCard.jsx";
export function HttpProcessCard({
httpOnline,
onStart,
onStop,
startPending = false,
stopPending = false,
}) {
return (
<OpsStatusCard
title="HTTP process"
actions={
httpOnline ? (
<button
type="button"
className="btn btn-sm btn-warning"
disabled={stopPending}
onClick={onStop}
>
Stop HTTP
</button>
) : (
<button
type="button"
className="btn btn-sm btn-primary"
disabled={startPending}
onClick={onStart}
>
Start HTTP
</button>
)
}
>
<div className="flex items-center gap-2">
{httpOnline ? (
<LuCircleCheck className="size-6 text-success" aria-hidden />
) : (
<LuCircleX className="size-6 text-error" aria-hidden />
)}
<span>{httpOnline ? "Running" : "Stopped"}</span>
</div>
</OpsStatusCard>
);
}