ssl routes - assets - chart loading for new service

pull/109/head v0.79.97
Hunter Long 2018-12-04 15:26:07 -08:00
parent c65ad7b2a7
commit 3c2bd33aad
9 changed files with 27 additions and 25 deletions

View File

@ -12,6 +12,7 @@ source/rice-box.go
vendor
servers
dev
!dev/postman_environment.json
!build/alpine-linux-amd64
config.yml
statup.db

View File

@ -1,16 +1,7 @@
FROM golang:1.11-alpine as base
MAINTAINER "Hunter Long (https://github.com/hunterlong)"
ARG VERSION
ENV DEP_VERSION v0.5.0
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq
RUN curl -L -s https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 -o /go/bin/dep && \
chmod +x /go/bin/dep
RUN curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
chmod +x /usr/local/bin/sass
WORKDIR /go/src/github.com/hunterlong/statping
ADD . /go/src/github.com/hunterlong/statping
RUN make dep
RUN make dev-deps
RUN make install
FROM postman/newman
CMD ["make", "test-api"]
WORKDIR /app
ADD dev/postman_environment.json /app/
ADD source/tmpl/postman.json /app/
ENTRYPOINT sleep 15 && newman run /app/postman.json -e /app/postman_environment.json

View File

@ -245,7 +245,6 @@ clean:
find . -name "*.out" -type f -delete
find . -name "*.cpu" -type f -delete
find . -name "*.mem" -type f -delete
find . -name "*.test" -type f -delete
# tag version using git
tag:

View File

@ -1,8 +1,12 @@
sut:
container_name: statping_sut
build: .
dockerfile: Dockerfile.test
links:
- statping
statping:
build: .
dockerfile: Dockerfile
dockerfile: Dockerfile
environment:
DB_CONN: sqlite
NAME: Docker Tester

View File

@ -135,6 +135,7 @@ func Router() *mux.Router {
r.Handle("/metrics", http.HandlerFunc(prometheusHandler))
r.Handle("/health", http.HandlerFunc(healthCheckHandler))
r.Handle("/tray", http.HandlerFunc(trayHandler))
r.Handle("/.well-known/", http.StripPrefix("/.well-known/", http.FileServer(http.Dir(dir+"/.well-known"))))
r.NotFoundHandler = http.HandlerFunc(error404Handler)
return r
}

View File

@ -109,6 +109,12 @@ function AjaxChart(chart, service, start=0, end=9999999999, group="hour") {
url: "/api/services/"+service+"/data?start="+start+"&end="+end+"&group="+group,
type: 'GET',
success: function(data) {
if (data.data.length <= 3) {
AjaxChart(chart, service, 0, 9999999999, "second")
return;
} else if (data.data.length === 0) {
return;
}
chart.data.labels.pop();
data.data.forEach(function(d) {
chart.data.datasets[0].data.push(d);

View File

@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="{{block "description" .}}{{end}}">
{{if USE_CDN}}
<link rel="shortcut icon" type="image/x-icon" href="https://assets.statping.com/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="https://assets.statup.io/favicon.ico">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" href="https://assets.statping.com/base.css">
<link rel="stylesheet" href="https://assets.statup.io/base.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
{{ else }}
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

View File

@ -223,11 +223,11 @@
</div>
{{end}}
{{define "extra_css"}}
<link rel="stylesheet" href="https://assets.statping.com/codemirror.css">
<link rel="stylesheet" href="https://assets.statping.com/codemirror-colorpicker.css"/>
<link rel="stylesheet" href="https://assets.statup.io/codemirror.css">
<link rel="stylesheet" href="https://assets.statup.io/codemirror-colorpicker.css"/>
{{end}}
{{define "extra_scripts"}}
<script src="https://assets.statping.com/codemirror.js"></script>
<script src="https://assets.statping.com/css.js"></script>
<script src="https://assets.statping.com/codemirror-colorpicker.min.js"></script>
<script src="https://assets.statup.io/codemirror.js"></script>
<script src="https://assets.statup.io/css.js"></script>
<script src="https://assets.statup.io/codemirror-colorpicker.min.js"></script>
{{end}}

View File

@ -1 +1 @@
0.79.96
0.79.97