gatus/web/static/js/app-legacy.js

1 line
38 KiB
JavaScript
Raw Normal View History

(function(){"use strict";var e={8323:function(e,t,s){s.d(t,{L:function(){return Ft}});s(6992),s(8674),s(9601),s(7727);var n=s(9963),r=s(6252),o=s.p+"img/logo.png",a={class:"container container-xs relative mx-auto xl:rounded xl:border xl:shadow-xl xl:my-5 p-5 pb-12 xl:pb-5 text-left dark:bg-gray-800 dark:text-gray-200 dark:border-gray-500",id:"global"},i={class:"mb-2"},l={class:"flex flex-wrap"},u=(0,r._)("div",{class:"w-3/4 text-left my-auto"},[(0,r._)("div",{class:"text-3xl xl:text-5xl lg:text-4xl font-light"},"Health Status")],-1),g={class:"w-1/4 flex justify-end"},c=["src"],h={key:1,src:o,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}};function d(e,t,s,n,o,d){var f=(0,r.up)("router-view"),m=(0,r.up)("Tooltip"),v=(0,r.up)("Social");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",a,[(0,r._)("div",i,[(0,r._)("div",l,[u,(0,r._)("div",g,[d.getLogo?((0,r.wg)(),(0,r.iD)("img",{key:0,src:d.getLogo,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},null,8,c)):(0,r.kq)("",!0),d.getLogo?(0,r.kq)("",!0):((0,r.wg)(),(0,r.iD)("img",h))])])]),(0,r.Wm)(f,{onShowTooltip:d.showTooltip},null,8,["onShowTooltip"])]),(0,r.Wm)(m,{result:o.tooltip.result,event:o.tooltip.event},null,8,["result","event"]),(0,r.Wm)(v)],64)}var f=s.p+"img/github.png",m=function(e){return(0,r.dD)("data-v-a88161aa"),e=e(),(0,r.Cn)(),e},v={id:"social"},p=m((function(){return(0,r._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,r._)("img",{src:f,alt:"GitHub",width:"32",height:"auto"})],-1)})),A=[p];function w(e,t,s,n,o,a){return(0,r.wg)(),(0,r.iD)("div",v,A)}var y={name:"Social"},x=s(3744);const T=(0,x.Z)(y,[["render",w],["__scopeId","data-v-a88161aa"]]);var k=T,I=(s(6977),s(3577)),b=(0,r._)("div",{class:"tooltip-title"},"Timestamp:",-1),R={id:"tooltip-timestamp"},S=(0,r._)("div",{class:"tooltip-title"},"Response time:",-1),D={id:"tooltip-response-time"},C=(0,r._)("div",{class:"tooltip-title"},"Conditions:",-1),B={id:"tooltip-conditions"},P=(0,r._)("br",null,null,-1),E={key:0,id:"tooltip-errors-container"},H=(0,r._)("div",{class:"tooltip-title"},"Errors:",-1),O={id:"tooltip-errors"},U=(0,r._)("br",null,null,-1);function z(e,t,s,n,o,a){return(0,r.wg)(),(0,r.iD)("div",{id:"tooltip",ref:"tooltip",class:(0,I.C_)(o.hidden?"invisible":""),style:(0,I.j5)("top:"+o.top+"px; left:"+o.left+"px")},[s.result?(0,r.WI)(e.$slots,"default",{key:0},(function(){return[b,(0,r._)("code",R,(0,I.zw)(a.prettifyTimestamp(s.result.timestamp)),1),S,(0,r._)("code",D,(0,I.zw)((s.result.duration/1e6).toFixed(0))+"ms",1),C,(0,r._)("code",B,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(s.result.conditionResults,(function(t){return(0,r.WI)(e.$slots,"default",{key:t},(function(){return[(0,r.Uk)((0,I.zw)(t.success?"✓":"X")+" ~ "+(0,I.zw)(t.condition),1),P]}))})),128))]),s.result.errors&&s.result.errors.length?((0,r.wg)(),(0,r.iD)("div",E,[H,(0,r._)("code",O,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(s.result.errors,(function(t){return(0,r.WI)(e.$slots,"default",{key:t},(function(){return[(0,r.Uk)(" - "+(0,I.zw)(t),1),U]}))})),128))])])):(0,r.kq)("",!0)]})):(0,r.kq)("",!0)],6)}s(4916),s(5306);var M={name:"Services",props:{event:Event,result:Object},methods:{prettifyTimestamp:function(e){var t=new Date(e),s=t.getFullYear(),n=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),r=(t.getDate()<10?"0":"")+t.getDate(),o=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes(),i=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+n+"-"+r+" "+o+":"+a+":"+i},htmlEntities:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")},reposition:function(){if(this.event&&this.event.type)if("mouseenter"===this.event.type){var e=this.event.target.getBoundingClientRect().y+30,t=this.event.target.getBoundingClientRect().x,s=this.$refs.tooltip.getBoundingClientRect();t+window.scrollX+s.width+50>document.body.getBoundingClientRect().width&&(t=this.event.target.getBound