From 55c1a63ea6e3334eb52248eb791039a9ecf79af6 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen Date: Wed, 12 Jun 2019 13:16:17 +0200 Subject: [PATCH 1/2] Add link to target from dashboard --- config.go | 1 + manager.go | 1 + static/css/main.css | 21 +++++++++++++++++++++ static/index.html | 26 ++++++++++++++------------ 4 files changed, 37 insertions(+), 12 deletions(-) diff --git a/config.go b/config.go index 44b45d9..27912bf 100644 --- a/config.go +++ b/config.go @@ -70,6 +70,7 @@ func loadConfig() (Manager, error) { manager[c.Category] = append(manager[c.Category], &Service{ Prober: prober, Name: c.Name, + Target: c.Target, }) } diff --git a/manager.go b/manager.go index 39f928b..af10017 100644 --- a/manager.go +++ b/manager.go @@ -12,6 +12,7 @@ type Service struct { Name string Status probe.Status Message string + Target string } // Manager stores several services sorted by categories. diff --git a/static/css/main.css b/static/css/main.css index d0b715b..d30b32b 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -65,3 +65,24 @@ h1 { @keyframes blink { 50% { opacity: 0.2; } } + +/* Links */ + /* unvisited link */ + a:link { + color: white; +} + +/* visited link */ +a:visited { + color: white; +} + +/* mouse over link */ +a:hover { + color: white; +} + +/* selected link */ +a:active { + color: white; +} diff --git a/static/index.html b/static/index.html index e3c401f..1bd9067 100644 --- a/static/index.html +++ b/static/index.html @@ -13,18 +13,20 @@

{{ category }}

{{ service.Message }}
-
- -
-
- -
-
- -
-
- -
+ +
+ +
+
+ +
+
+ +
+
+ +
+
From 3726052e6919d248b06c5bef820fd819ef3035f6 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen Date: Wed, 12 Jun 2019 14:04:31 +0200 Subject: [PATCH 2/2] Fixed error in Docekerfile --- Dockerfile | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4da83e..7eceb84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,5 @@ RUN rice append --exec /board FROM alpine WORKDIR /app COPY --from=build-env /board /app/board -EXPOSE 80 -CMD ["/board", "-p", "8008"] \ No newline at end of file +EXPOSE 8080 +CMD ["/app/board"] \ No newline at end of file diff --git a/README.md b/README.md index a709c3d..41578b5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ After installation the board can be build as a docker image. # Building image docker build -t lesterpig/board . # Running container with board.yaml from current dir -docker run -p 8008:8008 -v ${PWD}/board.yaml:/app/board.yaml lesterpig/board /app/board -p 8008 +docker run -p 8080:8080 -v ${PWD}/board.yaml:/app/board.yaml lesterpig/board ``` Build single binary