Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat(ui): show last ping date
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Mar 10, 2017
1 parent a69a493 commit 14c73c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/agent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public function showForm($ID, $options = array()) {
'value' => $this->fields['plugin_flyvemdm_fleets_id'],
'entity' => $this->fields['entities_id']
]);
if (empty($fields['last_contact'])) {
$fields['last_contact'] = __('Never seen online', 'flyvemdm');
}
$data = [
'withTemplate' => (isset($options['withtemplate']) && $options['withtemplate'] ? '*' : ''),
'isNewID' => $this->isNewID($ID),
Expand Down
15 changes: 15 additions & 0 deletions tpl/agent.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@
{{ agent.fleet|raw }}
</td>
</tr>
<<<<<<< Updated upstream
=======
<tr class='tab_bg_1'>
<td>
{{ __('Last contact', 'flyvemdm') }}
</td>
<td>
{{ agent.last_contact }}
</td>
<td>
</td>
<td>
</td>
</tr>
>>>>>>> Stashed changes
{% if canUpdate == true %}
<tr class='tab_bg_1'>
<td>
Expand Down

0 comments on commit 14c73c7

Please sign in to comment.