Corrected the format of the offline duration and added the column to the server list

pull/153/head
Matthew Pattman 2014-11-07 15:08:16 +00:00
parent 49a2d235c6
commit 400e84d354
2 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,7 @@ abstract class AbstractServerController extends AbstractController {
$server['last_online'] = psm_timespan($server['last_online']); $server['last_online'] = psm_timespan($server['last_online']);
$server['last_offline'] = psm_timespan($server['last_offline']); $server['last_offline'] = psm_timespan($server['last_offline']);
if ($server['last_offline'] != psm_get_lang('system', 'never')) { if ($server['last_offline'] != psm_get_lang('system', 'never')) {
$server['last_offline_duration'] = "(".psm_timespan($server['last_offline_duration']).")"; $server['last_offline_duration'] = "(".$server['last_offline_duration'].")";
} }
else { else {
$server['last_offline_duration'] = ""; $server['last_offline_duration'] = "";

View File

@ -8,6 +8,7 @@
<th class="visible-desktop">{{ label_type }}</th> <th class="visible-desktop">{{ label_type }}</th>
<th class="hidden-phone">{{ label_rtime }}</th> <th class="hidden-phone">{{ label_rtime }}</th>
<th class="hidden-phone">{{ label_last_online }}</th> <th class="hidden-phone">{{ label_last_online }}</th>
<th class="hidden-phone">{{ label_last_offline }}</th>
<th class="hidden-phone">{{ label_monitoring }}</th> <th class="hidden-phone">{{ label_monitoring }}</th>
<th class="hidden-phone">{{ label_action }}</th> <th class="hidden-phone">{{ label_action }}</th>
</tr> </tr>
@ -23,6 +24,7 @@
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.type }}</div></td> <td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.type }}</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.rtime }} s</div></td> <td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.rtime }} s</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.last_online }}</div></td> <td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.last_online }}</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.last_offline }} {{ server.last_offline_duration }}</div></td>
<td class="tight hidden-phone"><div class="table-cell-title"><i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i></div></td> <td class="tight hidden-phone"><div class="table-cell-title"><i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i></div></td>
<td class="tight hidden-phone"> <td class="tight hidden-phone">
<div class="table-cell-title"> <div class="table-cell-title">