Code

Make sure to break overly long "words" when displaying attribute values.
authorSebastian Harl <sh@tokkee.org>
Fri, 21 Nov 2014 22:54:53 +0000 (23:54 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 21 Nov 2014 22:54:53 +0000 (23:54 +0100)
static/style/main.css
templates/host.tmpl
templates/metric.tmpl
templates/service.tmpl

index d358e9bd259241df39cfcad581f7f003a64d86de..4ad9665675b10f8cf988f56c81f96129ed54d97b 100644 (file)
@@ -156,5 +156,12 @@ table.results {
 table.results th, table.results td {
        border: 1px solid #1e466d;
        padding: 3px;
+       text-align: left;
        vertical-align: top;
+       word-wrap: break-word;
+       white-space: normal;
+}
+
+table.results td.value {
+       word-break: break-all;
 }
index 6b56446492b635ad7364b03ce0c1c941432d2b95..6193070e06be7acc2043a63304553f5025f2c93a 100644 (file)
@@ -7,7 +7,7 @@
 {{if len .Attributes}}
                <tr><th colspan="2">Attributes</th></tr>
        {{range .Attributes}}
-               <tr><td>{{.Name}}</td><td>{{.Value}}</td></tr>
+               <tr><td>{{.Name}}</td><td class="value">{{.Value}}</td></tr>
        {{end}}
 {{else}}
                <tr><th colspan="2">No attributes</th></tr>
index a2648017ec47b18e2678dc03979e33a832b245be..40be05c14fa7a3aa02b985e7282ec80f214e0fbf 100644 (file)
@@ -9,7 +9,7 @@
 {{if len $m.Attributes}}
                <tr><th colspan="2">Attributes</th></tr>
        {{range $m.Attributes}}
-               <tr><td>{{.Name}}</td><td>{{.Value}}</td></tr>
+               <tr><td>{{.Name}}</td><td class="value">{{.Value}}</td></tr>
        {{end}}
 {{else}}
                <tr><th colspan="2">No attributes</th></tr>
index c5716daf951eb532401763842a3053b7725dc669..a232458b326ff125d084398a2c3511ca680ac452 100644 (file)
@@ -8,7 +8,7 @@
 {{if len $s.Attributes}}
                <tr><th colspan="2">Attributes</th></tr>
        {{range $s.Attributes}}
-               <tr><td>{{.Name}}</td><td>{{.Value}}</td></tr>
+               <tr><td>{{.Name}}</td><td class="value">{{.Value}}</td></tr>
        {{end}}
 {{else}}
                <tr><th colspan="2">No attributes</th></tr>