feat: remove agent audit page and set dashboard as root path
Build and Push CodeReview / build (push) Waiting to run Details

This commit is contained in:
vinland100 2026-01-08 15:11:37 +08:00
parent 0e2a7dfa87
commit e537010dfd
6 changed files with 27 additions and 29 deletions

View File

@ -24,9 +24,9 @@ export interface RouteConfig {
const routes: RouteConfig[] = [
{
name: "Agent审计",
path: "/",
path: "/agent-audit",
element: <AgentAudit />,
visible: true,
visible: false,
},
{
name: "Agent审计任务",
@ -36,7 +36,7 @@ const routes: RouteConfig[] = [
},
{
name: "仪表盘",
path: "/dashboard",
path: "/",
element: <Dashboard />,
visible: true,
},

View File

@ -29,8 +29,8 @@ import routes from "@/app/routes";
// Icon mapping for routes with consistent sizing
const routeIcons: Record<string, React.ReactNode> = {
"/": <Bot className="w-5 h-5" />,
"/dashboard": <LayoutDashboard className="w-5 h-5" />,
"/": <LayoutDashboard className="w-5 h-5" />,
"/agent-audit": <Bot className="w-5 h-5" />,
"/projects": <FolderGit2 className="w-5 h-5" />,
"/instant-analysis": <Zap className="w-5 h-5" />,
"/audit-tasks": <ListTodo className="w-5 h-5" />,

View File

@ -980,7 +980,7 @@ function AgentAuditPageContent() {
{isRunning ? (
<div className="flex flex-col items-center gap-3 p-6">
<Loader2 className="w-6 h-6 animate-spin text-violet-600 dark:text-violet-500" />
<span className="font-mono text-center">INITIALIZING<br/>AGENTS...</span>
<span className="font-mono text-center">INITIALIZING<br />AGENTS...</span>
</div>
) : (
<div className="flex flex-col items-center gap-2 p-6 text-center">

View File

@ -574,7 +574,7 @@ export default function AuditTasks() {
</Button>
)}
{activeTab === "agent" && (
<Button className="cyber-btn-primary h-10" onClick={() => navigate("/")}>
<Button className="cyber-btn-primary h-10" onClick={() => navigate("/agent-audit")}>
<Bot className="w-4 h-4 mr-2" />
Agent审计
</Button>
@ -790,7 +790,7 @@ export default function AuditTasks() {
{searchTerm || statusFilter !== "all" ? '尝试调整搜索条件或筛选器' : '创建第一个Agent审计任务开始智能安全审计'}
</p>
{!searchTerm && statusFilter === "all" && (
<Button className="cyber-btn-primary" onClick={() => navigate("/")}>
<Button className="cyber-btn-primary" onClick={() => navigate("/agent-audit")}>
<Bot className="w-4 h-4 mr-2" />
Agent审计
</Button>

View File

@ -442,8 +442,7 @@ export default function Dashboard() {
}}
>
<div className="flex items-center gap-3">
<div className={`w-8 h-8 rounded-lg flex items-center justify-center ${
task.status === 'completed' ? 'bg-emerald-500/20 text-emerald-400' :
<div className={`w-8 h-8 rounded-lg flex items-center justify-center ${task.status === 'completed' ? 'bg-emerald-500/20 text-emerald-400' :
task.status === 'running' ? 'bg-sky-500/20 text-sky-400' :
'bg-rose-500/20 text-rose-400'
}`}>
@ -595,8 +594,7 @@ export default function Dashboard() {
<Link
key={task.id}
to={`/tasks/${task.id}`}
className={`block p-3 rounded-lg border transition-all ${
task.status === 'completed' ? 'bg-emerald-500/5 border-emerald-500/20 hover:border-emerald-500/40' :
className={`block p-3 rounded-lg border transition-all ${task.status === 'completed' ? 'bg-emerald-500/5 border-emerald-500/20 hover:border-emerald-500/40' :
task.status === 'running' ? 'bg-sky-500/5 border-sky-500/20 hover:border-sky-500/40' :
task.status === 'failed' ? 'bg-rose-500/5 border-rose-500/20 hover:border-rose-500/40' :
'bg-muted/30 border-border hover:border-border'