import{o as e,c as s,b as o,r as l,a as t,F as u,e as d,t as i,f as _}from"./app-65af0faa.js";import{i as m}from"./http-74266e01.js";const h={key:0,class:"text-success"},p={key:1,class:"text-danger"},b={key:2,class:"text-warning"},x={name:"ServerStatus",props:{status:{type:String,required:!0}},setup(a){return(n,r)=>a.status==="up"?(e(),s("span",h," 正常 ")):a.status==="down"?(e(),s("span",p," 离线 ")):a.status==="maintenance"?(e(),s("span",b," 维护 ")):o("",!0)}},f=t("h3",null,"节点状态",-1),g={class:"table table-hover table-bordered table-responsive align-middle mt-3"},v=t("thead",{class:"text-center"},[t("tr",null,[t("th",{scope:"col"},"节点名称"),t("th",{scope:"col"},"节点状态")])],-1),y={class:"text-center"},B={name:"Status",setup(a){const n=l([]);return m.get("servers").then(r=>{n.value=r.data}),(r,k)=>(e(),s("div",null,[f,t("table",g,[v,t("tbody",y,[(e(!0),s(u,null,d(n.value,c=>(e(),s("tr",null,[t("td",null,i(c.name),1),t("td",null,[_(x,{status:c.status},null,8,["status"])])]))),256))])])]))}};export{B as default};
