mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-09 19:57:34 +08:00
2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
var p=(o,u,s)=>new Promise((h,c)=>{var f=r=>{try{t(s.next(r))}catch(l){c(l)}},x=r=>{try{t(s.throw(r))}catch(l){c(l)}},t=r=>r.done?h(r.value):Promise.resolve(r.value).then(f,x);t((s=s.apply(o,u)).next())});import{_ as v,d as w,j as B,v as m,k as g,o as a,c as i,a as e,F as k,E as y,z as _,l as n,p as A,q as C,C as M}from"./index.js?v=5b4be379";const d=o=>(A("data-v-16a9b49b"),o=o(),C(),o),D={class:"page-table"},F=d(()=>e("colgroup",null,[e("col"),e("col"),e("col"),e("col"),e("col"),e("col")],-1)),E=d(()=>e("thead",null,[e("tr",null,[e("th",null," \u72B6\u6001 "),e("th",null," \u63A5\u53E3 "),e("th",null," \u7C7B\u578B "),e("th",null," mac "),e("th",null," \u63A5\u6536 "),e("th",null," \u53D1\u9001 ")])],-1)),b={class:"flex-icon"},z=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:v":"https://vecta.io/nano",width:"48",height:"38",viewBox:"0 0 12.7 10.05"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(0 -286.95)"},[e("rect",{x:".21",y:"287.25",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0834 280.6)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#999",filter:"url(#A)",stroke:"#999","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0999 280.7)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.24",y:"294.55",width:"1.6",height:"1.38",ry:".11",fill:"#ccc",stroke:"#ccc","stroke-width":".22","paint-order":"normal"})])],-1)),N=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"48",height:"38",viewBox:"0 0 12.7 10.05","xmlns:v":"https://vecta.io/nano"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(-.03 -287.07)"},[e("rect",{x:".24",y:"287.36",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0532 280.72)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#4d4d4d",filter:"url(#A)",stroke:"#4d4d4d","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0697 280.81)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.27",y:"294.67",width:"1.6",height:"1.38",ry:".11",fill:"#55d400",stroke:"#55d400","stroke-width":".22","paint-order":"normal"})])],-1)),S=w({__name:"index",setup(o){return p(this,null,function*(){let u,s;const h=B({ports:[]}),c=t=>{switch(t){case"full":return"\u5168\u53CC\u5DE5";case"half":return"\u534A\u53CC\u5DE5"}};let f=!1;const x=()=>p(this,null,function*(){try{const t=yield M.Network.PortList.GET();if(t!=null&&t.data){const{result:r}=t==null?void 0:t.data;r&&(h.ports=r.ports||[])}}catch(t){console.log(t)}setTimeout(()=>{f||x()},1e4)});return[u,s]=m(()=>x()),yield u,s(),g(()=>{f=!0}),(t,r)=>(a(),i("table",D,[F,E,e("tbody",null,[(a(!0),i(k,null,y(h.ports,l=>(a(),i("tr",null,[e("th",b,[l.linkState=="DOWN"?(a(),i(k,{key:0},[z,_("\u672A\u8FDE\u63A5 ")],64)):(a(),i(k,{key:1},[N,_(" \u5DF2\u8FDE\u63A5 ")],64))]),e("th",null,n(l.name)+"\uFF08"+n(l.interfaceNames.join(",").toLocaleUpperCase())+"\uFF09 ",1),e("th",null,n(c(l.duplex)),1),e("th",null,n(l.macAddress||"--"),1),e("th",null,n(l.rx_packets||"--"),1),e("th",null,n(l.tx_packets||"--"),1)]))),256))])]))})}});var L=v(S,[["__scopeId","data-v-16a9b49b"]]);export{L as default};
|