apps/web/components/admin-policy-panel.tsx
Metadata
- Purpose: Reusable frontend UI component used by web routes.
- Domain:
applications - Language:
tsx - Bytes: 2479
- Lines: 58
- Content hash (short):
da259141 - Source (start): apps/web/components/admin-policy-panel.tsx:1
- Source (end): apps/web/components/admin-policy-panel.tsx:58
Indexed Symbols
AdminPolicyPanel(line 8, function) - Implements admin policy panel for module behavior.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
import { Card } from "@anchor/ui";
import { updateWorkspacePolicyAction } from "../app/actions/operator-actions";
type AdminPolicyPanelProps = {
workspaceId: string;
};
export function AdminPolicyPanel({ workspaceId }: AdminPolicyPanelProps) {
return (
<Card className="mb-4">
<h2 className="text-xl font-semibold text-[var(--ink-base)]">Structured Runtime Policy</h2>
<p className="mt-2 text-sm text-[var(--ink-muted)]">
Update telemetry, approval, and automation retry behavior without editing raw JSON.
</p>
<form action={updateWorkspacePolicyAction} className="mt-4 grid gap-3 md:grid-cols-4">
<input type="hidden" name="workspaceId" value={workspaceId} />
<input type="hidden" name="returnPath" value="/admin/settings" />
<label className="grid gap-1 text-sm text-[var(--ink-muted)]">
Telemetry Mode
<select name="telemetryMode" defaultValue="live" className="rounded-xl border border-[var(--stroke-subtle)] bg-white px-3 py-2 text-sm text-[var(--ink-base)]">
<option value="live">Live</option>
<option value="dry_run">Dry Run</option>
<option value="paused">Paused</option>
</select>
</label>