Skip to content

Commit

Permalink
Respect inline and block elements logic
Browse files Browse the repository at this point in the history
Instead of using block tags (DIV) and applying CSS to make them behave
like inline tags, use SPAN tags.

Wrap the first line of items in their
own DIV tag to ensure the following content is not impacted.  Make the
description float so that the exta attributes can be side by side with
it.
  • Loading branch information
smortex committed Oct 28, 2022
1 parent 8a427bb commit 3987fd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions lib/riemann/dash/public/eventPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ var eventPane = (function() {
var fixedFields = ['host', 'service', 'time', 'state', 'metric', 'ttl', 'description', 'tags'];
var fixedTemplate =
_.template(
'<div class="host">{{-host}}</div>' +
'<div class="service">{{-service}}</div>' +
'<div class="state {{-state}}">{{-state}}</div>' +
'<div class="metric">{{-metric}}</div>' +
'<div>' +
'<span class="host">{{-host}}</span>' +
'<span class="service">{{-service}}</span>' +
'<span class="state {{-state}}">{{-state}}</span>' +
'<span class="metric">{{-metric}}</span>' +
'<time class="absolute">{{-time}}</time>' +
'<div class="ttl">{{-ttl}}</div>' +
'<div class="tags">{{-tags}}</div>' +
'<div class="description">{{-description}}</description>');
'<span class="ttl">{{-ttl}}</span>' +
'<span class="tags">{{-tags}}</span>' +
'</div>' +
'<div class="description">{{-description}}</div>');

var rowTemplate =
_.template("<tr><td>{{-field}}</td><td>{{-value}}</td></tr>");
Expand Down
2 changes: 1 addition & 1 deletion lib/riemann/dash/views/css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ html,table {
}

* {
float: left;
padding: 3px;
}

Expand All @@ -172,6 +171,7 @@ html,table {
}

.description {
float: left;
clear: both;
white-space: pre-wrap;
}
Expand Down

0 comments on commit 3987fd9

Please sign in to comment.