add last_defer stamp to timedoutdevices report

This commit is contained in:
Oliver Gorwits
2017-06-13 07:21:31 +01:00
parent 55cb1371d8
commit f418b1c081
2 changed files with 6 additions and 0 deletions

View File

@@ -20,6 +20,10 @@ ajax '/ajax/content/admin/timedoutdevices' => require_role admin => sub {
[{ -desc => 'deferrals' }, { -asc => [qw/device backend/] }]
})->hri->all;
foreach my $row (@set) {
next unless defined $row->{last_defer};
$row->{last_defer} =~ s/\.\d+//;
}
my $results = hostnames_resolve_async(\@set, [2,2,2]);
content_type('text/html');

View File

@@ -8,6 +8,7 @@
<th class="nd_center-cell">Device</th>
<th class="nd_center-cell">Device DNS</th>
<th class="nd_center-cell">Failed Connections</th>
<th class="nd_center-cell">Last Retry</th>
</tr>
</thead>
</tbody>
@@ -18,6 +19,7 @@
href="[% uri_for('/search') %]?tab=node&q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
<td class="nd_center-cell">[% row.dns | html_entity %]</td>
<td class="nd_center-cell">[% row.deferrals | html_entity %]</td>
<td class="nd_center-cell">[% row.last_defer | html_entity %]</td>
</tr>
[% END %]
</tbody>