diff --git a/claude.md b/claude.md index a10ff45..5815aa4 100644 --- a/claude.md +++ b/claude.md @@ -528,7 +528,17 @@ Customer nav is three destinations — Overview, People, Billing. Settings is in | `/monitors`, `/monitors/new`, `/monitors/[id][/edit]` | Checks, uptime, incidents | | `/secrets`, `/secrets/[group]` | Vault | | `/audit` | Audit log | -| `/settings`, `/settings/org`, `/settings/notifications` | Alerts, members, OIDC, channels | +| `/settings`, `/settings/notifications`, `/settings/license` | Members, OIDC, alerts, retention, ESO token · channels · licence | + +**`/settings` is one page, not a section.** Members and single sign-on used to +live at `/settings/instance` with their own sidebar entry; they are now the +**Access** group at the top of `/settings`, above **Monitoring** and +**Integrations**. Splitting "who can sign in" away from "how this instance +behaves" made two half-pages and a nav entry called Instance that no one could +distinguish from Settings. `next.config.ts` keeps a permanent redirect from the +old path. The cards live in `web/components/settings/` rather than in the page, +which is also where the `Field`/`inputClass` pair the three of them share now +lives — one copy instead of the three that existed while they were apart. --- diff --git a/web/app/(app)/settings/instance/page.tsx b/web/app/(app)/settings/instance/page.tsx deleted file mode 100644 index 6db7975..0000000 --- a/web/app/(app)/settings/instance/page.tsx +++ /dev/null @@ -1,439 +0,0 @@ -"use client"; - -import { useEffect, useState } from "react"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { api, auth as authApi, type InstanceUser, type Role } from "@/lib/api"; -import { useAuth } from "@/components/AuthProvider"; -import { Badge, Button, Card, Modal, Table, Tbody, Td, Th, Thead, Tr } from "@/components/ui"; - -const ROLES: Role[] = ["owner", "admin", "member"]; - -const inputClass = - "w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent/50 focus:outline-none focus:ring-1 focus:ring-accent/30"; - -function Field({ label, hint, children }: { label: string; hint?: string; children: React.ReactNode }) { - return ( -
{hint}
} -- People with access to this instance. Owners and admins can manage settings. -
-{(error as Error).message}
- ) : !users || users.length === 0 ? ( -No members yet.
- ) : ( -| Role | -Sign-in | -Last login | -Actions | -|
|---|---|---|---|---|
| - {u.email} - {isSelf && (you)} - | -
- {locked ? (
- |
-
- |
- - {u.last_login ? new Date(u.last_login).toLocaleString() : "Never"} - | -- {managedByHQ ? ( - hqUrl ? ( - - Managed in Vantage HQ - - ) : ( - Managed in Vantage HQ - ) - ) : ( - !locked && ( - - ) - )} - | -
- Let members sign in with your identity provider. Users are provisioned into this instance on - first sign-in. -
-- Register this redirect URL with your provider: -
-
- {redirectUrl}
-
-
- - Instance settings are available to owners and admins only. Ask an administrator if you need - access. -
-- {instance ? `Manage members and sign-in for ${instance.name}.` : "Manage members and sign-in."} -
-{description}
} -{hint}
} -Point your ClusterSecretStore at {readUrl}.
@@ -116,10 +111,10 @@ function SecretsTokenCard({ tokenSet, rotatedAt }: { tokenSet: boolean; rotatedA {token && ( -Copy this token now it will not be shown again.
{token}
+ {token}
@@ -128,7 +123,7 @@ function SecretsTokenCard({ tokenSet, rotatedAt }: { tokenSet: boolean; rotatedA
)}
{tokenSet && Rotating invalidates the previous token. Update the Kubernetes secret afterwards.
} @@ -137,7 +132,7 @@ function SecretsTokenCard({ tokenSet, rotatedAt }: { tokenSet: boolean; rotatedA export default function SettingsPage() { const queryClient = useQueryClient(); - const { isAdmin } = useAuth(); + const { instance, isAdmin } = useAuth(); const { data: settings, isLoading } = useQuery({ queryKey: ["settings"], @@ -179,7 +174,7 @@ export default function SettingsPage() { return (Settings are available to owners and admins only. Ask an administrator if you need access.
Configure monitoring, alerting, and integrations.
++ {instance ? `Members, sign-in and monitoring for ${instance.name}.` : "Members, sign-in and monitoring for this instance."} +
- Webhook, email (SMTP), Discord, Slack, and Telegram destinations are configured under Notification Channels and attached per monitor. -
- +{hint}
} +{(error as Error).message}
+ ) : !users || users.length === 0 ? ( +No members yet.
+ ) : ( +| Role | +Sign-in | +Last login | +Actions | +|
|---|---|---|---|---|
| + {u.email} + {isSelf && (you)} + | +
+ {locked ? (
+ |
+
+ |
+ {u.last_login ? new Date(u.last_login).toLocaleString() : "Never"} | ++ {managedByHQ ? ( + hqUrl ? ( + + Managed in Vantage HQ + + ) : ( + Managed in Vantage HQ + ) + ) : ( + !locked && ( + + ) + )} + | +
Register this redirect URL with your provider:
+{redirectUrl}
+
+ {description}
} +