feat(kubernetes): implement Phase 3 - detail views and cluster management
- Add detail views: PodDetail, DeploymentDetail, ServiceDetail, ConfigMapDetail, SecretDetail
- Add cluster management views: ClusterOverview, ClusterDetails
- Add UX components: Hotbar, CommandPalette, Toast, LoadingSpinner
- Add resource management: CreateResourceModal, EditResourceModal
- Add RBAC management: RbacViewer, RbacEditor
- Update index.tsx exports for all new components
- All components pass ESLint, TypeScript, and pass 114 tests
- Build successful
2026-06-07 15:43:20 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { Button } from "@/components/ui";
|
|
|
|
|
import { Settings, Bell, User, Search, Plus, RefreshCw } from "lucide-react";
|
|
|
|
|
import { Badge } from "@/components/ui";
|
|
|
|
|
import { useKubernetesStore } from "@/stores/kubernetesStore";
|
|
|
|
|
import { useStore } from "zustand";
|
|
|
|
|
|
|
|
|
|
interface HotbarProps {
|
|
|
|
|
onRefresh: () => void;
|
|
|
|
|
onAddResource: () => void;
|
|
|
|
|
onSettings: () => void;
|
2026-06-07 22:39:07 +00:00
|
|
|
onNotifications?: () => void;
|
|
|
|
|
notificationCount?: number;
|
feat(kubernetes): implement Phase 3 - detail views and cluster management
- Add detail views: PodDetail, DeploymentDetail, ServiceDetail, ConfigMapDetail, SecretDetail
- Add cluster management views: ClusterOverview, ClusterDetails
- Add UX components: Hotbar, CommandPalette, Toast, LoadingSpinner
- Add resource management: CreateResourceModal, EditResourceModal
- Add RBAC management: RbacViewer, RbacEditor
- Update index.tsx exports for all new components
- All components pass ESLint, TypeScript, and pass 114 tests
- Build successful
2026-06-07 15:43:20 +00:00
|
|
|
}
|
|
|
|
|
|
2026-06-07 22:39:07 +00:00
|
|
|
export function Hotbar({ onRefresh, onAddResource, onSettings, onNotifications, notificationCount = 0 }: HotbarProps) {
|
feat(kubernetes): implement Phase 3 - detail views and cluster management
- Add detail views: PodDetail, DeploymentDetail, ServiceDetail, ConfigMapDetail, SecretDetail
- Add cluster management views: ClusterOverview, ClusterDetails
- Add UX components: Hotbar, CommandPalette, Toast, LoadingSpinner
- Add resource management: CreateResourceModal, EditResourceModal
- Add RBAC management: RbacViewer, RbacEditor
- Update index.tsx exports for all new components
- All components pass ESLint, TypeScript, and pass 114 tests
- Build successful
2026-06-07 15:43:20 +00:00
|
|
|
const clusters = useStore(useKubernetesStore, (state) => state.clusters);
|
|
|
|
|
const selectedClusterId = useStore(useKubernetesStore, (state) => state.selectedClusterId);
|
|
|
|
|
const selectedCluster = clusters.find((c: { id: string }) => c.id === selectedClusterId);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="h-12 bg-background border-b flex items-center justify-between px-4">
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<div className="flex items-center gap-1">
|
|
|
|
|
<Button variant="ghost" size="sm" onClick={onRefresh}>
|
|
|
|
|
<RefreshCw className="w-4 h-4" />
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="ghost" size="sm" onClick={onAddResource}>
|
|
|
|
|
<Plus className="w-4 h-4" />
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="h-6 w-px bg-border mx-2" />
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<Search className="w-4 h-4 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm text-muted-foreground">
|
|
|
|
|
{selectedCluster?.name || "No cluster selected"}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<div className="flex items-center gap-2">
|
2026-06-07 22:39:07 +00:00
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="sm"
|
|
|
|
|
onClick={onNotifications}
|
|
|
|
|
aria-label="Notifications"
|
|
|
|
|
>
|
feat(kubernetes): implement Phase 3 - detail views and cluster management
- Add detail views: PodDetail, DeploymentDetail, ServiceDetail, ConfigMapDetail, SecretDetail
- Add cluster management views: ClusterOverview, ClusterDetails
- Add UX components: Hotbar, CommandPalette, Toast, LoadingSpinner
- Add resource management: CreateResourceModal, EditResourceModal
- Add RBAC management: RbacViewer, RbacEditor
- Update index.tsx exports for all new components
- All components pass ESLint, TypeScript, and pass 114 tests
- Build successful
2026-06-07 15:43:20 +00:00
|
|
|
<Bell className="w-4 h-4" />
|
2026-06-07 22:39:07 +00:00
|
|
|
{notificationCount > 0 && (
|
|
|
|
|
<Badge variant="destructive" className="h-4 w-4 flex items-center justify-center p-0 text-[10px]">
|
|
|
|
|
{notificationCount}
|
|
|
|
|
</Badge>
|
|
|
|
|
)}
|
feat(kubernetes): implement Phase 3 - detail views and cluster management
- Add detail views: PodDetail, DeploymentDetail, ServiceDetail, ConfigMapDetail, SecretDetail
- Add cluster management views: ClusterOverview, ClusterDetails
- Add UX components: Hotbar, CommandPalette, Toast, LoadingSpinner
- Add resource management: CreateResourceModal, EditResourceModal
- Add RBAC management: RbacViewer, RbacEditor
- Update index.tsx exports for all new components
- All components pass ESLint, TypeScript, and pass 114 tests
- Build successful
2026-06-07 15:43:20 +00:00
|
|
|
</Button>
|
|
|
|
|
<Button variant="ghost" size="sm" onClick={onSettings}>
|
|
|
|
|
<Settings className="w-4 h-4" />
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="ghost" size="sm">
|
|
|
|
|
<User className="w-4 h-4" />
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|