diff --git a/src/Web/autopilot-monitor-web/app/admin/settings/[section]/page.tsx b/src/Web/autopilot-monitor-web/app/admin/settings/[section]/page.tsx index 46ddc907..6406061d 100644 --- a/src/Web/autopilot-monitor-web/app/admin/settings/[section]/page.tsx +++ b/src/Web/autopilot-monitor-web/app/admin/settings/[section]/page.tsx @@ -17,7 +17,7 @@ const SECTION_COMPONENTS: Record = { "diagnostics-log-paths": SectionDiagnosticsLogPaths, "mcp-users": SectionMcpUsers, "delegated-admins": SectionDelegatedAdmins, - "tenant-templates": SectionTenantTemplates, + "tenant-groups": SectionTenantTemplates, "config-reseed": SectionConfigReseed, "usage-plans": SectionUsagePlans, "alerts": SectionAlerts, diff --git a/src/Web/autopilot-monitor-web/app/admin/settings/sections/SectionTenantTemplates.tsx b/src/Web/autopilot-monitor-web/app/admin/settings/sections/SectionTenantTemplates.tsx index c4cab82a..17cd83c3 100644 --- a/src/Web/autopilot-monitor-web/app/admin/settings/sections/SectionTenantTemplates.tsx +++ b/src/Web/autopilot-monitor-web/app/admin/settings/sections/SectionTenantTemplates.tsx @@ -77,11 +77,11 @@ export function SectionTenantTemplates() { try { setLoading(true); const response = await authenticatedFetch(api.tenantTemplates.list(), getAccessToken); - if (!response.ok) throw new Error(`Failed to load templates: ${response.statusText}`); + if (!response.ok) throw new Error(`Failed to load groups: ${response.statusText}`); const data = await response.json(); setTemplates(data.templates ?? []); } catch (err) { - handleError(err, "Failed to load templates"); + handleError(err, "Failed to load groups"); } finally { setLoading(false); } @@ -126,14 +126,14 @@ export function SectionTenantTemplates() { const name = newName.trim(); if (!name) return; setCreating(true); - const ok = await mutate("create", api.tenantTemplates.create(), "POST", { name }, `Created template "${name}".`); + const ok = await mutate("create", api.tenantTemplates.create(), "POST", { name }, `Created group "${name}".`); setCreating(false); if (ok) setNewName(""); }, [newName, mutate]); const handleRename = useCallback( async (t: TenantTemplate) => { - const name = prompt("Rename template:", t.name)?.trim(); + const name = prompt("Rename group:", t.name)?.trim(); if (!name || name === t.name) return; await mutate(`rename:${t.templateId}`, api.tenantTemplates.rename(t.templateId), "PATCH", { name }, `Renamed to "${name}".`); }, @@ -143,7 +143,7 @@ export function SectionTenantTemplates() { const handleDeleteTemplate = useCallback( async (t: TenantTemplate) => { const extra = t.assigneeCount > 0 ? ` ${t.assigneeCount} assignee(s) will lose this access.` : ""; - if (!confirm(`Delete template "${t.name}"?${extra}`)) return; + if (!confirm(`Delete group "${t.name}"?${extra}`)) return; await mutate(`delete:${t.templateId}`, api.tenantTemplates.remove(t.templateId), "DELETE", undefined, `Deleted "${t.name}".`); }, [mutate], @@ -199,7 +199,7 @@ export function SectionTenantTemplates() { const handleUnassign = useCallback( async (t: TenantTemplate, upn: string) => { - if (!confirm(`Remove ${upn} from "${t.name}"? They lose access to all tenants in this template.`)) return; + if (!confirm(`Remove ${upn} from "${t.name}"? They lose access to all tenants in this group.`)) return; await mutate( `unassign:${t.templateId}:${upn}`, api.tenantTemplates.unassign(t.templateId, upn), @@ -225,10 +225,10 @@ export function SectionTenantTemplates() { -

Tenant Templates (MSP Mode)

+

Tenant Groups (MSP Mode)

- Bundle tenants into a named template, then assign people to the template instead of to each tenant. + Bundle tenants into a named group, then assign people to the group instead of to each tenant. Add a tenant once and every assignee gets it; manage your managed-service team by who is assigned here.

@@ -254,7 +254,7 @@ export function SectionTenantTemplates() { {/* Create form */}
-

New template

+

New group

- Loading templates… + Loading groups…
)} {/* Empty */} {!loading && sorted.length === 0 && (

- No templates yet. Create one above, add tenants to it, then assign your team. + No groups yet. Create one above, add tenants to it, then assign your team.

)} diff --git a/src/Web/autopilot-monitor-web/app/admin/settings/settingsNavSections.ts b/src/Web/autopilot-monitor-web/app/admin/settings/settingsNavSections.ts index ba73e59c..5517aeab 100644 --- a/src/Web/autopilot-monitor-web/app/admin/settings/settingsNavSections.ts +++ b/src/Web/autopilot-monitor-web/app/admin/settings/settingsNavSections.ts @@ -3,7 +3,7 @@ export const SETTINGS_NAV_SECTIONS = [ { id: "diagnostics-log-paths", label: "Diagnostics Log Paths", description: "Global diagnostics log path configuration" }, { id: "mcp-users", label: "MCP Users", description: "Manage AI agent access via MCP" }, { id: "delegated-admins", label: "Delegated Admins", description: "Grant cross-tenant read access (MSP mode)" }, - { id: "tenant-templates", label: "Tenant Templates", description: "Bundle tenants and assign delegated admins (MSP mode)" }, + { id: "tenant-groups", label: "Tenant Groups", description: "Group tenants and assign delegated admins (MSP mode)" }, { id: "config-reseed", label: "Config Reseed", description: "Fetch and reseed rules from GitHub" }, { id: "usage-plans", label: "Usage Plans", description: "Define MCP usage plan tiers and limits" }, { id: "alerts", label: "Alerts", description: "Configure ops event alert rules and notification providers" }, diff --git a/src/Web/autopilot-monitor-web/lib/globalNavConfig.tsx b/src/Web/autopilot-monitor-web/lib/globalNavConfig.tsx index 47405d25..9bdb9267 100644 --- a/src/Web/autopilot-monitor-web/lib/globalNavConfig.tsx +++ b/src/Web/autopilot-monitor-web/lib/globalNavConfig.tsx @@ -283,7 +283,7 @@ export const EXPANDABLE_NAV_GROUPS: ExpandableNavGroup[] = [ { id: "ga-diag-paths", label: "Diagnostics Log Paths", href: "/admin/settings/diagnostics-log-paths" }, { id: "ga-mcp-users", label: "MCP Users", href: "/admin/settings/mcp-users" }, { id: "ga-delegated-admins", label: "Delegated Admins", href: "/admin/settings/delegated-admins" }, - { id: "ga-tenant-templates", label: "Tenant Templates", href: "/admin/settings/tenant-templates" }, + { id: "ga-tenant-groups", label: "Tenant Groups", href: "/admin/settings/tenant-groups" }, { id: "ga-config-reseed", label: "Config Reseed", href: "/admin/settings/config-reseed" }, { id: "ga-usage-plans", label: "Usage Plans", href: "/admin/settings/usage-plans" }, ],