chore: 重新编译前端产物(补装CodeMirror依赖)

This commit is contained in:
attacker committed 2026-06-26 23:29:08 +08:00
1 parent 23e9e3da62
commit 4e384ca401
115 files changed
+147 -147

No files matched your search

@@ -0,0 +1 @@
import{j as e,r as a}from"./vendor-codemirror-B1SGo4xl.js";import{J as ct,D as K,a as Q,b as V,c as U,d as H,e as ie,B as m,t as d,f as Oe}from"./index-Dungj95X.js";import{I as _}from"./input-CXoUQQLm.js";import{B as A}from"./badge-CGJlVD3L.js";import{C as W,a as J,b as Te,c as _e}from"./card-BIfzBCEy.js";import{S as at}from"./stat-strip-BSQFwFzG.js";import{S as ne,a as se,b as oe,c as ce,d as T}from"./select-CiTqGGhE.js";import{T as lt,a as it,b as F,c as B}from"./tabs-D87nAyJR.js";import{S as Le}from"./switch-Bxiq4EHp.js";import{a as R}from"./alert-v1WaPeEX.js";import{a as E}from"./alert-center-Dr8niqD0.js";import{u as ze,q as ae,b as Ge,a as mt}from"./unwrap-DPwG25JA.js";import{u as $}from"./useMutation-BkCR1EeO.js";import{a as Ce}from"./agent-CZzlLHxR.js";import{I as dt,l as Me,ab as pt,aZ as le,y as $e,U as xt,a4 as ht,w as Ie,f as ut,R as te,P as re,b as gt,a_ as jt,aB as Ct,aJ as ft,T as vt,S as At,x as Nt,ao as yt}from"./vendor-icons-DmqcWdzX.js";import{L as j}from"./label-CMpUoC87.js";import{A as bt}from"./AlertRuleDialog-BmYLySxp.js";import{T as wt}from"./textarea-BxfjmLq5.js";import"./index-5FEebgvX.js";function St(t){return{id:String(t.id),title:t.rule_name||t.title||`告警 #${t.id}`,description:t.message||t.description||"",severity:t.severity||"info",status:t.status||"firing",source:t.target||t.source||"",service:t.service||"",metric:t.metric||"",value:t.value||0,threshold:t.threshold||0,startedAt:t.started_at||t.startedAt||t.created_at||new Date().toISOString(),resolvedAt:t.resolved_at||t.resolvedAt,labels:typeof t.labels=="string"?(()=>{try{return JSON.parse(t.labels||"{}")}catch{return{}}})():t.labels||{},annotations:typeof t.annotations=="string"?(()=>{try{return JSON.parse(t.annotations||"{}")}catch{return{}}})():t.annotations||{}}}function fe(t){switch(t){case"critical":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:107:14",variant:"destructive",className:"gap-1",children:[e.jsx(pt,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:107:61",className:"w-3 h-3"}),"严重"]});case"warning":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:109:14",variant:"default",className:"bg-orange-500 gap-1",children:[e.jsx(Me,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:109:71",className:"w-3 h-3"}),"警告"]});case"info":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:111:14",variant:"default",className:"bg-blue-500 gap-1",children:[e.jsx(dt,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:111:69",className:"w-3 h-3"}),"信息"]});default:return e.jsx(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:113:14",variant:"secondary",children:"未知"})}}function Dt(t){switch(t){case"firing":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:121:14",variant:"destructive",className:"gap-1 animate-pulse",children:[e.jsx(ht,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:121:75",className:"w-3 h-3"}),"触发中"]});case"acknowledged":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:123:14",variant:"default",className:"bg-yellow-500 gap-1",children:[e.jsx(xt,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:123:71",className:"w-3 h-3"}),"已确认"]});case"resolved":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:125:14",variant:"default",className:"bg-green-500 gap-1",children:[e.jsx($e,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:125:70",className:"w-3 h-3"}),"已解决"]});case"suppressed":return e.jsxs(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:127:14",variant:"secondary",className:"gap-1",children:[e.jsx(le,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:127:59",className:"w-3 h-3"}),"已静默"]});default:return e.jsx(A,{"code-path":"src/components/monitor/alert-center/alert-center-helpers.tsx:129:14",variant:"secondary",children:"未知"})}}function kt(t){return{dingtalk:"钉钉",wechat:"企业微信",feishu:"飞书",email:"邮件",sms:"短信",webhook:"Webhook"}[t]||t}function Tt(t){return{firing:t.filter(s=>s.status==="firing").length,critical:t.filter(s=>s.severity==="critical"&&s.status==="firing").length,warning:t.filter(s=>s.severity==="warning"&&s.status==="firing").length,resolved:t.filter(s=>s.status==="resolved").length}}function _t(){return ze({queryKey:ae.agentAlertRules(),queryFn:async()=>{const t=await Ce.listRules();return Ge(t).map(n=>({id:n.id,name:String(n.name||""),description:`${n.metric} ${n.operator} ${n.threshold}%`,enabled:!!n.enabled,severity:"warning",type:String(n.metric||""),hostname:String(n.hostname||"全部主机"),threshold:Number(n.threshold||0)}))},staleTime:3e4})}function Rt(Line truncated