1 parent
0e586e4152
commit
fc016bd682
9 files changed
+53
-20
No files matched your search
@@ -180,9 +180,11 @@ If you want to test it locally, see [Docker](#docker).
|
||||
| `web.address` | Address to listen on. | `0.0.0.0` |
|
||||
| `web.port` | Port to listen on. | `8080` |
|
||||
| `ui` | UI configuration. | `{}` |
|
||||
| `ui.title` | Title of the page. | `Health Dashboard ǀ Gatus` |
|
||||
| `ui.logo` | URL to the logo to display | `""` |
|
||||
| `Maintenance` | [Maintenance](#maintenance). | `{}` |
|
||||
| `ui.title` | [Title of the document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title). | `Health Dashboard ǀ Gatus` |
|
||||
| `ui.header` | Header at the top of the dashboard. | `Health Status` |
|
||||
| `ui.logo` | URL to the logo to display. | `""` |
|
||||
| `ui.link` | Link to open when the logo is clicked. | `""` |
|
||||
| `maintenance` | [Maintenance configuration](#maintenance). | `{}` |
|
||||
|
||||
|
||||
### Conditions
|
||||
|
||||
+18
-6
@@ -6,8 +6,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
defaultTitle = "Health Dashboard | Gatus"
|
||||
defaultLogo = ""
|
||||
defaultTitle = "Health Dashboard | Gatus"
|
||||
defaultHeader = "Health Status"
|
||||
defaultLogo = ""
|
||||
defaultLink = ""
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -18,15 +20,19 @@ var (
|
||||
|
||||
// Config is the configuration for the UI of Gatus
|
||||
type Config struct {
|
||||
Title string `yaml:"title"` // Title of the page
|
||||
Logo string `yaml:"logo"` // Logo to display on the page
|
||||
Title string `yaml:"title,omitempty"` // Title of the page
|
||||
Header string `yaml:"header,omitempty"` // Header is the text at the top of the page
|
||||
Logo string `yaml:"logo,omitempty"` // Logo to display on the page
|
||||
Link string `yaml:"link,omitempty"` // Link to open when clicking on the logo
|
||||
}
|
||||
|
||||
// GetDefaultConfig returns a Config struct with the default values
|
||||
func GetDefaultConfig() *Config {
|
||||
return &Config{
|
||||
Title: defaultTitle,
|
||||
Logo: defaultLogo,
|
||||
Title: defaultTitle,
|
||||
Header: defaultHeader,
|
||||
Logo: defaultLogo,
|
||||
Link: defaultLink,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +41,12 @@ func (cfg *Config) ValidateAndSetDefaults() error {
|
||||
if len(cfg.Title) == 0 {
|
||||
cfg.Title = defaultTitle
|
||||
}
|
||||
if len(cfg.Header) == 0 {
|
||||
cfg.Header = defaultHeader
|
||||
}
|
||||
if len(cfg.Header) == 0 {
|
||||
cfg.Header = defaultLink
|
||||
}
|
||||
t, err := template.ParseFiles(StaticFolder + "/index.html")
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+12
-1
@@ -9,10 +9,21 @@ func TestConfig_ValidateAndSetDefaults(t *testing.T) {
|
||||
defer func() {
|
||||
StaticFolder = "./web/static"
|
||||
}()
|
||||
cfg := &Config{Title: ""}
|
||||
cfg := &Config{
|
||||
Title: "",
|
||||
Header: "",
|
||||
Logo: "",
|
||||
Link: "",
|
||||
}
|
||||
if err := cfg.ValidateAndSetDefaults(); err != nil {
|
||||
t.Error("expected no error, got", err.Error())
|
||||
}
|
||||
if cfg.Title != defaultTitle {
|
||||
t.Errorf("expected title to be %s, got %s", defaultTitle, cfg.Title)
|
||||
}
|
||||
if cfg.Header != defaultHeader {
|
||||
t.Errorf("expected header to be %s, got %s", defaultHeader, cfg.Header)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetDefaultConfig(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script type="text/javascript">
|
||||
window.config = {logo: "{{ .Logo }}"};
|
||||
window.config = {logo: "{{ .Logo }}", header: "{{ .Header }}", link: "{{ .Link }}"};
|
||||
</script>
|
||||
<title>{{ .Title }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
+12
-4
@@ -3,11 +3,13 @@
|
||||
<div class="mb-2">
|
||||
<div class="flex flex-wrap">
|
||||
<div class="w-3/4 text-left my-auto">
|
||||
<div class="text-3xl xl:text-5xl lg:text-4xl font-light">Health Status</div>
|
||||
<div class="text-3xl xl:text-5xl lg:text-4xl font-light">{{ header }}</div>
|
||||
</div>
|
||||
<div class="w-1/4 flex justify-end">
|
||||
<img v-if="getLogo" :src="getLogo" alt="Gatus" class="object-scale-down" style="max-width: 100px; min-width: 50px; min-height:50px;"/>
|
||||
<img v-else src="./assets/logo.svg" alt="Gatus" class="object-scale-down" style="max-width: 100px; min-width: 50px; min-height:50px;"/>
|
||||
<a :href="link" target="_blank" style="width:100px">
|
||||
<img v-if="logo" :src="logo" alt="Gatus" class="object-scale-down" style="max-width: 100px; min-width: 50px; min-height:50px;"/>
|
||||
<img v-else src="./assets/logo.svg" alt="Gatus" class="object-scale-down" style="max-width: 100px; min-width: 50px; min-height:50px;"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,8 +59,14 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getLogo() {
|
||||
logo() {
|
||||
return window.config && window.config.logo && window.config.logo !== '{{ .Logo }}' ? window.config.logo : "";
|
||||
},
|
||||
header() {
|
||||
return window.config && window.config.header && window.config.header !== '{{ .Header }}' ? window.config.header : "Health Status";
|
||||
},
|
||||
link() {
|
||||
return window.config && window.config.link && window.config.link !== '{{ .Link }}' ? window.config.link : null;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script>window.config = {logo: "{{ .Logo }}"};</script><title>{{ .Title }}</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="shortcut icon" href="/favicon.ico"/><meta property="description" content="Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"/><script defer="defer" type="module" src="/js/chunk-vendors.js"></script><script defer="defer" type="module" src="/js/app.js"></script><link href="/css/app.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.js" nomodule></script><script defer="defer" src="/js/app-legacy.js" nomodule></script></head><body class="dark:bg-gray-900"><noscript><strong>Enable JavaScript to view this page.</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script>window.config = {logo: "{{ .Logo }}", header: "{{ .Header }}", link: "{{ .Link }}"};</script><title>{{ .Title }}</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="shortcut icon" href="/favicon.ico"/><meta property="description" content="Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"/><script defer="defer" type="module" src="/js/chunk-vendors.js"></script><script defer="defer" type="module" src="/js/app.js"></script><link href="/css/app.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.js" nomodule></script><script defer="defer" src="/js/app-legacy.js" nomodule></script></head><body class="dark:bg-gray-900"><noscript><strong>Enable JavaScript to view this page.</strong></noscript><div id="app"></div></body></html>
|
||||
@@ -1 +1 @@
|
||||
(function(){"use strict";var e={4842:function(e,t,n){n.d(t,{L:function(){return Nt}});n(6992),n(8674),n(9601),n(7727);var s=n(9963),o=n(6252),r=n(3577),a=n.p+"img/logo.svg",i={key:0,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"},l={class:"mb-2"},u={class:"flex flex-wrap"},g=(0,o._)("div",{class:"w-3/4 text-left my-auto"},[(0,o._)("div",{class:"text-3xl xl:text-5xl lg:text-4xl font-light"},"Health Status")],-1),c={class:"w-1/4 flex justify-end"},d=["src"],h={key:1,src:a,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},p={key:0,class:"text-red-500 text-center my-2"},f={class:"text-xl"},m={key:0,class:"text-red-500"},A={key:1,class:"text-red-500"},v={key:1},w=["href"];function y(e,t,n,s,a,y){var x=(0,o.up)("router-view"),T=(0,o.up)("Tooltip"),k=(0,o.up)("Social");return(0,o.wg)(),(0,o.iD)(o.HY,null,[a.retrievedConfig?((0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",l,[(0,o._)("div",u,[g,(0,o._)("div",c,[y.getLogo?((0,o.wg)(),(0,o.iD)("img",{key:0,src:y.getLogo,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},null,8,d)):((0,o.wg)(),(0,o.iD)("img",h))])])]),e.$route&&e.$route.query.error?((0,o.wg)(),(0,o.iD)("div",p,[(0,o._)("div",f,["access_denied"===e.$route.query.error?((0,o.wg)(),(0,o.iD)("span",m,"You do not have access to this status page")):((0,o.wg)(),(0,o.iD)("span",A,(0,r.zw)(e.$route.query.error),1))])])):(0,o.kq)("",!0),a.config&&a.config.oidc&&!a.config.authenticated?((0,o.wg)(),(0,o.iD)("div",v,[(0,o._)("a",{href:"".concat(a.SERVER_URL,"/oidc/login"),class:"max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800"}," Login with OIDC ",8,w)])):(0,o.kq)("",!0),(0,o.Wm)(x,{onShowTooltip:y.showTooltip},null,8,["onShowTooltip"])])):(0,o.kq)("",!0),(0,o.Wm)(T,{result:a.tooltip.result,event:a.tooltip.event},null,8,["result","event"]),(0,o.Wm)(k)],64)}n(1539);var x=function(e){return(0,o.dD)("data-v-a4b3d200"),e=e(),(0,o.Cn)(),e},T={id:"social"},k=x((function(){return(0,o._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,o._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,o._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)})),R=[k];function b(e,t,n,s,r,a){return(0,o.wg)(),(0,o.iD)("div",T,R)}var I={name:"Social"},D=n(3744);const C=(0,D.Z)(I,[["render",b],["__scopeId","data-v-a4b3d200"]]);var S=C,B=(n(6977),(0,o._)("div",{class:"tooltip-title"},"Timestamp:",-1)),E={id:"tooltip-timestamp"},P=(0,o._)("div",{class:"tooltip-title"},"Response time:",-1),U={id:"tooltip-response-time"},O=(0,o._)("div",{class:"tooltip-title"},"Conditions:",-1),H={id:"tooltip-conditions"},z=(0,o._)("br",null,null,-1),M={key:0,id:"tooltip-errors-container"},Q=(0,o._)("div",{class:"tooltip-title"},"Errors:",-1),W={id:"tooltip-errors"},q=(0,o._)("br",null,null,-1);function X(e,t,n,s,a,i){return(0,o.wg)(),(0,o.iD)("div",{id:"tooltip",ref:"tooltip",class:(0,r.C_)(a.hidden?"invisible":""),style:(0,r.j5)("top:"+a.top+"px; left:"+a.left+"px")},[n.result?(0,o.WI)(e.$slots,"default",{key:0},(function(){return[B,(0,o._)("code",E,(0,r.zw)(i.prettifyTimestamp(n.result.timestamp)),1),P,(0,o._)("code",U,(0,r.zw)((n.result.duration/1e6).toFixed(0))+"ms",1),O,(0,o._)("code",H,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.result.conditionResults,(function(t){return(0,o.WI)(e.$slots,"default",{key:t},(function(){return[(0,o.Uk)((0,r.zw)(t.success?"✓":"X")+" ~ "+(0,r.zw)(t.condition),1),z]}))})),128))]),n.result.errors&&n.result.errors.length?((0,o.wg)(),(0,o.iD)("div",M,[Q,(0,o._)("code",W,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(n.result.errors,(function(t){return(0,o.WI)(e.$slots,"default",{key:t},(function(){return[(0,o.Uk)(" - "+(0,r.zw)(t),1),q]}))})),128))])])):(0,o.kq)("",!0)]})):(0,o.kq)("",!0)],6)}n(4916),n(5306);var Y={name:"Endpoints",props:{event:Event,result:Object},methods:{prettifyTimestamp:function(e){var t=new Date(e),n=t.getFullYear(),s=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),o=(t.getDate()<10?"0":"")+t.getDate(),r=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes(),i=(t.getSeconds()<10?"0":"")+t.getSeconds();return
Line truncated
|
||||
(function(){"use strict";var e={5906:function(e,t,n){n.d(t,{L:function(){return Vt}});n(6992),n(8674),n(9601),n(7727);var o=n(9963),s=(n(9254),n(6252)),r=n(3577),i=n.p+"img/logo.svg",a={key:0,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"},l={class:"mb-2"},u={class:"flex flex-wrap"},g={class:"w-3/4 text-left my-auto"},c={class:"text-3xl xl:text-5xl lg:text-4xl font-light"},d={class:"w-1/4 flex justify-end"},h=["href"],p=["src"],f={key:1,src:i,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},m={key:0,class:"text-red-500 text-center my-2"},A={class:"text-xl"},v={key:0,class:"text-red-500"},w={key:1,class:"text-red-500"},y={key:1},x=["href"];function T(e,t,n,o,i,T){var k=(0,s.up)("router-view"),b=(0,s.up)("Tooltip"),R=(0,s.up)("Social");return(0,s.wg)(),(0,s.iD)(s.HY,null,[i.retrievedConfig?((0,s.wg)(),(0,s.iD)("div",a,[(0,s._)("div",l,[(0,s._)("div",u,[(0,s._)("div",g,[(0,s._)("div",c,(0,r.zw)(T.header),1)]),(0,s._)("div",d,[(0,s._)("a",{href:T.link,target:"_blank",style:{width:"100px"}},[T.logo?((0,s.wg)(),(0,s.iD)("img",{key:0,src:T.logo,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},null,8,p)):((0,s.wg)(),(0,s.iD)("img",f))],8,h)])])]),e.$route&&e.$route.query.error?((0,s.wg)(),(0,s.iD)("div",m,[(0,s._)("div",A,["access_denied"===e.$route.query.error?((0,s.wg)(),(0,s.iD)("span",v,"You do not have access to this status page")):((0,s.wg)(),(0,s.iD)("span",w,(0,r.zw)(e.$route.query.error),1))])])):(0,s.kq)("",!0),i.config&&i.config.oidc&&!i.config.authenticated?((0,s.wg)(),(0,s.iD)("div",y,[(0,s._)("a",{href:"".concat(i.SERVER_URL,"/oidc/login"),class:"max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800"}," Login with OIDC ",8,x)])):(0,s.kq)("",!0),(0,s.Wm)(k,{onShowTooltip:T.showTooltip},null,8,["onShowTooltip"])])):(0,s.kq)("",!0),(0,s.Wm)(b,{result:i.tooltip.result,event:i.tooltip.event},null,8,["result","event"]),(0,s.Wm)(R)],64)}n(1539);var k=function(e){return(0,s.dD)("data-v-a4b3d200"),e=e(),(0,s.Cn)(),e},b={id:"social"},R=k((function(){return(0,s._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,s._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,s._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)})),I=[R];function D(e,t,n,o,r,i){return(0,s.wg)(),(0,s.iD)("div",b,I)}var C={name:"Social"},S=n(3744);const B=(0,S.Z)(C,[["render",D],["__scopeId","data-v-a4b3d200"]]);var E=B,P=(n(6977),(0,s._)("div",{class:"tooltip-title"},"Timestamp:",-1)),U={id:"tooltip-timestamp"},O=(0,s._)("div",{class:"tooltip-title"},"Response time:",-1),H={id:"tooltip-response-time"},z=(0,s._)("div",{class:"tooltip-title"},"Conditions:",-1),M={id:"tooltip-conditions"},Q=(0,s._)("br",null,null,-1),W={key:0,id:"tooltip-errors-container"},q=(0,s._)("div",{class:"tooltip-title"},"Errors:",-1),X={id:"tooltip-errors"},Y=(0,s._)("br",null,null,-1);function K(e,t,n,o,i,a){return(0,s.wg)(),(0,s.iD)("div",{id:"tooltip",ref:"tooltip",class:(0,r.C_)(i.hidden?"invisible":""),style:(0,r.j5)("top:"+i.top+"px; left:"+i.left+"px")},[n.result?(0,s.WI)(e.$slots,"default",{key:0},(function(){return[P,(0,s._)("code",U,(0,r.zw)(a.prettifyTimestamp(n.result.timestamp)),1),O,(0,s._)("code",H,(0,r.zw)((n.result.duration/1e6).toFixed(0))+"ms",1),z,(0,s._)("code",M,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(n.result.conditionResults,(function(t){return(0,s.WI)(e.$slots,"default",{key:t},(function(){return[(0,s.Uk)((0,r.zw)(t.success?"✓":"X")+" ~ "+(0,r.zw)(t.condition),1),Q]}))})),128))]),n.result.errors&&n.result.errors.length?((0,s.wg)(),(0,s.iD)("div",W,[q,(0,s._)("code",X,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(n.result.errors,(function(t){return(0,s.WI)(e.$slots,"default",{key:t},(function(){return[(0,s.Uk)(" - "+(0,r.zw)(t),1),Y]}))})),128))])])):(0,s.kq)("",!0)]})):(0,s.kq)("",!0)],6)}n(4916),n(5306);var F={name:"Endpoints",props:{event:Event,result:Object},methods:{prettifyTimestamp:function(e){var t=new Date(e),n=t.getFullYear(),o=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),s=(t.getDate()<10?"0":"")+t.getDate(),r=(t.getHours()<10?"0":"")+t.getHours(),i=(Line truncated
|
||||
@@ -1 +1 @@
|
||||
(function(){"use strict";var e={4842:function(e,t,s){s.d(t,{L:function(){return Nt}});s(7727);var n=s(9963),o=s(6252),r=s(3577),a=s.p+"img/logo.svg";const i={key:0,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"},l={class:"mb-2"},g={class:"flex flex-wrap"},d=(0,o._)("div",{class:"w-3/4 text-left my-auto"},[(0,o._)("div",{class:"text-3xl xl:text-5xl lg:text-4xl font-light"},"Health Status")],-1),h={class:"w-1/4 flex justify-end"},u=["src"],p={key:1,src:a,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},c={key:0,class:"text-red-500 text-center my-2"},m={class:"text-xl"},A={key:0,class:"text-red-500"},f={key:1,class:"text-red-500"},v={key:1},w=["href"];function y(e,t,s,n,a,y){const x=(0,o.up)("router-view"),T=(0,o.up)("Tooltip"),k=(0,o.up)("Social");return(0,o.wg)(),(0,o.iD)(o.HY,null,[a.retrievedConfig?((0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",l,[(0,o._)("div",g,[d,(0,o._)("div",h,[y.getLogo?((0,o.wg)(),(0,o.iD)("img",{key:0,src:y.getLogo,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},null,8,u)):((0,o.wg)(),(0,o.iD)("img",p))])])]),e.$route&&e.$route.query.error?((0,o.wg)(),(0,o.iD)("div",c,[(0,o._)("div",m,["access_denied"===e.$route.query.error?((0,o.wg)(),(0,o.iD)("span",A,"You do not have access to this status page")):((0,o.wg)(),(0,o.iD)("span",f,(0,r.zw)(e.$route.query.error),1))])])):(0,o.kq)("",!0),a.config&&a.config.oidc&&!a.config.authenticated?((0,o.wg)(),(0,o.iD)("div",v,[(0,o._)("a",{href:`${a.SERVER_URL}/oidc/login`,class:"max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800"}," Login with OIDC ",8,w)])):(0,o.kq)("",!0),(0,o.Wm)(x,{onShowTooltip:y.showTooltip},null,8,["onShowTooltip"])])):(0,o.kq)("",!0),(0,o.Wm)(T,{result:a.tooltip.result,event:a.tooltip.event},null,8,["result","event"]),(0,o.Wm)(k)],64)}const x=e=>((0,o.dD)("data-v-a4b3d200"),e=e(),(0,o.Cn)(),e),T={id:"social"},k=x((()=>(0,o._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,o._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,o._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1))),R=[k];function b(e,t,s,n,r,a){return(0,o.wg)(),(0,o.iD)("div",T,R)}var I={name:"Social"},D=s(3744);const C=(0,D.Z)(I,[["render",b],["__scopeId","data-v-a4b3d200"]]);var S=C;const B=(0,o._)("div",{class:"tooltip-title"},"Timestamp:",-1),E={id:"tooltip-timestamp"},P=(0,o._)("div",{class:"tooltip-title"},"Response time:",-1),U={id:"tooltip-response-time"},O=(0,o._)("div",{class:"tooltip-title"},"Conditions:",-1),H={id:"tooltip-conditions"},z=(0,o._)("br",null,null,-1),M={key:0,id:"tooltip-errors-container"},Q=(0,o._)("div",{class:"tooltip-title"},"Errors:",-1),W={id:"tooltip-errors"},q=(0,o._)("br",null,null,-1);function X(e,t,s,n,a,i){return(0,o.wg)(),(0,o.iD)("div",{id:"tooltip",ref:"tooltip",class:(0,r.C_)(a.hidden?"invisible":""),style:(0,r.j5)("top:"+a.top+"px; left:"+a.left+"px")},[s.result?(0,o.WI)(e.$slots,"default",{key:0},(()=>[B,(0,o._)("code",E,(0,r.zw)(i.prettifyTimestamp(s.result.timestamp)),1),P,(0,o._)("code",U,(0,r.zw)((s.result.duration/1e6).toFixed(0))+"ms",1),O,(0,o._)("code",H,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.result.conditionResults,(t=>(0,o.WI)(e.$slots,"default",{key:t},(()=>[(0,o.Uk)((0,r.zw)(t.success?"✓":"X")+" ~ "+(0,r.zw)(t.condition),1),z])))),128))]),s.result.errors&&s.result.errors.length?((0,o.wg)(),(0,o.iD)("div",M,[Q,(0,o._)("code",W,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.result.errors,(t=>(0,o.WI)(e.$slots,"default",{key:t},(()=>[(0,o.Uk)(" - "+(0,r.zw)(t),1),q])))),128))])])):(0,o.kq)("",!0)])):(0,o.kq)("",!0)],6)}s(5306);var Y={name:"Endpoints",props:{event:Event,result:Object},methods:{prettifyTimestamp(e){let t=new Date(e),s=t.getFullYear(),n=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),o=(t.getDate()<10?"0":"")+t.getDate(),r=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes(),i=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+n+"-"+o+" "+r+":"+a+":"+i},htmlEntities(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").rLine truncated
|
||||
(function(){"use strict";var e={5906:function(e,t,s){s.d(t,{L:function(){return Vt}});s(7727);var n=s(9963),o=s(6252),r=s(3577),a=s.p+"img/logo.svg";const i={key:0,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"},l={class:"mb-2"},g={class:"flex flex-wrap"},d={class:"w-3/4 text-left my-auto"},h={class:"text-3xl xl:text-5xl lg:text-4xl font-light"},u={class:"w-1/4 flex justify-end"},p=["href"],c=["src"],m={key:1,src:a,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},A={key:0,class:"text-red-500 text-center my-2"},f={class:"text-xl"},v={key:0,class:"text-red-500"},w={key:1,class:"text-red-500"},y={key:1},x=["href"];function T(e,t,s,n,a,T){const k=(0,o.up)("router-view"),b=(0,o.up)("Tooltip"),R=(0,o.up)("Social");return(0,o.wg)(),(0,o.iD)(o.HY,null,[a.retrievedConfig?((0,o.wg)(),(0,o.iD)("div",i,[(0,o._)("div",l,[(0,o._)("div",g,[(0,o._)("div",d,[(0,o._)("div",h,(0,r.zw)(T.header),1)]),(0,o._)("div",u,[(0,o._)("a",{href:T.link,target:"_blank",style:{width:"100px"}},[T.logo?((0,o.wg)(),(0,o.iD)("img",{key:0,src:T.logo,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}},null,8,c)):((0,o.wg)(),(0,o.iD)("img",m))],8,p)])])]),e.$route&&e.$route.query.error?((0,o.wg)(),(0,o.iD)("div",A,[(0,o._)("div",f,["access_denied"===e.$route.query.error?((0,o.wg)(),(0,o.iD)("span",v,"You do not have access to this status page")):((0,o.wg)(),(0,o.iD)("span",w,(0,r.zw)(e.$route.query.error),1))])])):(0,o.kq)("",!0),a.config&&a.config.oidc&&!a.config.authenticated?((0,o.wg)(),(0,o.iD)("div",y,[(0,o._)("a",{href:`${a.SERVER_URL}/oidc/login`,class:"max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800"}," Login with OIDC ",8,x)])):(0,o.kq)("",!0),(0,o.Wm)(k,{onShowTooltip:T.showTooltip},null,8,["onShowTooltip"])])):(0,o.kq)("",!0),(0,o.Wm)(b,{result:a.tooltip.result,event:a.tooltip.event},null,8,["result","event"]),(0,o.Wm)(R)],64)}const k=e=>((0,o.dD)("data-v-a4b3d200"),e=e(),(0,o.Cn)(),e),b={id:"social"},R=k((()=>(0,o._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,o._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,o._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1))),I=[R];function D(e,t,s,n,r,a){return(0,o.wg)(),(0,o.iD)("div",b,I)}var C={name:"Social"},S=s(3744);const B=(0,S.Z)(C,[["render",D],["__scopeId","data-v-a4b3d200"]]);var E=B;const P=(0,o._)("div",{class:"tooltip-title"},"Timestamp:",-1),U={id:"tooltip-timestamp"},O=(0,o._)("div",{class:"tooltip-title"},"Response time:",-1),H={id:"tooltip-response-time"},z=(0,o._)("div",{class:"tooltip-title"},"Conditions:",-1),M={id:"tooltip-conditions"},Q=(0,o._)("br",null,null,-1),W={key:0,id:"tooltip-errors-container"},q=(0,o._)("div",{class:"tooltip-title"},"Errors:",-1),X={id:"tooltip-errors"},Y=(0,o._)("br",null,null,-1);function K(e,t,s,n,a,i){return(0,o.wg)(),(0,o.iD)("div",{id:"tooltip",ref:"tooltip",class:(0,r.C_)(a.hidden?"invisible":""),style:(0,r.j5)("top:"+a.top+"px; left:"+a.left+"px")},[s.result?(0,o.WI)(e.$slots,"default",{key:0},(()=>[P,(0,o._)("code",U,(0,r.zw)(i.prettifyTimestamp(s.result.timestamp)),1),O,(0,o._)("code",H,(0,r.zw)((s.result.duration/1e6).toFixed(0))+"ms",1),z,(0,o._)("code",M,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.result.conditionResults,(t=>(0,o.WI)(e.$slots,"default",{key:t},(()=>[(0,o.Uk)((0,r.zw)(t.success?"✓":"X")+" ~ "+(0,r.zw)(t.condition),1),Q])))),128))]),s.result.errors&&s.result.errors.length?((0,o.wg)(),(0,o.iD)("div",W,[q,(0,o._)("code",X,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.result.errors,(t=>(0,o.WI)(e.$slots,"default",{key:t},(()=>[(0,o.Uk)(" - "+(0,r.zw)(t),1),Y])))),128))])])):(0,o.kq)("",!0)])):(0,o.kq)("",!0)],6)}s(5306);var F={name:"Endpoints",props:{event:Event,result:Object},methods:{prettifyTimestamp(e){let t=new Date(e),s=t.getFullYear(),n=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),o=(t.getDate()<10?"0":"")+t.getDate(),r=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes(),i=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+n+"-"+o+" "+r+":"+a+":"+i},htmlEntities(e){return String(e).replacLine truncated
|
||||
@@ -1,7 +1,7 @@
|
||||
(self["webpackChunkgatus"]=self["webpackChunkgatus"]||[]).push([[998],{2262:function(e,t,n){"use strict";n.d(t,{Bj:function(){return c},qq:function(){return w},Fl:function(){return Ve},X3:function(){return Ae},PG:function(){return Ce},dq:function(){return Me},Xl:function(){return je},Jd:function(){return S},WL:function(){return Ge},qj:function(){return ke},iH:function(){return $e},lk:function(){return C},Um:function(){return Ee},XI:function(){return Ue},IU:function(){return Ie},j:function(){return R},X$:function(){return j},SU:function(){return Je}});var r=n(3577);let o;const i=[];class c{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&o&&(this.parent=o,this.index=(o.scopes||(o.scopes=[])).push(this)-1)}run(e){if(this.active)try{return this.on(),e()}finally{this.off()}else 0}on(){this.active&&(i.push(this),o=this)}off(){this.active&&(i.pop(),o=i[i.length-1])}stop(e){if(this.active){if(this.effects.forEach((e=>e.stop())),this.cleanups.forEach((e=>e())),this.scopes&&this.scopes.forEach((e=>e.stop(!0))),this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function s(e,t){t=t||o,t&&t.active&&t.effects.push(e)}const u=e=>{const t=new Set(e);return t.w=0,t.n=0,t},a=e=>(e.w&v)>0,l=e=>(e.n&v)>0,f=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=v},p=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const o=t[r];a(o)&&!l(o)?o.delete(e):t[n++]=o,o.w&=~v,o.n&=~v}t.length=n}},d=new WeakMap;let h=0,v=1;const g=30,m=[];let y;const b=Symbol(""),x=Symbol("");class w{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],s(this,n)}run(){if(!this.active)return this.fn();if(!m.includes(this))try{return m.push(y=this),O(),v=1<<++h,h<=g?f(this):_(this),this.fn()}finally{h<=g&&p(this),v=1<<--h,C(),m.pop();const e=m.length;y=e>0?m[e-1]:void 0}}stop(){this.active&&(_(this),this.onStop&&this.onStop(),this.active=!1)}}function _(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let k=!0;const E=[];function S(){E.push(k),k=!1}function O(){E.push(k),k=!0}function C(){const e=E.pop();k=void 0===e||e}function R(e,t,n){if(!A())return;let r=d.get(e);r||d.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=u());const i=void 0;I(o,i)}function A(){return k&&void 0!==y}function I(e,t){let n=!1;h<=g?l(e)||(e.n|=v,n=!a(e)):n=!e.has(y),n&&(e.add(y),y.deps.push(e))}function j(e,t,n,o,i,c){const s=d.get(e);if(!s)return;let a=[];if("clear"===t)a=[...s.values()];else if("length"===n&&(0,r.kJ)(e))s.forEach(((e,t)=>{("length"===t||t>=o)&&a.push(e)}));else switch(void 0!==n&&a.push(s.get(n)),t){case"add":(0,r.kJ)(e)?(0,r.S0)(n)&&a.push(s.get("length")):(a.push(s.get(b)),(0,r._N)(e)&&a.push(s.get(x)));break;case"delete":(0,r.kJ)(e)||(a.push(s.get(b)),(0,r._N)(e)&&a.push(s.get(x)));break;case"set":(0,r._N)(e)&&a.push(s.get(b));break}if(1===a.length)a[0]&&T(a[0]);else{const e=[];for(const t of a)t&&e.push(...t);T(u(e))}}function T(e,t){for(const n of(0,r.kJ)(e)?e:[...e])(n!==y||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const P=(0,r.fY)("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(r.yk)),N=D(),M=D(!1,!0),$=D(!0),U=L();function L(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ie(this);for(let t=0,o=this.length;t<o;t++)R(n,"get",t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(Ie)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){S();const n=Ie(this)[t].apply(this,e);return C(),n}})),e}function D(e=!1,t=!1){return function(n,o,i){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&i===(e?t?xe:be:t?ye:me).get(n))return n;const c=(0,r.kJ)(n);if(!e&&c&&(0,r.RI)(U,o))return Reflect.get(U,o,i);const s=Reflect.get(n,o,i);if((0,r.yk)(o)?F.has(o):P(o))return s;if(e||R(n,"get",o),t)return s;if(Me(s)){const e=!c||!(0,r.S0)(o);return e?s.value:s}return(0,r.Kn)(s)?e?Se(s):ke(s):s}}const J=G(),B=G(!0);function G(e=!1){return function(t,n,o,i){let c=t[n];if(!e&&(o=Ie(o),c=Ie(c),!(0,r.kJ)(t)&&Me(c)&&!Me(o)))return c.value=o,!0;const s=(0,r.kJ)(t)&&(0,r.S0)(n)?Number(n)<t.length:(0,r.RI)(t,n),u=Reflect.set(t,n,o,i);return t===Ie(i)&&(s?(0,r.aU)(o,c)&&j(t,"set",n,o,c):j(t,"add",n,o)),u}}function q(e,t){const n=(0,r.RI)(e,t),o=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&j(e,"delete",t,void 0,o),i}function V(e,t){const n=Reflect.has(e,t);return(0,r.yk)(t)&&F.has(t)||R(e,"has",t),n}function W(e){return R(e,"iterate",(0,r.kJ)(e)?"length":b),Reflect.ownKeys(e)}const H={get:N,set:J,deleteProperty:q,has:V,ownKeys:W},K={get:$,set(e,t){return!0},deleteProperty(e,t){return!0}},z=(0,r.l7)({},H,{get:M,set:B}),X=e=>e,Y=e=>Reflect.getPrototypeOf(e);function Z(e,t,n=!1,r=!1){e=e["__v_raw"];const o=Ie(e),i=Ie(t);t!==i&&!n&&R(o,"get",t),!n&&R(o,"get",i);const{has:c}=Y(o),s=r?X:n?Pe:Te;return c.call(o,t)?s(e.get(t)Line truncated
|
||||
(self["webpackChunkgatus"]=self["webpackChunkgatus"]||[]).push([[998],{2262:function(t,e,n){"use strict";n.d(e,{Bj:function(){return c},qq:function(){return w},Fl:function(){return Vt},X3:function(){return At},PG:function(){return Ct},dq:function(){return Mt},Xl:function(){return jt},Jd:function(){return S},WL:function(){return qt},qj:function(){return kt},iH:function(){return $t},lk:function(){return C},Um:function(){return Et},XI:function(){return Ut},IU:function(){return It},j:function(){return R},X$:function(){return j},SU:function(){return Jt}});var r=n(3577);let o;const i=[];class c{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&o&&(this.parent=o,this.index=(o.scopes||(o.scopes=[])).push(this)-1)}run(t){if(this.active)try{return this.on(),t()}finally{this.off()}else 0}on(){this.active&&(i.push(this),o=this)}off(){this.active&&(i.pop(),o=i[i.length-1])}stop(t){if(this.active){if(this.effects.forEach((t=>t.stop())),this.cleanups.forEach((t=>t())),this.scopes&&this.scopes.forEach((t=>t.stop(!0))),this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function s(t,e){e=e||o,e&&e.active&&e.effects.push(t)}const u=t=>{const e=new Set(t);return e.w=0,e.n=0,e},a=t=>(t.w&v)>0,l=t=>(t.n&v)>0,f=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=v},p=t=>{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r<e.length;r++){const o=e[r];a(o)&&!l(o)?o.delete(t):e[n++]=o,o.w&=~v,o.n&=~v}e.length=n}},d=new WeakMap;let h=0,v=1;const g=30,m=[];let y;const b=Symbol(""),x=Symbol("");class w{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],s(this,n)}run(){if(!this.active)return this.fn();if(!m.includes(this))try{return m.push(y=this),O(),v=1<<++h,h<=g?f(this):_(this),this.fn()}finally{h<=g&&p(this),v=1<<--h,C(),m.pop();const t=m.length;y=t>0?m[t-1]:void 0}}stop(){this.active&&(_(this),this.onStop&&this.onStop(),this.active=!1)}}function _(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let k=!0;const E=[];function S(){E.push(k),k=!1}function O(){E.push(k),k=!0}function C(){const t=E.pop();k=void 0===t||t}function R(t,e,n){if(!A())return;let r=d.get(t);r||d.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=u());const i=void 0;I(o,i)}function A(){return k&&void 0!==y}function I(t,e){let n=!1;h<=g?l(t)||(t.n|=v,n=!a(t)):n=!t.has(y),n&&(t.add(y),y.deps.push(t))}function j(t,e,n,o,i,c){const s=d.get(t);if(!s)return;let a=[];if("clear"===e)a=[...s.values()];else if("length"===n&&(0,r.kJ)(t))s.forEach(((t,e)=>{("length"===e||e>=o)&&a.push(t)}));else switch(void 0!==n&&a.push(s.get(n)),e){case"add":(0,r.kJ)(t)?(0,r.S0)(n)&&a.push(s.get("length")):(a.push(s.get(b)),(0,r._N)(t)&&a.push(s.get(x)));break;case"delete":(0,r.kJ)(t)||(a.push(s.get(b)),(0,r._N)(t)&&a.push(s.get(x)));break;case"set":(0,r._N)(t)&&a.push(s.get(b));break}if(1===a.length)a[0]&&T(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);T(u(t))}}function T(t,e){for(const n of(0,r.kJ)(t)?t:[...t])(n!==y||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const P=(0,r.fY)("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(r.yk)),N=D(),M=D(!1,!0),$=D(!0),U=L();function L(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=It(this);for(let e=0,o=this.length;e<o;e++)R(n,"get",e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(It)):r}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){S();const n=It(this)[e].apply(this,t);return C(),n}})),t}function D(t=!1,e=!1){return function(n,o,i){if("__v_isReactive"===o)return!t;if("__v_isReadonly"===o)return t;if("__v_raw"===o&&i===(t?e?xt:bt:e?yt:mt).get(n))return n;const c=(0,r.kJ)(n);if(!t&&c&&(0,r.RI)(U,o))return Reflect.get(U,o,i);const s=Reflect.get(n,o,i);if((0,r.yk)(o)?F.has(o):P(o))return s;if(t||R(n,"get",o),e)return s;if(Mt(s)){const t=!c||!(0,r.S0)(o);return t?s.value:s}return(0,r.Kn)(s)?t?St(s):kt(s):s}}const J=q(),B=q(!0);function q(t=!1){return function(e,n,o,i){let c=e[n];if(!t&&(o=It(o),c=It(c),!(0,r.kJ)(e)&&Mt(c)&&!Mt(o)))return c.value=o,!0;const s=(0,r.kJ)(e)&&(0,r.S0)(n)?Number(n)<e.length:(0,r.RI)(e,n),u=Reflect.set(e,n,o,i);return e===It(i)&&(s?(0,r.aU)(o,c)&&j(e,"set",n,o,c):j(e,"add",n,o)),u}}function G(t,e){const n=(0,r.RI)(t,e),o=t[e],i=Reflect.deleteProperty(t,e);return i&&n&&j(t,"delete",e,void 0,o),i}function V(t,e){const n=Reflect.has(t,e);return(0,r.yk)(e)&&F.has(e)||R(t,"has",e),n}function W(t){return R(t,"iterate",(0,r.kJ)(t)?"length":b),Reflect.ownKeys(t)}const H={get:N,set:J,deleteProperty:G,has:V,ownKeys:W},K={get:$,set(t,e){return!0},deleteProperty(t,e){return!0}},z=(0,r.l7)({},H,{get:M,set:B}),X=t=>t,Y=t=>Reflect.getPrototypeOf(t);function Z(t,e,n=!1,r=!1){t=t["__v_raw"];const o=It(t),i=It(e);e!==i&&!n&&R(o,"get",e),!n&&R(o,"get",i);const{has:c}=Y(o),s=r?X:n?Pt:Tt;return c.call(o,e)?s(t.get(e)Line truncated
|
||||
/*!
|
||||
* vue-router v4.0.12
|
||||
* (c) 2021 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/
|
||||
const i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,c=e=>i?Symbol(e):"_vr_"+e,s=c("rvlm"),u=c("rvd"),a=c("r"),l=c("rl"),f=c("rvl"),p="undefined"!==typeof window;function d(e){return e.__esModule||i&&"Module"===e[Symbol.toStringTag]}const h=Object.assign;function v(e,t){const n={};for(const r in t){const o=t[r];n[r]=Array.isArray(o)?o.map(e):e(o)}return n}const g=()=>{};const m=/\/$/,y=e=>e.replace(m,"");function b(e,t,n="/"){let r,o={},i="",c="";const s=t.indexOf("?"),u=t.indexOf("#",s>-1?s:0);return s>-1&&(r=t.slice(0,s),i=t.slice(s+1,u>-1?u:t.length),o=e(i)),u>-1&&(r=r||t.slice(0,u),c=t.slice(u,t.length)),r=C(null!=r?r:t,n),{fullPath:r+(i&&"?")+i+c,path:r,query:o,hash:c}}function x(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function w(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function _(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&k(t.matched[r],n.matched[o])&&E(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function k(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function E(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!S(e[n],t[n]))return!1;return!0}function S(e,t){return Array.isArray(e)?O(e,t):Array.isArray(t)?O(t,e):e===t}function O(e,t){return Array.isArray(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}function C(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o,i,c=n.length-1;for(o=0;o<r.length;o++)if(i=r[o],1!==c&&"."!==i){if(".."!==i)break;c--}return n.slice(0,c).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var R,A;(function(e){e["pop"]="pop",e["push"]="push"})(R||(R={})),function(e){e["back"]="back",e["forward"]="forward",e["unknown"]=""}(A||(A={}));function I(e){if(!e)if(p){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),y(e)}const j=/^[^#]+#/;function T(e,t){return e.replace(j,"#")+t}function P(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const F=()=>({left:window.pageXOffset,top:window.pageYOffset});function N(e){let t;if("el"in e){const n=e.el,r="string"===typeof n&&n.startsWith("#");0;const o="string"===typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=P(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function M(e,t){const n=history.state?history.state.position-t:-1;return n+e}const $=new Map;function U(e,t){$.set(e,t)}function L(e){const t=$.get(e);return $.delete(e),t}let D=()=>location.protocol+"//"+location.host;function J(e,t){const{pathname:n,search:r,hash:o}=t,i=e.indexOf("#");if(i>-1){let t=o.includes(e.slice(i))?e.slice(i).length:1,n=o.slice(t);return"/"!==n[0]&&(n="/"+n),w(n,"")}const c=w(n,e);return c+r+o}function B(e,t,n,r){let o=[],i=[],c=null;const s=({state:i})=>{const s=J(e,location),u=n.value,a=t.value;let l=0;if(i){if(n.value=s,t.value=i,c&&c===u)return void(c=null);l=a?i.position-a.position:0}else r(s);o.forEach((e=>{e(n.value,u,{delta:l,type:R.pop,direction:l?l>0?A.forward:A.back:A.unknown})}))};function u(){c=n.value}function a(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return i.push(t),t}function l(){const{history:e}=window;e.state&&e.replaceState(h({},e.state,{scroll:F()}),"")}function f(){for(const e of i)e();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l),{pauseListeners:u,listen:a,destroy:f}}function G(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?F():null}}function q(e){const{history:t,location:n}=window,r={value:J(e,n)},o={value:t.state};function i(r,i,c){const s=e.indexOf("#"),u=s>-1?(n.host&&document.querySelector("base")?e:e.slice(s))+r:D()+e+r;try{t[c?"replaceState":"pushState"](i,"",u),o.value=i}catch(a){console.error(a),n[c?"replace":"assign"](u)}}function c(e,n){const c=h({},t.state,G(o.value.back,e,o.value.forward,!0),n,{position:o.value.position});i(e,c,!0),r.value=e}function s(e,n){const c=h({},o.value,t.state,{forward:e,scroll:F()});i(c.current,c,!0);const s=h({},G(r.value,e,null),{position:c.position+1},n);i(e,s,!1),r.value=e}return o.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:s,replace:c}}function V(e){e=I(e);const t=q(e),n=B(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}const o=h({location:"",base:e,go:r,createHref:T.bind(null,e)},t,n);return Object.defineProperty(o,"loLine truncated
|
||||
const i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,c=t=>i?Symbol(t):"_vr_"+t,s=c("rvlm"),u=c("rvd"),a=c("r"),l=c("rl"),f=c("rvl"),p="undefined"!==typeof window;function d(t){return t.__esModule||i&&"Module"===t[Symbol.toStringTag]}const h=Object.assign;function v(t,e){const n={};for(const r in e){const o=e[r];n[r]=Array.isArray(o)?o.map(t):t(o)}return n}const g=()=>{};const m=/\/$/,y=t=>t.replace(m,"");function b(t,e,n="/"){let r,o={},i="",c="";const s=e.indexOf("?"),u=e.indexOf("#",s>-1?s:0);return s>-1&&(r=e.slice(0,s),i=e.slice(s+1,u>-1?u:e.length),o=t(i)),u>-1&&(r=r||e.slice(0,u),c=e.slice(u,e.length)),r=C(null!=r?r:e,n),{fullPath:r+(i&&"?")+i+c,path:r,query:o,hash:c}}function x(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function w(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function _(t,e,n){const r=e.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&k(e.matched[r],n.matched[o])&&E(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function k(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function E(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!S(t[n],e[n]))return!1;return!0}function S(t,e){return Array.isArray(t)?O(t,e):Array.isArray(e)?O(e,t):t===e}function O(t,e){return Array.isArray(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):1===t.length&&t[0]===e}function C(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let o,i,c=n.length-1;for(o=0;o<r.length;o++)if(i=r[o],1!==c&&"."!==i){if(".."!==i)break;c--}return n.slice(0,c).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var R,A;(function(t){t["pop"]="pop",t["push"]="push"})(R||(R={})),function(t){t["back"]="back",t["forward"]="forward",t["unknown"]=""}(A||(A={}));function I(t){if(!t)if(p){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),y(t)}const j=/^[^#]+#/;function T(t,e){return t.replace(j,"#")+e}function P(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const F=()=>({left:window.pageXOffset,top:window.pageYOffset});function N(t){let e;if("el"in t){const n=t.el,r="string"===typeof n&&n.startsWith("#");0;const o="string"===typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;e=P(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.pageXOffset,null!=e.top?e.top:window.pageYOffset)}function M(t,e){const n=history.state?history.state.position-e:-1;return n+t}const $=new Map;function U(t,e){$.set(t,e)}function L(t){const e=$.get(t);return $.delete(t),e}let D=()=>location.protocol+"//"+location.host;function J(t,e){const{pathname:n,search:r,hash:o}=e,i=t.indexOf("#");if(i>-1){let e=o.includes(t.slice(i))?t.slice(i).length:1,n=o.slice(e);return"/"!==n[0]&&(n="/"+n),w(n,"")}const c=w(n,t);return c+r+o}function B(t,e,n,r){let o=[],i=[],c=null;const s=({state:i})=>{const s=J(t,location),u=n.value,a=e.value;let l=0;if(i){if(n.value=s,e.value=i,c&&c===u)return void(c=null);l=a?i.position-a.position:0}else r(s);o.forEach((t=>{t(n.value,u,{delta:l,type:R.pop,direction:l?l>0?A.forward:A.back:A.unknown})}))};function u(){c=n.value}function a(t){o.push(t);const e=()=>{const e=o.indexOf(t);e>-1&&o.splice(e,1)};return i.push(e),e}function l(){const{history:t}=window;t.state&&t.replaceState(h({},t.state,{scroll:F()}),"")}function f(){for(const t of i)t();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l),{pauseListeners:u,listen:a,destroy:f}}function q(t,e,n,r=!1,o=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:o?F():null}}function G(t){const{history:e,location:n}=window,r={value:J(t,n)},o={value:e.state};function i(r,i,c){const s=t.indexOf("#"),u=s>-1?(n.host&&document.querySelector("base")?t:t.slice(s))+r:D()+t+r;try{e[c?"replaceState":"pushState"](i,"",u),o.value=i}catch(a){console.error(a),n[c?"replace":"assign"](u)}}function c(t,n){const c=h({},e.state,q(o.value.back,t,o.value.forward,!0),n,{position:o.value.position});i(t,c,!0),r.value=t}function s(t,n){const c=h({},o.value,e.state,{forward:t,scroll:F()});i(c.current,c,!0);const s=h({},q(r.value,t,null),{position:c.position+1},n);i(t,s,!1),r.value=t}return o.value||i(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:s,replace:c}}function V(t){t=I(t);const e=G(t),n=B(t,e.state,e.location,e.replace);function r(t,e=!0){e||n.pauseListeners(),history.go(t)}const o=h({location:"",base:t,go:r,createHref:T.bind(null,t)},e,n);return Object.defineProperty(o,"loLine truncated
|
||||
Reference in new issue
Block a user