mirror of https://github.com/statping/statping
parent
558372b027
commit
6dc81e6849
|
@ -18,7 +18,7 @@ services:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- VERSION=0.27.7
|
- VERSION=0.27.8
|
||||||
- DB_HOST=localhost
|
- DB_HOST=localhost
|
||||||
- DB_USER=travis
|
- DB_USER=travis
|
||||||
- DB_PASS=
|
- DB_PASS=
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ENV VERSION=v0.27.7
|
ENV VERSION=v0.27.8
|
||||||
|
|
||||||
RUN apk --no-cache add libstdc++ ca-certificates
|
RUN apk --no-cache add libstdc++ ca-certificates
|
||||||
RUN wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \
|
RUN wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \
|
||||||
|
|
|
@ -11,7 +11,7 @@ type index struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if core.CoreApp == nil {
|
if core.CoreApp.Services == nil {
|
||||||
http.Redirect(w, r, "/setup", http.StatusSeeOther)
|
http.Redirect(w, r, "/setup", http.StatusSeeOther)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetupHandler(w http.ResponseWriter, r *http.Request) {
|
func SetupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if core.CoreApp != nil {
|
if core.CoreApp.Services != nil {
|
||||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ func SetupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ProcessSetupHandler(w http.ResponseWriter, r *http.Request) {
|
func ProcessSetupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
if core.CoreApp != nil {
|
if core.CoreApp.Services != nil {
|
||||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,12 @@ $(".service_li").on('click', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(".disable_click").on('click', function() {
|
$('form').submit(function() {
|
||||||
$(this).prop("disabled", true);
|
$(this).find("button[type='submit']").prop('disabled',true);
|
||||||
$(this).text("Loading...");
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var ranVar = false;
|
var ranVar = false;
|
||||||
var ranTheme = false;
|
var ranTheme = false;
|
||||||
$('a[data-toggle="pill"]').on('shown.bs.tab', function (e) {
|
$('a[data-toggle="pill"]').on('shown.bs.tab', function (e) {
|
||||||
|
|
|
@ -23,3 +23,9 @@ $("#setup_form").submit(function() {
|
||||||
$("#setup_button").text("Creating Statup...");
|
$("#setup_button").text("Creating Statup...");
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('form').submit(function() {
|
||||||
|
$(this).find("button[type='submit']").prop('disabled',true);
|
||||||
|
$(this).find("button[type='submit']").text('Loading...');
|
||||||
|
});
|
|
@ -98,7 +98,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id="setup_button" type="submit" class="btn btn-primary btn-block">Save Settings</button>
|
<button id="setup_button" type="submit" class="btn btn-primary btn-block disable_click">Save Settings</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue