feat: strip SaaS UI to vendor management dashboard
- Delete EnvironmentsPage, EnvironmentDetailPage, AppDetailPage - Delete EnvironmentTree and DeploymentStatusBadge components - Simplify DashboardPage to show tenant info, license status, server link - Remove environment/app/deployment routes from router - Remove environment section from sidebar, keep dashboard/license/platform - Strip API hooks to tenant/license/me only - Remove environment/app/deployment/observability types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useState } from 'react';
|
||||
import { Outlet, useNavigate } from 'react-router';
|
||||
import {
|
||||
AppShell,
|
||||
@@ -8,7 +7,6 @@ import {
|
||||
import { useAuth } from '../auth/useAuth';
|
||||
import { useScopes } from '../auth/useScopes';
|
||||
import { useOrgStore } from '../auth/useOrganization';
|
||||
import { EnvironmentTree } from './EnvironmentTree';
|
||||
import cameleerLogo from '@cameleer/design-system/assets/cameleer3-logo.svg';
|
||||
|
||||
function CameleerLogo() {
|
||||
@@ -35,19 +33,6 @@ function DashboardIcon() {
|
||||
);
|
||||
}
|
||||
|
||||
function EnvIcon() {
|
||||
return (
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path
|
||||
d="M2 4h12M2 8h12M2 12h12"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function LicenseIcon() {
|
||||
return (
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
@@ -82,11 +67,8 @@ export function Layout() {
|
||||
const scopes = useScopes();
|
||||
const { username } = useOrgStore();
|
||||
|
||||
const [envSectionOpen, setEnvSectionOpen] = useState(true);
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
||||
const sidebar = (
|
||||
<Sidebar collapsed={collapsed} onCollapseToggle={() => setCollapsed((c) => !c)}>
|
||||
<Sidebar collapsed={false} onCollapseToggle={() => {}}>
|
||||
<Sidebar.Header
|
||||
logo={<CameleerLogo />}
|
||||
title="Cameleer SaaS"
|
||||
@@ -103,16 +85,6 @@ export function Layout() {
|
||||
{null}
|
||||
</Sidebar.Section>
|
||||
|
||||
{/* Environments — expandable tree */}
|
||||
<Sidebar.Section
|
||||
icon={<EnvIcon />}
|
||||
label="Environments"
|
||||
open={envSectionOpen}
|
||||
onToggle={() => setEnvSectionOpen((o) => !o)}
|
||||
>
|
||||
<EnvironmentTree />
|
||||
</Sidebar.Section>
|
||||
|
||||
{/* License */}
|
||||
<Sidebar.Section
|
||||
icon={<LicenseIcon />}
|
||||
@@ -136,10 +108,10 @@ export function Layout() {
|
||||
)}
|
||||
|
||||
<Sidebar.Footer>
|
||||
{/* Link to the observability SPA (direct port, not via Traefik prefix) */}
|
||||
{/* Link to the server observability dashboard */}
|
||||
<Sidebar.FooterLink
|
||||
icon={<ObsIcon />}
|
||||
label="View Dashboard"
|
||||
label="Open Server Dashboard"
|
||||
onClick={() => window.open('/server/', '_blank', 'noopener')}
|
||||
/>
|
||||
</Sidebar.Footer>
|
||||
|
||||
Reference in New Issue
Block a user