Skip to content

Commit

Permalink
Merge pull request Lesterpig#12 from fmotrifork/master
Browse files Browse the repository at this point in the history
Add link to target from dashboard and fixed error in Dockerfile
  • Loading branch information
Lesterpig authored Jun 12, 2019
2 parents 6cf166d + 3726052 commit 1181b48
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
EXPOSE 8080
CMD ["/app/board"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func loadConfig() (Manager, error) {
manager[c.Category] = append(manager[c.Category], &Service{
Prober: prober,
Name: c.Name,
Target: c.Target,
})
}

Expand Down
1 change: 1 addition & 0 deletions manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Service struct {
Name string
Status probe.Status
Message string
Target string
}

// Manager stores several services sorted by categories.
Expand Down
21 changes: 21 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
26 changes: 14 additions & 12 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ <h1>{{ category }}</h1>
<span class="info">{{ service.Message }}</span>

<div ng-switch="service.Status">
<div ng-switch-when="OK" class="status status-OK">
<i class="fa fa-check"></i>
</div>
<div ng-switch-when="ERROR" class="status status-ERROR">
<i class="fa fa-times"></i>
</div>
<div ng-switch-when="WARNING" class="status status-WARNING">
<i class="fa fa-exclamation"></i>
</div>
<div ng-switch-default class="status status-UNKNOWN">
<i class="fa fa-question"></i>
</div>
<a href="{{ service.Target }}">
<div ng-switch-when="OK" class="status status-OK">
<i class="fa fa-check"></i>
</div>
<div ng-switch-when="ERROR" class="status status-ERROR">
<i class="fa fa-times"></i>
</div>
<div ng-switch-when="WARNING" class="status status-WARNING">
<i class="fa fa-exclamation"></i>
</div>
<div ng-switch-default class="status status-UNKNOWN">
<i class="fa fa-question"></i>
</div>
</a>
</div>
</div>

Expand Down

0 comments on commit 1181b48

Please sign in to comment.