Permalink
Browse files

ssl routes - assets - chart loading for new service

  • Loading branch information...
hunterlong committed Dec 4, 2018
1 parent c65ad7b commit 3c2bd33aad17fed60dc19fc1b3ca662cd552cf1d
Showing with 27 additions and 25 deletions.
  1. +1 −0 .dockerignore
  2. +6 −15 Dockerfile.test
  3. +0 −1 Makefile
  4. +5 −1 docker-compose.test.yml
  5. +1 −0 handlers/routes.go
  6. +6 −0 source/js/main.js
  7. +2 −2 source/tmpl/head.html
  8. +5 −5 source/tmpl/settings.html
  9. +1 −1 version.txt
@@ -12,6 +12,7 @@ source/rice-box.go
vendor
servers
dev
!dev/postman_environment.json
!build/alpine-linux-amd64
config.yml
statup.db
@@ -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
@@ -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:
@@ -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
@@ -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
}
@@ -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);
@@ -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">
@@ -223,11 +223,11 @@ <h4 class="text-capitalize">{{ .Name }}</h4>
</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}}
@@ -1 +1 @@
0.79.96
0.79.97

0 comments on commit 3c2bd33

Please sign in to comment.