Skip to content

Commit

Permalink
Merge pull request #298 from flask-dashboard/issues_257_and_295
Browse files Browse the repository at this point in the history
fixed the sorting of the columns containing error counts
  • Loading branch information
mircealungu committed Feb 28, 2020
2 parents 9821f8f + 30c6e90 commit 60afa3f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
7 changes: 7 additions & 0 deletions flask_monitoringdashboard/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,10 @@ footer.sticky-footer {

.greenText {color:green;}
.redText {color:red;}

.table_cell_with_error_count:after {
content:attr(error-count);
color: red;
vertical-align: super;
font-size: small;
}
22 changes: 14 additions & 8 deletions flask_monitoringdashboard/static/pages/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,33 @@
<tbody>
<tr ng-repeat="row in table" style="cursor: pointer"
ng-click="go('/endpoint/' + row.id + '/hourly_load')">

<td style="background-color: {{ row.color }}"></td>
<td style="max-width: 200px;">{{ row.name }}</td>

<td ng-show="isHits" style="text-align: right;">

<td class="table_cell_with_error_count"
ng-show="isHits"
style="text-align: right;"
ng-attr-error-count="{{ (row['hits-today-errors'] > 0) ? row['hits-today-errors'] : ''}}">
{{ row['hits-today'] | number }}
<span ng-show="row['hits-today-errors'] > 0"
style="color: red">({{ row['hits-today-errors'] }})</span>
</td>
<td ng-show="isHits" style="text-align: right;">
{{ row['hits-week'] | number }}
<span ng-show="row['hits-week-errors'] > 0"
style="color: red">({{ row['hits-week-errors'] }})</span>


<td class="table_cell_with_error_count"
ng-show="isHits" style="text-align: right;"
ng-attr-error-count="{{ (row['hits-week-errors'] > 0) ? row['hits-week-errors'] : ''}}">
{{ row['hits-week'] | number }}
</td>

<td ng-show="isHits" style="text-align: right;">
{{ row['hits-overall'] | number }}
</td>

<td ng-show="isHits==false" style="text-align: right;">{{ row['median-today'] | duration_ms }}</td>
<td ng-show="isHits==false" style="text-align: right;">{{ row['median-week'] | duration_ms }}</td>
<td ng-show="isHits==false" style="text-align: right;">{{ row['median-overall'] | duration_ms }}</td>
<td ng-show="isHits==false"
style="text-align: right;">{{ row['median-overall'] | duration_ms }}</td>
<td style="text-align: center;">{{ row['last-accessed'] | dateDifference }}</td>
<td ng-click="$event.stopPropagation()">
<monitorlevel name="row.name" value="row.monitor"></monitorlevel>
Expand Down

0 comments on commit 60afa3f

Please sign in to comment.