2 lines
1.0 KiB
JavaScript
2 lines
1.0 KiB
JavaScript
import{_ as c,f as l,o as t,c as o,b as r,t as i,d as n,p as _,g as d}from"./index.1f1b2f0d.js";const p={name:"Ping",data(){return{msg:null,loading:null,error:null}},methods:{getMessage(){this.error=this.item=null,this.loading=!0,l.get("http://localhost:5000/ping").then(e=>{this.loading=!1,this.msg=e.data}).catch(e=>{this.loading=!1,this.error=e.toString()})}},created(){this.getMessage()}},a=e=>(_("data-v-00a5a1ee"),e=e(),d(),e),g={class:"container"},h=a(()=>n("h2",null,"Ping-Pong Test",-1)),u=a(()=>n("p",null," This pages only purpose is showing a response from the server. ",-1)),m={key:0,class:"loading"},v={key:1,class:"error"},f={key:2,class:"message"},y=a(()=>n("p",null,"The servers responded ",-1)),b={type:"button",class:"btn btn-primary"};function k(e,x,P,S,s,w){return t(),o("div",g,[h,u,s.loading?(t(),o("div",m,"Loading...")):r("",!0),s.error?(t(),o("div",v,i(s.error),1)):r("",!0),s.msg?(t(),o("div",f,[y,n("button",b,i(s.msg),1)])):r("",!0)])}var V=c(p,[["render",k],["__scopeId","data-v-00a5a1ee"]]);export{V as default};
|