feat: complete Loki query, insights, settings and deployment workflows
Add the Loki query UI, access policies, ingress insights, alert and registry settings, and their backend APIs. Include the related Kubernetes deployment and collector updates required by the integrated application. Validated with go test ./..., npm run build, and npm run lint.
This commit is contained in:
1 parent
f9c6c1d826
commit
2d73661dd1
127 files changed
+8117
-2876
No files matched your search
@@ -46,10 +46,10 @@ function SidebarNav({ collapsed, onNavigate }: { collapsed: boolean; onNavigate?
|
||||
onClick={onNavigate}
|
||||
aria-label={item.label}
|
||||
className={cn(
|
||||
'flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all',
|
||||
'relative flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors',
|
||||
isActive
|
||||
? 'bg-primary text-primary-foreground'
|
||||
: 'text-slate-400 hover:bg-slate-800 hover:text-white'
|
||||
? 'bg-sidebar-primary/15 text-sidebar-primary font-semibold before:absolute before:left-0 before:h-5 before:w-0.5 before:rounded-full before:bg-sidebar-primary'
|
||||
: 'text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground'
|
||||
)}
|
||||
title={!collapsed ? item.label : undefined}
|
||||
>
|
||||
@@ -68,15 +68,15 @@ function SidebarNav({ collapsed, onNavigate }: { collapsed: boolean; onNavigate?
|
||||
// 侧栏 Logo 区
|
||||
function SidebarLogo({ collapsed }: { collapsed: boolean }) {
|
||||
return (
|
||||
<div className="h-16 flex items-center px-4 border-b border-slate-700 flex-shrink-0">
|
||||
<div className="h-16 flex items-center px-4 border-b border-sidebar-border flex-shrink-0">
|
||||
{collapsed ? (
|
||||
<div className="w-8 h-8 rounded-lg bg-primary flex items-center justify-center mx-auto">
|
||||
<Activity className="w-5 h-5 text-white" />
|
||||
<div className="w-8 h-8 rounded-lg border border-sidebar-primary/30 bg-sidebar-primary/15 flex items-center justify-center mx-auto">
|
||||
<Activity className="w-5 h-5 text-sidebar-primary" />
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-8 h-8 rounded-lg bg-primary flex items-center justify-center">
|
||||
<Activity className="w-5 h-5 text-white" />
|
||||
<div className="w-8 h-8 rounded-lg border border-sidebar-primary/30 bg-sidebar-primary/15 flex items-center justify-center">
|
||||
<Activity className="w-5 h-5 text-sidebar-primary" />
|
||||
</div>
|
||||
<span className="font-bold text-lg tracking-tight">opsx-loki</span>
|
||||
</div>
|
||||
@@ -162,18 +162,18 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
|
||||
{!isMobile && (
|
||||
<aside
|
||||
className={cn(
|
||||
'bg-slate-900 text-white transition-all duration-300 flex flex-col flex-shrink-0',
|
||||
'bg-sidebar text-sidebar-accent-foreground transition-all duration-300 flex flex-col flex-shrink-0',
|
||||
collapsed ? 'w-16' : 'w-64'
|
||||
)}
|
||||
>
|
||||
<SidebarLogo collapsed={collapsed} />
|
||||
<SidebarNav collapsed={collapsed} />
|
||||
<div className="p-2 border-t border-slate-700 flex-shrink-0">
|
||||
<div className="p-2 border-t border-sidebar-border flex-shrink-0">
|
||||
<button
|
||||
onClick={toggleSidebar}
|
||||
aria-label={collapsed ? '展开菜单' : '收起菜单'}
|
||||
title={collapsed ? '展开菜单' : '收起菜单'}
|
||||
className="flex items-center justify-center w-full py-2.5 rounded-lg text-slate-400 hover:bg-slate-800 hover:text-white transition-all"
|
||||
className="flex items-center justify-center w-full py-2.5 rounded-lg text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground transition-colors"
|
||||
>
|
||||
{collapsed ? (
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
@@ -188,7 +188,7 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
|
||||
{/* 移动端抽屉侧栏 */}
|
||||
{isMobile && (
|
||||
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
|
||||
<SheetContent side="left" className="bg-slate-900 text-white border-none p-0 w-72">
|
||||
<SheetContent side="left" className="bg-sidebar text-sidebar-accent-foreground border-none p-0 w-72">
|
||||
<SheetHeader className="sr-only">
|
||||
<SheetTitle className="text-white">opsx-loki 导航</SheetTitle>
|
||||
</SheetHeader>
|
||||
|
||||
Reference in new issue
Block a user