Skip to main content

apps/web/components/admin-policy-panel.tsx

Metadata

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>