mirror of https://github.com/statping/statping
404 handle (no redirect[vue])
parent
ae3735f0cf
commit
130cc3ede7
|
@ -8,7 +8,7 @@ const tokenKey = "statping_auth";
|
||||||
class Api {
|
class Api {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.version = "0.90.64";
|
this.version = "0.90.64";
|
||||||
this.commit = "b9bf873e22de211c28c9f1432c2f115883adbff0";
|
this.commit = "ae3735f0cf58ff0971c0db9b02845513a9248000";
|
||||||
}
|
}
|
||||||
|
|
||||||
async oauth() {
|
async oauth() {
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<div>
|
<div>
|
||||||
<form @submit.prevent="login" autocomplete="on">
|
<form @submit.prevent="login" autocomplete="on">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="username" class="col-4 col-md-3 col-form-label">{{$t('username')}}</label>
|
<label for="username" class="col-4 col-form-label">{{$t('username')}}</label>
|
||||||
<div class="col-8 col-md-9">
|
<div class="col-8">
|
||||||
<input @keyup="checkForm" type="text" v-model="username" autocomplete="username" name="username" class="form-control" id="username" placeholder="admin" autocorrect="off" autocapitalize="none">
|
<input @keyup="checkForm" type="text" v-model="username" autocomplete="username" name="username" class="form-control" id="username" placeholder="admin" autocorrect="off" autocapitalize="none">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="password" class="col-4 col-md-3 col-form-label">{{$t('password')}}</label>
|
<label for="password" class="col-4 col-form-label">{{$t('password')}}</label>
|
||||||
<div class="col-8 col-md-9">
|
<div class="col-8">
|
||||||
<input @keyup="checkForm" type="password" v-model="password" autocomplete="current-password" name="password" class="form-control" id="password" placeholder="password123">
|
<input @keyup="checkForm" type="password" v-model="password" autocomplete="current-password" name="password" class="form-control" id="password" placeholder="password123">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container col-md-7 col-sm-12 mt-2 sm-container">
|
<div class="container col-md-7 col-sm-12 mt-2 sm-container">
|
||||||
<div class="col-12 col-md-8 offset-md-2 mb-4">
|
<div class="col-12 col-md-6 offset-md-3 mb-4">
|
||||||
<img alt="Statping Setup" class="col-12 mt-5 mt-md-0" style="max-width:680px" src="banner.png">
|
<img alt="Statping Setup" class="img-fluid mt-5 mt-md-0" src="banner.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
|
@ -2275,7 +2275,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-08-21 21:37:10.928279 +0000 UTC
|
Automatically generated from Statping's Wiki on 2020-08-22 07:20:39.807157 +0000 UTC
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,6 +14,10 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
ExecuteResponse(w, r, "base.gohtml", core.App, nil)
|
ExecuteResponse(w, r, "base.gohtml", core.App, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func baseHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
ExecuteResponse(w, r, "base.gohtml", core.App, nil)
|
||||||
|
}
|
||||||
|
|
||||||
func healthCheckHandler(w http.ResponseWriter, r *http.Request) {
|
func healthCheckHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
health := map[string]interface{}{
|
health := map[string]interface{}{
|
||||||
"services": len(services.All()),
|
"services": len(services.All()),
|
||||||
|
|
|
@ -181,7 +181,7 @@ func Router() *mux.Router {
|
||||||
// API Generic Routes
|
// API Generic Routes
|
||||||
r.Handle("/metrics", readOnly(promhttp.Handler(), false))
|
r.Handle("/metrics", readOnly(promhttp.Handler(), false))
|
||||||
r.Handle("/health", http.HandlerFunc(healthCheckHandler))
|
r.Handle("/health", http.HandlerFunc(healthCheckHandler))
|
||||||
r.NotFoundHandler = http.HandlerFunc(indexHandler)
|
r.NotFoundHandler = http.HandlerFunc(baseHandler)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue