import{i as d}from"./http-6b833e16.js";import{r as p,d as _,o as s,c as r,a as e,F as c,e as i,t as o,f as h,w as u,g as m}from"./app-211db244.js";const v=e("h3",null,"隧道列表",-1),k={class:"table table-hover"},f=e("thead",null,[e("tr",null,[e("th",{scope:"col"},"ID"),e("th",{scope:"col"},"名称"),e("th",{scope:"col"},"协议"),e("th",{scope:"col"},"本地地址"),e("th",{scope:"col"},"远程端口/域名"),e("th",{scope:"col"},"服务器"),e("th",{scope:"col"},"状态")])],-1),g={key:0},x={key:1},y={key:0,class:"text-success"},b={key:1,class:"text-danger"},V={name:"Index",setup(w){const a=p([{id:"0",protocol:"",server:{server_address:"",server_port:"",name:""},run_id:""}]);return d.get("tunnels").then(l=>{a.value=l.data,console.log(a.value)}),(l,B)=>{const n=_("router-link");return s(),r(c,null,[v,e("table",k,[f,e("tbody",null,[(s(!0),r(c,null,i(a.value,t=>(s(),r("tr",null,[e("th",null,o(t.id),1),e("td",null,[h(n,{to:{name:"tunnels.show",params:{id:t.id}}},{default:u(()=>[m(o(t.name),1)]),_:2},1032,["to"])]),e("td",null,o(t.protocol.toString().toUpperCase()),1),e("td",null,o(t.local_address),1),e("td",null,[t.protocol==="http"||t.protocol==="https"?(s(),r("span",g,o(t.custom_domain),1)):(s(),r("span",x,o(t.server.server_address)+":"+o(t.remote_port),1))]),e("td",null,o(t.server.name),1),e("td",null,[t.run_id?(s(),r("span",y,"在线")):(s(),r("span",b,"离线"))])]))),256))])])],64)}}};export{V as default};
