|
@ -1,3 +1,7 @@
|
||||||
|
# 0.90.75 (12-20-2020)
|
||||||
|
- Removed favicons and PNG files from assets, now using base64 images
|
||||||
|
- Cleaned up some issues with UI
|
||||||
|
|
||||||
# 0.90.74 (12-18-2020)
|
# 0.90.74 (12-18-2020)
|
||||||
- Fixed issue with favicon/manifest.json throwing 404 errors
|
- Fixed issue with favicon/manifest.json throwing 404 errors
|
||||||
- Modified language go:generate script to slowdown for 429 errors
|
- Modified language go:generate script to slowdown for 429 errors
|
||||||
|
|
3
Makefile
|
@ -146,10 +146,7 @@ frontend-build:
|
||||||
cd frontend && yarn && yarn build
|
cd frontend && yarn && yarn build
|
||||||
@cp -r frontend/dist source/
|
@cp -r frontend/dist source/
|
||||||
@cp -r frontend/src/assets/scss source/dist/
|
@cp -r frontend/src/assets/scss source/dist/
|
||||||
@cp frontend/public/favicon.ico source/dist/
|
|
||||||
@cp frontend/public/robots.txt source/dist/
|
@cp frontend/public/robots.txt source/dist/
|
||||||
@cp frontend/public/banner.png source/dist/
|
|
||||||
@cp -r frontend/public/favicon source/dist/
|
|
||||||
@echo "Frontend build complete at ./source/dist"
|
@echo "Frontend build complete at ./source/dist"
|
||||||
|
|
||||||
yarn:
|
yarn:
|
||||||
|
|
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 37 KiB |
|
@ -1,2 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Statping",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-36x36.png",
|
|
||||||
"sizes": "36x36",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "0.75"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-48x48.png",
|
|
||||||
"sizes": "48x48",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "1.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-72x72.png",
|
|
||||||
"sizes": "72x72",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "1.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-96x96.png",
|
|
||||||
"sizes": "96x96",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "2.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-144x144.png",
|
|
||||||
"sizes": "144x144",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "3.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "favicon\/android-icon-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image\/png",
|
|
||||||
"density": "4.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 38 KiB |
|
@ -5,7 +5,6 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
||||||
<title>Statping</title>
|
<title>Statping</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -8,7 +8,7 @@ const tokenKey = "statping_auth";
|
||||||
class Api {
|
class Api {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.version = "0.90.74";
|
this.version = "0.90.74";
|
||||||
this.commit = "2612402a7782f28ca0b7fc10c941d8c4a1a5acc6";
|
this.commit = "df8e1f73d9f7fdf218bc5c26130d7d8a6af6719a";
|
||||||
}
|
}
|
||||||
|
|
||||||
async oauth() {
|
async oauth() {
|
||||||
|
|
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 574 KiB |
|
@ -89,7 +89,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.chartmarker SPAN {
|
.chartmarker SPAN {
|
||||||
font-size: 4pt;
|
font-size: 8pt;
|
||||||
display: block;
|
display: block;
|
||||||
color: #b1b1b1;
|
color: #b1b1b1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<div v-if="success_event && !failureBefore" class="col-12 font-2 m-0 mb-2">
|
<div v-if="success_event && !failureBefore" class="col-12 font-2 m-0 mb-2">
|
||||||
<span class="text-success"><font-awesome-icon icon="check" class="mr-1" size="1x"/>No New Events</span>
|
<span class="text-success"><font-awesome-icon icon="check" class="mr-1" size="1x"/>No New Events</span>
|
||||||
<span class="font-italic d-inline-block text-truncate text-dim mt-1" style="max-width: 270px">
|
<span v-if="!this.isZero(service.last_error)" class="font-italic d-inline-block text-truncate text-dim mt-1" style="max-width: 270px">
|
||||||
Last failure was {{ago(service.last_error)}} ago.
|
Last failure was {{ago(service.last_error)}} ago.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,21 +9,15 @@
|
||||||
</h6>
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body pb-1">
|
||||||
<div v-if="loaded" class="row pl-2">
|
<div v-if="loaded" class="row pl-2">
|
||||||
<div class="col-md-6 col-sm-12 pl-2 mt-2 mt-md-0 mb-3">
|
<div class="col-md-12 col-sm-12 pl-2 mt-2 mt-md-0 mb-3">
|
||||||
<ServiceSparkLine :title="set2_name" subtitle="Latency Last 24 Hours" :series="set2"/>
|
<ServiceSparkLine :title="set2_name" subtitle="Latency Last 24 Hours" :series="set2"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-sm-12 pl-0 mt-4 mt-md-0 mb-3">
|
|
||||||
<ServiceSparkLine :title="set1_name" subtitle="Latency Last 7 Days" :series="set1"/>
|
|
||||||
</div>
|
|
||||||
<ServiceEvents :service="service"/>
|
<ServiceEvents :service="service"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="row mb-5">
|
<div v-else class="row mb-5">
|
||||||
<div class="col-12 col-md-6 text-center">
|
<div class="col-12 col-md-12 text-center">
|
||||||
<font-awesome-icon icon="circle-notch" class="text-dim" size="2x" spin/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 text-center text-dim">
|
|
||||||
<font-awesome-icon icon="circle-notch" class="text-dim" size="2x" spin/>
|
<font-awesome-icon icon="circle-notch" class="text-dim" size="2x" spin/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +38,8 @@
|
||||||
<font-awesome-icon icon="calendar-check"/>
|
<font-awesome-icon icon="calendar-check"/>
|
||||||
</button>
|
</button>
|
||||||
<button @click="$router.push({path: `/dashboard/service/${service.id}/failures`, params: {id: service.id}})" @mouseleave="unsetHover" @mouseover="setHover($t('failures'))" class="btn btn-sm btn-white failures">
|
<button @click="$router.push({path: `/dashboard/service/${service.id}/failures`, params: {id: service.id}})" @mouseleave="unsetHover" @mouseover="setHover($t('failures'))" class="btn btn-sm btn-white failures">
|
||||||
<font-awesome-icon icon="exclamation-triangle"/> <span v-if="service.stats.failures !== 0" class="badge badge-danger ml-1">{{service.stats.failures}}</span>
|
<font-awesome-icon icon="exclamation-triangle"/>
|
||||||
|
<span v-if="service.stats.failures !== 0" class="badge badge-danger ml-1">{{service.stats.failures}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -91,10 +86,8 @@
|
||||||
hovered: false,
|
hovered: false,
|
||||||
hoverbtn: "",
|
hoverbtn: "",
|
||||||
openTab: "",
|
openTab: "",
|
||||||
set1: [],
|
|
||||||
set2: [],
|
set2: [],
|
||||||
loaded: false,
|
loaded: false,
|
||||||
set1_name: "",
|
|
||||||
set2_name: "",
|
set2_name: "",
|
||||||
failures: null,
|
failures: null,
|
||||||
visible: false
|
visible: false
|
||||||
|
@ -111,7 +104,7 @@
|
||||||
this.hoverbtn = name
|
this.hoverbtn = name
|
||||||
},
|
},
|
||||||
unsetHover() {
|
unsetHover() {
|
||||||
this.hoverbtn = this.$t('uptime', [this.service.online_7_days])
|
this.hoverbtn = this.$t('uptime') + " "+ this.service.online_7_days + "%"
|
||||||
},
|
},
|
||||||
async setVisible(isVisible, entry) {
|
async setVisible(isVisible, entry) {
|
||||||
if (isVisible && !this.visible) {
|
if (isVisible && !this.visible) {
|
||||||
|
@ -126,9 +119,7 @@
|
||||||
this.uptime = await Api.service_uptime(this.service.id, this.toUnix(start), this.toUnix(end))
|
this.uptime = await Api.service_uptime(this.service.id, this.toUnix(start), this.toUnix(end))
|
||||||
},
|
},
|
||||||
async loadInfo() {
|
async loadInfo() {
|
||||||
this.set1 = await this.getHits(86400 * 7, "12h")
|
this.set2 = await this.getHits(86400 * 3, "60m")
|
||||||
this.set1_name = this.calc(this.set1)
|
|
||||||
this.set2 = await this.getHits(86400, "60m")
|
|
||||||
this.set2_name = this.calc(this.set2)
|
this.set2_name = this.calc(this.set2)
|
||||||
this.loaded = true
|
this.loaded = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,13 +57,13 @@
|
||||||
let ts = w.globals.seriesX[seriesIndex][dataPointIndex];
|
let ts = w.globals.seriesX[seriesIndex][dataPointIndex];
|
||||||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||||
let val = series[seriesIndex][dataPointIndex];
|
let val = series[seriesIndex][dataPointIndex];
|
||||||
return `<div class="chartmarker"><span class="font-3">Average Response Time: ${this.humanTime(val)}</span><span>${dt}</span></div>`
|
return `<div class="chartmarker"><span class="">Average Response Time: ${this.humanTime(val)}</span><span>${dt}</span></div>`
|
||||||
},
|
},
|
||||||
fixed: {
|
fixed: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
position: 'bottomLeft',
|
position: 'bottomLeft',
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: -30,
|
offsetY: -15,
|
||||||
},
|
},
|
||||||
x: {
|
x: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|
|
@ -2321,7 +2321,7 @@ OluFxewsEO0QNDrfFb+0gnjYlnGqOFcZjUMXbDdY5oLSPtXohynuTK1qyQ==
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center small text-dim" v-pre>
|
<div class="text-center small text-dim" v-pre>
|
||||||
Automatically generated from Statping's Wiki on 2020-12-18 10:22:03.386528 +0000 UTC
|
Automatically generated from Statping's Wiki on 2020-12-20 10:21:49.484474 +0000 UTC
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,5 +39,8 @@ var handlerFuncs = func(w http.ResponseWriter, r *http.Request) template.FuncMap
|
||||||
"BasePath": func() string {
|
"BasePath": func() string {
|
||||||
return basePath
|
return basePath
|
||||||
},
|
},
|
||||||
|
"Icon": func() string {
|
||||||
|
return basePath
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,17 +67,13 @@ func Router() *mux.Router {
|
||||||
indexHandler := http.FileServer(http.Dir(dir + "/assets/"))
|
indexHandler := http.FileServer(http.Dir(dir + "/assets/"))
|
||||||
|
|
||||||
r.PathPrefix("/css/").Handler(http.StripPrefix(basePath, staticAssets("css")))
|
r.PathPrefix("/css/").Handler(http.StripPrefix(basePath, staticAssets("css")))
|
||||||
r.PathPrefix("/favicon/").Handler(http.StripPrefix(basePath, staticAssets("favicon")))
|
|
||||||
r.PathPrefix("/robots.txt").Handler(http.StripPrefix(basePath, indexHandler))
|
r.PathPrefix("/robots.txt").Handler(http.StripPrefix(basePath, indexHandler))
|
||||||
r.PathPrefix("/banner.png").Handler(http.StripPrefix(basePath, indexHandler))
|
|
||||||
} else {
|
} else {
|
||||||
tmplFileSrv := http.FileServer(source.TmplBox.HTTPBox())
|
tmplFileSrv := http.FileServer(source.TmplBox.HTTPBox())
|
||||||
tmplBoxHandler := http.StripPrefix(basePath, tmplFileSrv)
|
tmplBoxHandler := http.StripPrefix(basePath, tmplFileSrv)
|
||||||
|
|
||||||
r.PathPrefix("/css/").Handler(http.StripPrefix(basePath, tmplFileSrv))
|
r.PathPrefix("/css/").Handler(http.StripPrefix(basePath, tmplFileSrv))
|
||||||
r.PathPrefix("/favicon/").Handler(http.StripPrefix(basePath, tmplFileSrv))
|
|
||||||
r.PathPrefix("/robots.txt").Handler(tmplBoxHandler)
|
r.PathPrefix("/robots.txt").Handler(tmplBoxHandler)
|
||||||
r.PathPrefix("/banner.png").Handler(tmplBoxHandler)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
r.PathPrefix("/js/").Handler(http.StripPrefix(basePath, http.FileServer(source.TmplBox.HTTPBox())))
|
r.PathPrefix("/js/").Handler(http.StripPrefix(basePath, http.FileServer(source.TmplBox.HTTPBox())))
|
||||||
|
|
|
@ -29,13 +29,11 @@ var (
|
||||||
"scss/mixin.scss",
|
"scss/mixin.scss",
|
||||||
"scss/mobile.scss",
|
"scss/mobile.scss",
|
||||||
"scss/variables.scss",
|
"scss/variables.scss",
|
||||||
"banner.png",
|
|
||||||
"favicon.ico",
|
|
||||||
"robots.txt",
|
"robots.txt",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Assets will load the Rice boxes containing the CSS, SCSS, favicon, and HTML files.
|
// Assets will load the Rice boxes containing the CSS, SCSS, and HTML files.
|
||||||
func Assets() error {
|
func Assets() error {
|
||||||
if utils.Params.GetBool("DISABLE_HTTP") {
|
if utils.Params.GetBool("DISABLE_HTTP") {
|
||||||
return nil
|
return nil
|
||||||
|
@ -130,7 +128,7 @@ func OpenAsset(path string) string {
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateAllAssets will dump HTML, CSS, SCSS, and favicon assets into the '/assets' directory
|
// CreateAllAssets will dump HTML, CSS, and SCSS assets into the '/assets' directory
|
||||||
func CreateAllAssets(folder string) error {
|
func CreateAllAssets(folder string) error {
|
||||||
log.Infoln(fmt.Sprintf("Dump Statping assets into %s/assets", folder))
|
log.Infoln(fmt.Sprintf("Dump Statping assets into %s/assets", folder))
|
||||||
fp := filepath.Join
|
fp := filepath.Join
|
||||||
|
@ -141,13 +139,10 @@ func CreateAllAssets(folder string) error {
|
||||||
if err := MakePublicFolder(fp(folder, "assets", "css")); err != nil {
|
if err := MakePublicFolder(fp(folder, "assets", "css")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := MakePublicFolder(fp(folder, "assets", "favicon")); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := MakePublicFolder(fp(folder, "assets", "scss")); err != nil {
|
if err := MakePublicFolder(fp(folder, "assets", "scss")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Infoln("Inserting scss, css, and favicon files into assets folder")
|
log.Infoln("Inserting scss, and css files into assets folder")
|
||||||
|
|
||||||
if err := CopyAllToPublic(TmplBox); err != nil {
|
if err := CopyAllToPublic(TmplBox); err != nil {
|
||||||
log.Errorln(err)
|
log.Errorln(err)
|
||||||
|
@ -157,12 +152,6 @@ func CreateAllAssets(folder string) error {
|
||||||
if err := CopyToPublic(TmplBox, "", "robots.txt"); err != nil {
|
if err := CopyToPublic(TmplBox, "", "robots.txt"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := CopyToPublic(TmplBox, "", "banner.png"); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := CopyToPublic(TmplBox, "", "favicon.ico"); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
log.Infoln("Compiling CSS from SCSS style...")
|
log.Infoln("Compiling CSS from SCSS style...")
|
||||||
if err := CompileSASS(); err != nil {
|
if err := CompileSASS(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.90.74
|
0.90.75
|
||||||
|
|