FIX client idle time in millis
This commit is contained in:
parent
16e787ec0c
commit
ab56fde2a1
3 changed files with 7 additions and 2 deletions
|
@ -124,6 +124,11 @@ $container['view'] = function ($container) use ($app) {
|
|||
});
|
||||
$view->getEnvironment()->addFilter($timeInSecondsFilter);
|
||||
|
||||
$timeInMillisFilter = new Twig_SimpleFilter('timeInMillis', function($millis) use ($container) {
|
||||
return $container['ts']->getInstance()->convertSecondsToStrTime(floor($millis/1000));
|
||||
});
|
||||
$view->getEnvironment()->addFilter($timeInMillisFilter);
|
||||
|
||||
// timestamp to carbon
|
||||
$timestampFilter = new Twig_SimpleFilter('timestamp', function($timestamp) {
|
||||
return Carbon::createFromTimestamp($timestamp);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{% include 'table.twig' with {'data': data,
|
||||
'hide': [{'key': 'client_type', 'values': ['1']}],
|
||||
'filters': [
|
||||
{'key': 'client_idle_time', 'apply': 'timeInSeconds'},
|
||||
{'key': 'client_idle_time', 'apply': 'timeInMillis'},
|
||||
{'key': 'connection_connected_time', 'apply': 'timeInSeconds'},
|
||||
{'key': 'client_created', 'apply': 'timestamp'},
|
||||
{'key': 'client_lastconnected', 'apply': 'timestamp'}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<h2 class="header">{% trans %}online_info.h.details{% endtrans %}</h2>
|
||||
{% include 'keyvalue.twig' with {'data': data, 'filters': [
|
||||
{'key': 'client_idle_time', 'apply': 'timeInSeconds'},
|
||||
{'key': 'client_idle_time', 'apply': 'timeInMillis'},
|
||||
{'key': 'connection_connected_time', 'apply': 'timeInSeconds'},
|
||||
{'key': 'client_created', 'apply': 'timestamp'},
|
||||
{'key': 'client_lastconnected', 'apply': 'timestamp'},
|
||||
|
|
Reference in a new issue