import{O as x,e as l,F as p,z as t,g as n,f as e,j as s,A as g,k as _,w as u,h,o,n as f,N as w}from"./vue-CSzJdJby.js";const A={class:"row mx-auto"},N={class:"text-center mt-4 w-100"},B={class:"text-secondary pb-4 mb-4"},C={class:"table table-sm w-100 mx-auto",style:{"max-width":"1000px"}},F={class:"thead-light"},I={colspan:"2"},P={class:"m-1"},S={class:"align-middle badge text-bg-secondary"},V={class:"postgres"},z=t("td",null,"Full version",-1),G={class:"version"},L={key:0},E={class:"thead-light"},U={colspan:"2"},j={class:"m-1"},q={class:"system"},D={key:0},K=t("td",null,"CPU",-1),M={key:1},O=t("td",null,"Memory",-1),Q={key:2},R=t("td",null,"Swap",-1),T=t("td",null,"Kernel",-1),W={class:"thead-light"},H={colspan:"2"},J={class:"m-1"},X={class:"temboard"},Y=t("td",null,"Environment",-1),Z={key:0},$=t("td",null,"Plugins",-1),tt={class:"list-inline plugins"},et={class:"badge text-bg-light"},st={key:1},nt=t("td",null,"Configuration file",-1),lt={key:2},ot={class:"text-center mt-4 w-100"},at={class:"align-top badge text-bg-secondary"},it=t("div",{class:"alert alert-warning mx-auto",role:"alert"},[t("h2",null,[t("i",{class:"fa fa-warning fa-fw"}),e("WARNING")]),e(),t("p",null,"Agent never reported details. If this takes more than a few minutes, please investigate in logs.")],-1),dt={__name:"InstanceAbout",props:["instance_name","pg_version_summary","pg_data","environment","discover"],setup(m){const y=m,v=["listen_address","max_connections","data_checksums"],b=["psycopg2","libpq","bottle","cyptography"];let c={cluster_name:"",version:""},i={distributiion:""},d={};return y.discover&&(c=y.discover.postgres,i=y.discover.system,d=y.discover.temboard),(k,ct)=>{const r=x("tt");return o(),l("div",A,[y.discover?(o(),l(p,{key:0},[t("div",N,[t("h1",null,n(m.instance_name),1),e(),t("h2",B,n(m.pg_version_summary)+" serving "+n(m.pg_data)+".",1)]),e(),t("table",C,[t("thead",F,[t("tr",null,[t("th",I,[t("h3",P,[e(`
                PostgreSQL `),t("span",S,n(s(c).cluster_name),1)])])])]),e(),t("tbody",V,[t("tr",null,[z,e(),t("td",null,[t("pre",G,n((s(c).version||"Unknown").replace(", ",`
`)),1)])]),e(),(o(),l(p,null,g(v,a=>(o(),l(p,null,[s(c)[a]!==null&&s(c)[a]!==void 0?(o(),l("tr",L,[t("td",null,[_(r,null,{default:u(()=>[e(n(a),1)]),_:2},1024)]),e(),t("td",null,[s(c)[a]===!1||s(c)[a]===!0?(o(),l("i",{key:0,class:f(["fa",{"fa-check":s(c)[a],"fa-times":!s(c)[a]}])},null,2)):(o(),l(p,{key:1},[e(n(s(c)[a]),1)],64))])])):h("",!0)],64))),64))]),e(),t("thead",E,[t("tr",null,[t("th",U,[t("h3",j,n(s(i).distribution?s(i).distribution:"System"),1)])])]),e(),t("tbody",q,["cpu_model"in s(i)?(o(),l("tr",D,[K,e(),t("td",null,[_(r,null,{default:u(()=>[e(n(s(i).cpu_count)+" x "+n(s(i).cpu_model),1)]),_:1})])])):h("",!0),e(),"memory"in s(i)?(o(),l("tr",M,[O,e(),t("td",null,[_(r,null,{default:u(()=>[e(n((s(i).memory/1024/1024/1024).toFixed(2))+" GiB",1)]),_:1})])])):h("",!0),e(),"swap"in s(i)?(o(),l("tr",Q,[R,e(),t("td",null,[_(r,null,{default:u(()=>[e(n((s(i).swap/1024/1024/1024).toFixed(2))+" GiB",1)]),_:1})])])):h("",!0),e(),t("tr",null,[T,e(),t("td",null,[_(r,null,{default:u(()=>[e(n(s(i).os?s(i).os:"Linux")+" "+n(s(i).os_version),1)]),_:1})])])]),e(),t("thead",W,[t("tr",null,[t("th",H,[t("h3",J,"temBoard Agent "+n(s(d).agent_version),1)])])]),e(),t("tbody",X,[t("tr",null,[Y,e(),t("td",null,n(m.environment),1)]),e(),"plugins"in s(d)?(o(),l("tr",Z,[$,e(),t("td",null,[t("ul",tt,[(o(!0),l(p,null,g(s(d).plugins,a=>(o(),l("li",{class:f("list-inline-item "+a),style:{"font-size":"135%"}},[t("span",et,n(a),1)],2))),256))])])])):h("",!0),e(),"configfile"in s(d)?(o(),l("tr",st,[nt,e(),t("td",null,[_(r,null,{default:u(()=>[e(n(s(d).configfile),1)]),_:1})])])):h("",!0),e(),"python_version"in s(d)?(o(),l("tr",lt,[t("td",null,"Python "+n(s(d).python_version),1),e(),t("td",null,[_(r,null,{default:u(()=>[e(n(s(d).pythonbin),1)]),_:1})])])):h("",!0),e(),k.component+"_version"in s(d)?(o(),l(p,{key:3},g(b,a=>t("tr",null,[t("td",null,n(a),1),e(),t("td",null,[_(r,null,{default:u(()=>[e(n(s(d)[a+"_version"]),1)]),_:2},1024)])])),64)):h("",!0)])])],64)):(o(),l(p,{key:1},[t("div",ot,[t("h1",null,[e(n(m.instance_name)+" ",1),t("span",at,n(m.environment),1)])]),e(),it],64))])}}};w({components:{InstanceAbout:dt}}).mount("#app");
