chore: 同步 embed 静态资源(base=/ 修复深链白屏)
二进制 / K8s embed 模式 go:embed 使用 backend/static
This commit is contained in:
1 parent
992e9b2ecc
commit
921b44d6a4
155 files changed
+187
-184
No files matched your search
@@ -0,0 +1 @@
|
||||
import{i as Me,al as Ge,j as e,L as H,Q as ae,V as U,w as le,au as Y,av as Ee,r as o,B as v,D as Be,a as Le,b as Te,c as Fe,C as Z,t as N,m as We,N as he,S as ye,G as ue,W as Oe,o as de,f as Qe}from"./index-BTQygws6.js";import{I as f}from"./input-C6mE-wO9.js";import{p as T}from"./pipeline-CgOYDc3n.js";import{u as Je,q as Ie,b as Ke}from"./unwrap-Bv0ReG-f.js";import{u as ce}from"./useMutation-C9fIiouP.js";import{C as He,a as Ue}from"./card-D0oz3NII.js";import{B as D}from"./badge-BsIZhz7S.js";import{C as ee}from"./circle-x-CYoA2i-_.js";import{B as Xe}from"./box-CHjdSJYg.js";import{C as me}from"./circle-stop-CJ1jBDRa.js";import{F as _e}from"./file-text-B8e3PkIb.js";import{A as K}from"./arrow-right-QQqkjfZb.js";import{P as Ye}from"./play-BAPO-6Xq.js";import{H as Ze}from"./history-0zIbY_Ux.js";import{T as $e}from"./trash-2-5oUve9eW.js";import{T as ea}from"./textarea-DDxE7TMs.js";import{L as h}from"./label-8e-EC7mH.js";import{S as se,a as te,b as oe,c as re,d as L}from"./select-pPlmgAjn.js";import{d as aa}from"./config-CxWPmf4g.js";import{c as na}from"./credential-BnmvNrfT.js";import{T as sa}from"./tag-CNIwF8sk.js";import{P as xe}from"./plus-DOS6OUrq.js";import{S as ta}from"./search-BDsFve6h.js";import{L as oa}from"./layers-dRuVhMxP.js";import{C as ra}from"./code-BxEc8JAj.js";import"./index-WFeZT6kc.js";import"./chevron-up-Z8QjN8G2.js";const ia=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],la=Me("package",ia);const pa=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ca=Me("workflow",pa);function da(n={page:1,page_size:100}){return Je({queryKey:Ie.pipelines(n),queryFn:async()=>{const p=await T.getPipelines(n);return Ke(p)},staleTime:2e4})}function ma(){const n=Ge(),p=()=>n.invalidateQueries({queryKey:["pipelines"]}),P=ce({mutationFn:d=>T.triggerByCode(d),onSuccess:p}),b=ce({mutationFn:d=>T.deletePipeline(d),onSuccess:p}),j=ce({mutationFn:({code:d,runId:y})=>T.stopRunByCode(d,y)});return{triggerMutation:P,deleteMutation:b,stopRunMutation:j,invalidate:p}}function xa(n){return n.toLowerCase().replace(/[^a-z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||`pipeline-${Date.now()}`}function ga(n){switch(n){case"success":return e.jsxs(D,{"code-path":"src/components/deploy/pipeline-helpers.tsx:49:9",variant:"outline",className:"border-emerald-500/30 text-emerald-400 bg-emerald-500/10",children:[e.jsx(ae,{"code-path":"src/components/deploy/pipeline-helpers.tsx:50:11",className:"h-3 w-3 mr-1"}),"成功"]});case"failed":return e.jsxs(D,{"code-path":"src/components/deploy/pipeline-helpers.tsx:56:9",variant:"outline",className:"border-red-500/30 text-red-400 bg-red-500/10",children:[e.jsx(ee,{"code-path":"src/components/deploy/pipeline-helpers.tsx:57:11",className:"h-3 w-3 mr-1"}),"失败"]});case"running":return e.jsxs(D,{"code-path":"src/components/deploy/pipeline-helpers.tsx:63:9",variant:"outline",className:"border-blue-500/30 text-blue-400 bg-blue-500/10 animate-pulse",children:[e.jsx(H,{"code-path":"src/components/deploy/pipeline-helpers.tsx:64:11",className:"h-3 w-3 mr-1 animate-spin"}),"运行中"]});default:return e.jsx(D,{"code-path":"src/components/deploy/pipeline-helpers.tsx:70:9",variant:"outline",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)]",children:"从未运行"})}}const ie=[{key:"checkout",label:"代码检出",icon:U,color:"#6366F1",order:1,needs:["repo"],desc:"从 Git 仓库拉取代码"},{key:"build",label:"构建",icon:Xe,color:"#F59E0B",order:2,needs:[],desc:"编译/打包项目"},{key:"test",label:"测试",icon:ae,color:"#10B981",order:3,needs:[],desc:"运行单元/集成测试"},{key:"image",label:"镜像打包",icon:le,color:"#06B6D4",order:4,needs:["registry"],desc:"Docker 构建 & 推送"},{key:"deploy",label:"部署",icon:Y,color:"#EF4444",order:5,needs:[],desc:"部署到目标环境"},{key:"verify",label:"验证",icon:Ee,color:"#3B82F6",order:6,needs:[],desc:"部署后健康检查"}].sort((n,p)=>n.order-p.order);function ge(n){if(!n)return"-";if(n<60)return`${n}s`;const p=Math.floor(n/60),P=n%60;return P>0?`${p}分${P}秒`:`${p}分`}function ha(n){if(!n)return[];try{const p=typeof n=="string"?JSON.parse(n):n;return Array.isArray(p)?p:[]}catch{return[]}}function ya({pipeline:n}){const[p,P]=o.useState(null),[b,j]=o.useState(!1),d=n.code||n.id,y=async()=>{if(d){j(!0);try{const l=await T.getQueue(d);P(l?.data||l)}catch{P(null)}finally{j(!1)}}};o.useEffect(()=>{y();const l=setInterval(y,1e4);return()=>clearInterval(l)},[d]);const M=async l=>{try{await T.removeFromQueue(d,l),N.success("已取消"),y()}catch{N.error("取消失败")}},w=p?.running||0,u=p?.queued||0,C=p?.queue_ids||[],R=n.max_executors||2Line truncated
|
||||
Reference in new issue
Block a user