fix: 清理 unused-vars 回归(32→0) + 修复 go:embed 编译阻塞
1. ESLint unused-vars 从 32 清零(回归修复) - 删除 14 个文件中未使用的 import(lucide 图标/shadcn 组件/JsonData 类型) - 移除未使用的变量/参数(categoryLabels/updateEntry/onSaved 等) - 涉及: AppRelease/PipelineEditor/KubernetesNodes/AlertCenter/SilenceRulesPanel 等 2. 修复 go:embed all:static 编译阻塞 - 新增 backend/static/.gitkeep 占位文件 - 全新 clone 后 go build ./... 可直接通过(不再依赖先 npm run build) 3. 安装缺失的 npm 依赖 - react-markdown/remark-gfm(AgentMarkdown 组件) - @codemirror/lang-python/@codemirror/legacy-modes(ScriptCodeEditor 组件) 验证: go build✅ | tsc -b✅ | npm build✅(21s) | ESLint any=41 unused=0 | 17/17 集成测试✅
This commit is contained in:
1 parent
471353e3d7
commit
cde7bbe540
23 files changed
+31
-35
No files matched your search
@@ -32,7 +32,6 @@ import { NotifyPolicyTab } from './NotifyPolicyTab';
|
||||
|
||||
import type { UnifiedAlertRule } from '@/api';
|
||||
import type { Contact, ContactGroup } from './alert-center-helpers';
|
||||
import type { JsonData } from '@/types/common';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const AlertCenter: React.FC = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 告警静默规则面板 — 嵌入通知策略 Tab // Logan.Li
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { VolumeX, Plus, RefreshCw, Clock, Calendar, Repeat, Edit, Trash2 } from 'lucide-react';
|
||||
import { VolumeX, Plus, RefreshCw, Edit, Trash2 } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
|
||||
@@ -240,7 +240,7 @@ const AgentTab: React.FC = () => {
|
||||
|
||||
<AgentWizard open={wizardOpen} onOpenChange={setWizardOpen} server={wizardServer}
|
||||
onStart={(id) => { setOperating(prev => new Set(prev).add(id)); }}
|
||||
onInstalled={(id) => { toast.success('Agent 安装任务已提交,后台执行中…'); setWizardOpen(false); fetch(); }}
|
||||
onInstalled={() => { toast.success('Agent 安装任务已提交,后台执行中…'); setWizardOpen(false); fetch(); }}
|
||||
onFailed={(id) => { toast.error('安装失败'); setOperating(prev => { const next = new Set(prev); next.delete(id); return next; }); }} />
|
||||
|
||||
{/* ────────── 批量部署 Agent 对话框 ────────── */}
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Edit,
|
||||
Trash2,
|
||||
Star,
|
||||
RefreshCw,
|
||||
Key,
|
||||
Plug,
|
||||
} from 'lucide-react';
|
||||
|
||||
Reference in new issue
Block a user