The tailnet plugin — machines, users, pre-auth keys, access policy and device invites. Moved out of officerdev/platform, where it had lived in plugins/ since the plugin system was built. Until now this code existed in exactly one place: the platform repository. That made "gitignore the plugins directory" impossible to do safely, because untracking it would have left 49 files on a single disk with no remote. This repository is what makes that move safe. Same extraction as plugins/music before it: source only, no history. The platform's history still holds every commit that shaped this, and the SHAs cited across the codebase keep resolving — replaying it here would have created a second, divergent account of the same work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { useHeadscaleSection } from './useHeadscaleSection';
|
|
import { ServersView } from './ServersView';
|
|
import { NodesView } from './NodesView';
|
|
import { UsersView } from './UsersView';
|
|
import { KeysView } from './KeysView';
|
|
import { InvitesView } from './InvitesView';
|
|
import { PolicyView } from './PolicyView';
|
|
import { DiagnosticsView } from './DiagnosticsView';
|
|
import { ConsoleView } from './ConsoleView';
|
|
|
|
// Right panel of the /headscale workspace — renders the section named by the URL.
|
|
//
|
|
// Every section except `servers` acts on whichever server is active; each handles the "none selected" case
|
|
// itself through ViewShell, so there is no gating to do here.
|
|
|
|
export const HeadscaleView = () => {
|
|
const section = useHeadscaleSection();
|
|
|
|
switch (section) {
|
|
case 'nodes':
|
|
return <NodesView />;
|
|
case 'users':
|
|
return <UsersView />;
|
|
case 'keys':
|
|
return <KeysView />;
|
|
case 'invites':
|
|
return <InvitesView />;
|
|
case 'policy':
|
|
return <PolicyView />;
|
|
case 'diagnostics':
|
|
return <DiagnosticsView />;
|
|
case 'console':
|
|
return <ConsoleView />;
|
|
default:
|
|
return <ServersView />;
|
|
}
|
|
};
|