diff --git a/.travis.yml b/.travis.yml index eef6ae3f..9504fefe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ services: env: global: - - VERSION=0.27.82 + - VERSION=0.27.9 - DB_HOST=localhost - DB_USER=travis - DB_PASS= diff --git a/.travis/build.sh b/.travis/build.sh index 9cfcf660..f93097dd 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -14,6 +14,8 @@ xgo -go 1.10.x --targets=linux/arm-7 --dest=build -ldflags="-X main.VERSION=$VER xgo -go 1.10.x --targets=linux/arm64 --dest=build -ldflags="-X main.VERSION=$VERSION" ./ xgo -go 1.10.x --targets=linux/amd64 --dest=build -ldflags="-X main.VERSION=$VERSION -linkmode external -extldflags -static" -out alpine ./ + + cd build ls diff --git a/core/configs.go b/core/configs.go index b4055bc0..5a763392 100644 --- a/core/configs.go +++ b/core/configs.go @@ -8,6 +8,10 @@ import ( type Config types.Config +var ( + VERSION string +) + func LoadConfig() (*Config, error) { var config Config file, err := ioutil.ReadFile("config.yml") diff --git a/core/export.go b/core/export.go index 36208e27..3a257921 100644 --- a/core/export.go +++ b/core/export.go @@ -25,7 +25,7 @@ func ExportIndexHTML() string { return template.HTML(html) }, "VERSION": func() string { - return "version here" + return VERSION }, "underscore": func(html string) string { return utils.UnderScoreString(html) diff --git a/handlers/handlers.go b/handlers/handlers.go index 6b8cde0c..d96e017e 100644 --- a/handlers/handlers.go +++ b/handlers/handlers.go @@ -83,7 +83,7 @@ func ExecuteResponse(w http.ResponseWriter, r *http.Request, file string, data i return IsAuthenticated(r) }, "VERSION": func() string { - return "Version here" + return core.VERSION }, "underscore": func(html string) string { return utils.UnderScoreString(html) diff --git a/main.go b/main.go index 2f75e442..570d7d78 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,7 @@ var ( func init() { LoadDotEnvs() + core.VERSION = VERSION } func main() { diff --git a/source/css/base.css b/source/css/base.css index 1dfb0f41..1267e23e 100644 --- a/source/css/base.css +++ b/source/css/base.css @@ -1,86 +1,76 @@ HTML, BODY { - background-color: #fcfcfc; -} + background-color: #fcfcfc; } .container { padding-top: 20px; padding-bottom: 20px; - max-width: 860px; -} + max-width: 860px; } + +H1 { + color: #000; } + +H5 { + color: #000; } .online_list .badge { - margin-top: 0.2rem; -} + margin-top: 0.2rem; } .navbar { - margin-bottom: 30px; -} + margin-bottom: 30px; } .btn-sm { line-height: 1.3; - font-size: 0.75rem; -} + font-size: 0.75rem; } .view_service_btn { position: absolute; bottom: -40px; - right: 40px; -} + right: 40px; } .service_lower_info { position: absolute; bottom: -40px; left: 40px; color: #d1ffca; - font-size: 0.85rem; -} + font-size: 0.85rem; } .lg_number { - font-size: 26pt; + font-size: 12pt; font-weight: bold; display: block; - color: #474747; -} + color: #47d337; } .stats_area { text-align: center; - color: #a5a5a5; -} + color: #a5a5a5; } .lower_canvas { height: 55px; width: 100%; background-color: #48d338; - padding: 17px 10px; -} + padding: 17px 10px; } .lower_canvas SPAN { - font-size: 1rem; -} + font-size: 1rem; } .footer { text-decoration: none; - margin-top: 20px; -} + margin-top: 20px; } .footer A { - color: #aaaaaa; - text-decoration: none; -} + color: #000; + text-decoration: none; } .footer A:HOVER { - color: #6d6d6d; -} + color: #6d6d6d; } .online_badge { color: #fff; - background-color: #35b317; -} + background-color: #35b317; } .offline_badge { color: #fff; - background-color: #c51919; -} + background-color: #c51919; } .progress { margin-top: -20px; @@ -88,27 +78,29 @@ HTML, BODY { margin-bottom: 15px; width: calc(100% + 40px); height: 3px; - border-radius: 0; -} + border-radius: 0; } .card { - background-color: #fff; -} + background-color: #bababa; + border: 1px solid rgba(0, 0, 0, 0.125); } .card-body { - overflow: hidden; -} + overflow: hidden; } .card-body H4 A { - color: #239e07; - text-decoration: none; -} + color: #bababa; + text-decoration: none; } .chart-container { position: relative; height: 170px; - width: 100%; -} + width: 100%; } + +.btn-success { + background-color: #47d337; } + +.btn-danger { + background-color: #dd3545; } .CodeMirror { /* Bootstrap Settings */ @@ -128,100 +120,82 @@ HTML, BODY { border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; /* Code Mirror Settings */ font-family: monospace; position: relative; overflow: hidden; - height: 60vh; -} + height: 60vh; } .CodeMirror-focused { /* Bootstrap Settings */ border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); - transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -} + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } @media (max-width: 767px) { .sm-container { margin-top: 40px !important; - padding: 0 !important; - } + padding: 0 !important; } .list-group-item H5 { - font-size: 0.9rem; - } + font-size: 0.9rem; } .container { - padding: 0 !important; - } + padding: 0 !important; } .navbar { margin-left: 0px; margin-top: 0px; width: 100%; - margin-bottom: 0; - } + margin-bottom: 0; } .card-body { font-size: 6pt; - padding: 5px 5px; - } + padding: 5px 5px; } .lg_number { - font-size: 1.5rem; - } + font-size: 1.5rem; } .stats_area { margin-top: 35px !important; - margin-bottom: 35px !important; - } + margin-bottom: 35px !important; } .stats_area .col-4 { padding-left: 0; - padding-right: 0; - } + padding-right: 0; } .lower_canvas SPAN { font-size: 0.9rem; float: left; - } + color: #47d337; } .btn-sm { line-height: 0.9rem; - font-size: 0.65rem; - } + font-size: 0.65rem; } .full-col-12 { padding-left: 0px; - padding-right: 0px; - } + padding-right: 0px; } .card { border: 0; - border-radius: 0; - } + border-radius: 0; } .list-group-item { border-top: 1px solid #e4e4e4; - border: 0px; - } + border: 0px; } .list-group-item:first-child { border-top-left-radius: 0; - border-top-right-radius: 0; - } + border-top-right-radius: 0; } .list-group-item:last-child { border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - } + border-bottom-left-radius: 0; } .list-group-item P { - font-size: 0.7rem; - } -} + font-size: 0.7rem; } } /*# sourceMappingURL=base.css.map */ diff --git a/source/css/base.css.map b/source/css/base.css.map index 3b2b0af3..312bf88f 100644 --- a/source/css/base.css.map +++ b/source/css/base.css.map @@ -1 +1,7 @@ -{"version":3,"sourceRoot":"","sources":["../scss/base.scss","../scss/variables.scss"],"names":[],"mappings":"AAGA;EACI,kBCJe;;;ADOnB;EACI;EACA;EACA,WCTQ;;;ADYZ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI,WClCc;EDmCd;EACA;EACA,OCtCe;;;ADyCnB;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI,kBC5Fc;;;AD+FlB;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AASJ;AACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;;;AAGF;AACE;EACA;EACA;EACA;EACA;;;AAIF;EAEI;IACI;IACA;;;EAGJ;IACI;;;EAGJ;IACI;;;EAGJ;IACI;IACA;IACA;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI;IACA;;;EAGJ;IACI","file":"base.css"} \ No newline at end of file +{ +"version": 3, +"mappings": "AAGA,UAAU;EACN,gBAAgB,ECJD,OAAO;;ADO1B,UAAW;EACP,WAAW,EAAE,IAAI;EACjB,cA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AAQ;IACJ,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,CAAC;;EAGpB,UAAW;IACP,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,OAAO;;EAGpB,UAAW;IACP,SAAS,EAAE,MAAM;;EAGrB,WAAY;IACR,UAAU,EAAE,eAAe;IAC3B,aAAa,EAAE,eAAe;;EAGlC,kBAAmB;IACf,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;;EAGpB,kBAAmB;IACf,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE,IAAI;IACX,KAAK,EC3Me,OAAO;;ED8M/B,OAAQ;IACJ,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,OAAO;;EAGtB,YAAa;IACT,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;;EAGtB,KAAM;IACF,MAAM,EAAE,CAAC;IACT,aAAa,EAAE,CAAC;;EAGpB,gBAAiB;IACb,UAAU,EAAE,iBAAiB;IAC7B,MAAM,EAAE,GAAG;;EAGf,4BAA6B;IACzB,sBAAsB,EAAE,CAAC;IACzB,uBAAuB,EAAE,CAAC;;EAG9B,2BAA4B;IACxB,0BAA0B,EAAE,CAAC;IAC7B,yBAAyB,EAAE,CAAC;;EAGhC,kBAAmB;IACf,SAAS,EAAE,MAAM", +"sources": ["../scss/base.scss","../scss/variables.scss"], +"names": [], +"file": "base.css" +} diff --git a/source/scss/base.scss b/source/scss/base.scss index 00156d33..ad51a85c 100644 --- a/source/scss/base.scss +++ b/source/scss/base.scss @@ -47,10 +47,10 @@ H5 { } .lg_number { - font-size: $card-stats-size; + font-size: $service-stats-size; font-weight: bold; display: block; - color: $card-stats-color; + color: $service-stats-color; } .stats_area { diff --git a/source/tmpl/favicon.ico b/source/tmpl/favicon.ico index 0aa704bc..e8999029 100644 Binary files a/source/tmpl/favicon.ico and b/source/tmpl/favicon.ico differ