PageSourceSearch

https://hiiiid-ispace1.hf.space/assets/ResourceOpsAppSystemTopologyPage-2MmfuFBg.js

js hiiiid-ispace1.hf.space collected 2026-10-03 16:57:57 UTC 14,505 bytes, 1 lines download raw bytes

1import{d as w,v as D,f as n,z as l,L as s,H as t,y as d,a5 as r,G as h,F as u,A as v,r as y}from"./vendor-vue-DHGubi9Q.js";const O={class:"space-y-6"},R={class:"flex items-center justify-between"},A={class:"flex items-center gap-3"},I={class:"text-xl font-semibold"},M={key:0,class:"text-sm text-gray-600"},H={key:0,class:"text-sm text-gray-500"},j={key:0,class:"grid grid-cols-4 gap-4"},F={class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},T={class:"text-2xl font-bold text-blue-600"},$={class:"text-sm text-blue-800"},B={class:"bg-purple-50 border border-purple-200 rounded-lg p-4"},P={class:"text-2xl font-bold text-purple-600"},V={class:"text-sm text-purple-800"},z={class:"bg-green-50 border border-green-200 rounded-lg p-4"},L={class:"text-2xl font-bold text-green-600"},G={class:"text-sm text-green-800"},K={class:"bg-orange-50 border border-orange-200 rounded-lg p-4"},W={class:"text-2xl font-bold text-orange-600"},q={class:"text-sm text-orange-800"},J={key:1,class:"border-b"},Q={class:"flex gap-4"},U={class:"ml-1 px-2 py-0.5 text-xs bg-gray-100 rounded-full"},X={class:"ml-1 px-2 py-0.5 text-xs bg-gray-100 rounded-full"},Y={class:"ml-1 px-2 py-0.5 text-xs bg-gray-100 rounded-full"},Z={key:2},ss={key:0,class:"space-y-6"},ts={class:"border rounded-lg p-6"},es={class:"text-lg font-semibold mb-4"},os={class:"grid grid-cols-2 gap-4 text-sm"},as={class:"text-gray-600"},ns={class:"ml-2"},ls={class:"text-gray-600"},ds={class:"ml-2"},is={class:"text-gray-600"},cs={class:"ml-2 font-mono"},rs={class:"text-gray-600"},_s={class:"ml-2"},ps={class:"text-gray-600"},us={class:"ml-2"},vs={class:"text-gray-600"},xs={class:"ml-2"},hs={class:"col-span-2"},ys={class:"text-gray-600"},gs={class:"ml-2"},ms={class:"border rounded-lg p-6"},bs={class:"text-lg font-semibold mb-4"},fs={class:"grid grid-cols-3 gap-4"},ks={class:"text-center"},Cs={class:"text-3xl font-bold text-blue-600"},Ns={class:"text-sm text-gray-600 mt-1"},Ss={class:"text-center"},Es={class:"text-3xl font-bold text-purple-600"},ws={class:"text-sm text-gray-600 mt-1"},Ds={class:"text-center"},Os={class:"text-3xl font-bold text-green-600"},Rs={class:"text-sm text-gray-600 mt-1"},As={key:1,class:"space-y-4"},Is={key:0,class:"text-center py-12 text-gray-500"},Ms={class:"flex items-start justify-between mb-3"},Hs={class:"font-semibold"},js={key:0,class:"text-sm text-gray-600"},Fs={class:"grid grid-cols-2 gap-3 text-sm"},Ts={class:"text-gray-600"},$s={class:"ml-2 font-mono"},Bs={class:"text-gray-600"},Ps={class:"ml-2"},Vs={class:"text-gray-600"},zs={class:"ml-2"},Ls={class:"text-gray-600"},Gs={class:"ml-2"},Ks={key:0,class:"col-span-2"},Ws={class:"text-gray-600"},qs=["href"],Js={key:1,class:"col-span-2"},Qs={class:"text-gray-600"},Us={class:"ml-2"},Xs={key:2,class:"space-y-4"},Ys={key:0,class:"text-center py-12 text-gray-500"},Zs={class:"border rounded overflow-hidden"},st={class:"w-full text-sm"},tt={class:"bg-gray-50"},et={class:"px-4 py-2 text-left"},ot={class:"px-4 py-2 text-left"},at={class:"px-4 py-2 text-left"},nt={class:"px-4 py-2 text-left"},lt={class:"px-4 py-2 text-left"},dt={class:"px-4 py-2"},it={class:"px-2 py-0.5 text-xs bg-blue-100 text-blue-800 rounded"},ct={class:"px-4 py-2 font-mono text-xs"},rt={class:"px-4 py-2"},_t={class:"px-4 py-2"},pt={class:"px-4 py-2 text-gray-600"},ut={key:3,class:"space-y-4"},vt={key:0,class:"text-center py-12 text-gray-500"},xt={class:"flex items-start justify-between mb-3"},ht={class:"font-semibold"},yt={key:0,class:"text-sm text-gray-600 font-mono"},gt={class:"grid grid-cols-3 gap-3 text-sm"},mt={class:"text-gray-600"},bt={class:"ml-2"},ft={class:"text-gray-600"},kt={class:"ml-2"},Ct={class:"text-gray-600"},Nt={class:"ml-2"},St={key:0,class:"col-span-3"},Et={class:"text-gray-600"},wt={class:"ml-2 font-mono"},Dt={key:1,class:"col-span-3"},Ot={class:"text-gray-600"},Rt={class:"ml-2"},At={key:4,class:"space-y-4"},It={key:0,class:"text-center py-12 text-gray-500"},Mt={key:1,class:"border rounded-lg p-6"},Ht={class:"text-lg font-semibold mb-4"},jt={class:"grid grid-cols-2 gap-4 text-sm"},Ft={class:"text-gray-600"},Tt={class:"ml-2"},$t={class:"text-gray-600"},Bt={class:"ml-2"},Pt={class:"text-gray-600"},Vt={class:"ml-2"},zt={class:"text-gray-600"},Lt={class:"ml-2"}
1,Gt={key:5,class:"space-y-6"},Kt={class:"border rounded-lg p-6"},Wt={class:"text-lg font-semibold mb-4"},qt={key:0,class:"text-center py-8 text-gray-500"},Jt={key:1,class:"space-y-3"},Qt={class:"flex items-center justify-between"},Ut={class:"font-semibold"},Xt={class:"text-sm text-gray-600 font-mono"},Yt={class:"border rounded-lg p-6"},Zt={class:"text-lg font-semibold mb-4"},se={key:0,class:"text-center py-8 text-gray-500"},te={key:1,class:"space-y-3"},ee={class:"flex items-center justify-between"},oe={class:"font-semibold"},ae={class:"text-sm text-gray-600"},le=w({__name:"ResourceOpsAppSystemTopologyPage",props:{locale:{},appSystemId:{}},emits:["back"],setup(C,{emit:N}){const g=C,S=N,a=y(null),x=y(!1),i=y("overview"),o=(_,c)=>g.locale==="zh"?_:c;async function E(){x.value=!0;try{const _=await apiFetch(`/api/resource-ops/cmdb/app-systems/${g.appSystemId}/topology`,{method:"GET"});a.value=_}catch(_){console.error("Failed to load app system topology:",_)}finally{x.value=!1}}function p(_){return{active:"bg-green-100 text-green-800",inactive:"bg-gray-100 text-gray-600",deployed:"bg-blue-100 text-blue-800",running:"bg-green-100 text-green-800",stopped:"bg-red-100 text-red-600"}[_]||"bg-gray-100 text-gray-600"}return D(()=>{E()}),(_,c)=>{var m,b,f,k;return n(),l("div",O,[s("div",R,[s("div",A,[s("button",{onClick:c[0]||(c[0]=e=>S("back")),class:"px-3 py-1.5 text-sm rounded border hover:bg-gray-50"}," ← "+t(o("返回","Back")),1),s("div",null,[s("h2",I,t(((b=(m=a.value)==null?void 0:m.app_system)==null?void 0:b.NAME)||o("应用系统详情","App System Detail")),1),(k=(f=a.value)==null?void 0:f.app_system)!=null&&k.CHINESENAME?(n(),l("p",M,t(a.value.app_system.CHINESENAME),1)):d("",!0)])]),x.value?(n(),l("div",H,t(o("加载中...","Loading...")),1)):d("",!0)]),a.value?(n(),l("div",j,[s("div",F,[s("div",T,t(a.value.services.length),1),s("div",$,t(o("应用服务","Services")),1)]),s("div",B,[s("div",P,t(a.value.identifiers.length),1),s("div",V,t(o("应用标识","Identifiers")),1)]),s("div",z,[s("div",L,t(a.value.container_services.length),1),s("div",G,t(o("容器服务","Containers")),1)]),s("div",K,[s("div",W,t(a.value.hf_spaces.length+a.value.database_connections.length),1),s("div",q,t(o("运行资源","Runtime Resources")),1)])])):d("",!0),a.value?(n(),l("div",J,[s("div",Q,[s("button",{onClick:c[1]||(c[1]=e=>i.value="overview"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="overview"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},t(o("概览","Overview")),3),s("button",{onClick:c[2]||(c[2]=e=>i.value="services"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="services"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},[h(t(o("应用服务","Services"))+" ",1),s("span",U,t(a.value.services.length),1)],2),s("button",{onClick:c[3]||(c[3]=e=>i.value="identifiers"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="identifiers"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},[h(t(o("应用标识","Identifiers"))+" ",1),s("span",X,t(a.value.identifiers.length),1)],2),s("button",{onClick:c[4]||(c[4]=e=>i.value="containers"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="containers"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},[h(t(o("容器服务","Containers"))+" ",1),s("span",Y,t(a.value.container_services.length),1)],2),s("button",{onClick:c[5]||(c[5]=e=>i.value="devops"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="devops"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},t(o("DevOps","DevOps")),3),s("button",{onClick:c[6]||(c[6]=e=>i.value="runtime"),class:r(["px-4 py-2 text-sm border-b-2 transition-colors",i.value==="runtime"?"border-blue-600 text-blue-600 font-medium":"border-transparent text-gray-600 hover:text-gray-900"])},t(o("运行资源","Runtime")),3)])])):d("",!0),a.value?(n(),l("div",Z,[i.value==="overview"?(n(),l("div",ss,[s("div",ts,[s("h3",es,t(o("基本信息","Basic Information")),1),s("div",os,[s("div",null,[s("span",as,t(o("系统名称","System Name"))+":",1),s("span",ns,t(a.value.app_system.NAME||"-"),1)]),s("div",null,[s("span",ls,t(o("中文名称","Chinese Name"))+":",1),s("span",ds,t(a.value.app_system.CHINESENAME||"-"),1)]),s("div",null,[s("span",is,t(o("系统编码","System Code"))+":",1),s("span",cs,t(a.value.app_system.CODE||"-"),1)]),s("div",null,[s("span",rs,t(o("产品","Product"))+":",1),s("span",_s,t(a.value.app_system.product_name||"-"),1)]),s("div",null,[s("span",ps,t(o("负责人","Owner"))+":",1),s("span",us,t(a.value.app_system.OWNERID||"-"),1)]),s("div",null,[s("span",vs,t(o("域名","Domain"))+":",1),s("span",xs,t(a.value.app_system.DOMAIN||"-"),1)]),s("div",hs,[s("span",ys,t(o("备注","Remark"))+":",1),s("span",gs,t(a.value.app_system.REMARK||"-"),1)])])]),s("div",ms,[s("h3",bs,t(o("资源统计","Resource Summary")),1),s("div",fs,[s("div",ks,[s("div",Cs,t(a.value.summary.service_count||0),1),s("div",Ns,t(o("应用服务","Services")),1)]),s("div",Ss,[s("div",Es,t(a.value.summary.identifier_count||0),1),s("div",ws,t(o("应用标识","Identifiers")),1)]),s("div",Ds,[s("div",Os,t(a.value.summary.container_
1count||0),1),s("div",Rs,t(o("容器服务","Containers")),1)])])])])):d("",!0),i.value==="services"?(n(),l("div",As,[a.value.services.length===0?(n(),l("div",Is,t(o("暂无应用服务","No services yet")),1)):d("",!0),(n(!0),l(u,null,v(a.value.services,e=>(n(),l("div",{key:e.id,class:"border rounded-lg p-4"},[s("div",Ms,[s("div",null,[s("h4",Hs,t(e.service_name),1),e.service_name_en?(n(),l("p",js,t(e.service_name_en),1)):d("",!0)]),s("span",{class:r(["px-2 py-1 text-xs rounded",p(e.status)])},t(e.status),3)]),s("div",Fs,[s("div",null,[s("span",Ts,t(o("服务编码","Service Code"))+":",1),s("span",$s,t(e.service_code),1)]),s("div",null,[s("span",Bs,t(o("服务类型","Service Type"))+":",1),s("span",Ps,t(e.service_type||"-"),1)]),s("div",null,[s("span",Vs,t(o("技术栈","Tech Stack"))+":",1),s("span",zs,t(e.tech_stack||"-"),1)]),s("div",null,[s("span",Ls,t(o("负责人","Owner"))+":",1),s("span",Gs,t(e.owner||"-"),1)]),e.repo_url?(n(),l("div",Ks,[s("span",Ws,t(o("代码仓库","Repository"))+":",1),s("a",{href:e.repo_url,target:"_blank",class:"ml-2 text-blue-600 hover:underline"},t(e.repo_url),9,qs)])):d("",!0),e.description?(n(),l("div",Js,[s("span",Qs,t(o("描述","Description"))+":",1),s("span",Us,t(e.description),1)])):d("",!0)])]))),128))])):d("",!0),i.value==="identifiers"?(n(),l("div",Xs,[a.value.identifiers.length===0?(n(),l("div",Ys,t(o("暂无应用标识","No identifiers yet")),1)):d("",!0),s("div",Zs,[s("table",st,[s("thead",tt,[s("tr",null,[s("th",et,t(o("标识类型","Type")),1),s("th",ot,t(o("标识值","Value")),1),s("th",at,t(o("环境","Environment")),1),s("th",nt,t(o("状态","Status")),1),s("th",lt,t(o("描述","Description")),1)])]),s("tbody",null,[(n(!0),l(u,null,v(a.value.identifiers,e=>(n(),l("tr",{key:e.id,class:"border-t"},[s("td",dt,[s("span",it,t(e.identifier_type),1)]),s("td",ct,t(e.identifier_value),1),s("td",rt,t(e.environment||"-"),1),s("td",_t,[s("span",{class:r(["px-2 py-0.5 text-xs rounded",p(e.status)])},t(e.status),3)]),s("td",pt,t(e.description||"-"),1)]))),128))])])])])):d("",!0),i.value==="containers"?(n(),l("div",ut,[a.value.container_services.length===0?(n(),l("div",vt,t(o("暂无容器服务","No container services yet")),1)):d("",!0),(n(!0),l(u,null,v(a.value.container_services,e=>(n(),l("div",{key:e.id,class:"border rounded-lg p-4"},[s("div",xt,[s("div",null,[s("h4",ht,t(e.container_name),1),e.image?(n(),l("p",yt,t(e.image),1)):d("",!0)]),s("span",{class:r(["px-2 py-1 text-xs rounded",p(e.status)])},t(e.status),3)]),s("div",gt,[s("div",null,[s("span",mt,t(o("端口","Port"))+":",1),s("span",bt,t(e.port||"-"),1)]),s("div",null,[s("span",ft,t(o("副本数","Replicas"))+":",1),s("span",kt,t(e.replicas),1)]),s("div",null,[s("span",Ct,t(o("资源规格","Resource Spec"))+":",1),s("span",Nt,t(e.resource_spec||"-"),1)]),e.health_check_path?(n(),l("div",St,[s("span",Et,t(o("健康检查","Health Check"))+":",1),s("span",wt,t(e.health_check_path),1)])):d("",!0),e.description?(n(),l("div",Dt,[s("span",Ot,t(o("描述","Description"))+":",1),s("span",Rt,t(e.description),1)])):d("",!0)])]))),128))])):d("",!0),i.value==="devops"?(n(),l("div",At,[!a.value.devops||Object.keys(a.value.devops).length===0?(n(),l("div",It,t(o("暂无DevOps关联","No DevOps associations yet")),1)):(n(),l("div",Mt,[s("h3",Ht,t(o("DevOps关联信息","DevOps Associations")),1),s("div",jt,[s("div",null,[s("span",Ft,t(o("项目","Project"))+":",1),s("span",Tt,t(a.value.devops.project||"-"),1)]),s("div",null,[s("span",$t,t(o("流水线","Pipeline"))+":",1),s("span",Bt,t(a.value.devops.pipeline||"-"),1)]),s("div",null,[s("span",Pt,t(o("环境","Environment"))+":",1),s("span",Vt,t(a.value.devops.environment||"-"),1)]),s("div",null,[s("span",zt,t(o("资源","Resource"))+":",1),s("span",Lt,t(a.value.devops.resource||"-"),1)])])]))])):d("",!0),i.value==="runtime"?(n(),l("div",Gt,[s("div",Kt,[s("h3",Wt,t(o("HuggingFace空间","HuggingFace Spaces")),1),a.value.hf_spaces.length===0?(n(),l("div",qt,t(o("暂无HFç©
1ºé—´","No HF spaces yet")),1)):(n(),l("div",Jt,[(n(!0),l(u,null,v(a.value.hf_spaces,e=>(n(),l("div",{key:e.id,class:"border rounded p-4"},[s("div",Qt,[s("div",null,[s("h4",Ut,t(e.space_name),1),s("p",Xt,t(e.space_url),1)]),s("span",{class:r(["px-2 py-1 text-xs rounded",p(e.status)])},t(e.status),3)])]))),128))]))]),s("div",Yt,[s("h3",Zt,t(o("数据库连接","Database Connections")),1),a.value.database_connections.length===0?(n(),l("div",se,t(o("暂无数据库连接","No database connections yet")),1)):(n(),l("div",te,[(n(!0),l(u,null,v(a.value.database_connections,e=>(n(),l("div",{key:e.id,class:"border rounded p-4"},[s("div",ee,[s("div",null,[s("h4",oe,t(e.name),1),s("p",ae,t(e.database_type)+" - "+t(e.host)+":"+t(e.port),1)]),s("span",{class:r(["px-2 py-1 text-xs rounded",p(e.status)])},t(e.status),3)])]))),128))]))])])):d("",!0)])):d("",!0)])}}});export{le as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.