Group server and host details into task sections
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export type ServerSection = 'live' | 'matches' | 'configuration' | 'diagnostics' | 'history';
|
||||
|
||||
/** Legacy URLs still select their original content inside the new section. */
|
||||
export function serverSection(tab: string | null): ServerSection {
|
||||
if (tab === 'matches' || tab === 'history' || tab === 'diagnostics') return tab;
|
||||
if (tab === 'config' || tab === 'inventory' || tab === 'configuration') return 'configuration';
|
||||
if (tab === 'logs') return 'diagnostics';
|
||||
return 'live';
|
||||
}
|
||||
|
||||
export function serverSectionAnchor(tab: string | null): string | null {
|
||||
return tab === 'chat' || tab === 'logs' || tab === 'inventory' ? tab : null;
|
||||
}
|
||||
Reference in New Issue
Block a user