Skip to content

Commit

Permalink
a bit of dashboard cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
robscott committed Mar 28, 2019
1 parent f5cde2d commit 4875b72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pkg/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ func MainHandler(w http.ResponseWriter, r *http.Request, c conf.Configuration, k
}
tmpl, err := template.New(TemplateName).Funcs(template.FuncMap{
"getWarningWidth": func(rs validator.ResultSummary, fullWidth int) uint {
return uint(float64(rs.Successes+rs.Warnings) / float64(rs.Successes+rs.Warnings+rs.Failures) * float64(fullWidth))
return uint(float64(rs.Successes+rs.Warnings) / float64(rs.Successes+rs.Warnings+rs.Errors) * float64(fullWidth))
},
"getSuccessWidth": func(rs validator.ResultSummary, fullWidth int) uint {
return uint(float64(rs.Successes) / float64(rs.Successes+rs.Warnings+rs.Failures) * float64(fullWidth))
return uint(float64(rs.Successes) / float64(rs.Successes+rs.Warnings+rs.Errors) * float64(fullWidth))
},
"getIcon": func(rm validator.ResultMessage) string {
switch rm.Type {
Expand Down Expand Up @@ -96,7 +96,7 @@ func getTemplateData(config conf.Configuration, kubeAPI *kube.API) (TemplateData

templateData := TemplateData{
ClusterSummary: &validator.ResultSummary{
Errors: clusterErrors,
Errors: clusterErrors,
Warnings: clusterWarnings,
Successes: clusterSuccesses,
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/dashboard/templates/dashboard.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

{{ range .PodResults}}
<div class="extra">
<h4>Pod:</h4>
<h4>Pod Spec:</h4>
<ul>
{{ range $message := .Messages}}
<li class="{{ .Type }}"><i class="{{ getIcon $message }}"></i> {{ .Message }}</li>
Expand Down
9 changes: 4 additions & 5 deletions public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ body {
.namespace-content .extra h4 {
font-weight: bold;
font-size: 15px;
margin: 12px 25px 5px;
margin: 15px 25px 6px;
}

.namespace-content .extra ul {
Expand All @@ -178,10 +178,10 @@ body {

.namespace-content .extra i {
display: inline-block;
margin-right: 10px;
margin-right: 7px;
text-align: center;
width: 20px;
font-size: 20px;
font-size: 17px;
font-weight: bold;
position: relative;
bottom: -3px;
Expand All @@ -193,10 +193,9 @@ body {

.namespace-content .extra .warning i {
color: #f26c21;
font-size: 15px;
}

.namespace-content .extra .failure i {
.namespace-content .extra .error i {
color: #a11f4c;
}

Expand Down

0 comments on commit 4875b72

Please sign in to comment.