Skip to content
Snippets Groups Projects
Commit c7bbc1f2 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'add-running-jobs' into 'master'

show execution time of a currently running job

See merge request !17
parents f30ba66b 7f30cf56
No related branches found
No related tags found
1 merge request!17show execution time of a currently running job
......@@ -209,6 +209,13 @@ class cronlogrenderer extends cronlog{
$bIsRunning=true;
$sColStatus.=$this->t('status-running');
}
// execution time of time of currently running job
$iExectime=$aEntry['SCRIPTEXECTIME']
? (int)$aEntry['SCRIPTEXECTIME']
: date('U')-$aEntry['SCRIPTSTARTTIME']
;
// render table of last logfile per cron job
$sHtml.='<tr onclick="showFile(\''.$aEntry['logfile'].'\');" title="'.sprintf($this->t('row-click-show-logfile'), $aEntry['logfile']).'"'
.($bIsRunning ? ' class="message-running"' : '')
......@@ -218,11 +225,12 @@ class cronlogrenderer extends cronlog{
. '<td>'.$aEntry['SCRIPTLABEL'].'</td>'
. '<td>'.$aEntry['server'].'</td>'
. '<td'
.($aEntry['SCRIPTEXECTIME']>$this->_iMinTime4Timeline ? ' class="message-warning"' : '' )
.((int)$aEntry['SCRIPTEXECTIME']>$this->_iMinTime4Timeline ? ' class="message-warning"' : '' )
. '>'
.'<span style="display: none">'.str_pad((int)$aEntry['SCRIPTEXECTIME'], 6, '0', STR_PAD_LEFT).'</span>'
.(int)$aEntry['SCRIPTEXECTIME'].'s'
.((int)$aEntry['SCRIPTEXECTIME']>100 ? ' ('.round((int)$aEntry['SCRIPTEXECTIME']/60).'min)' : '')
.$iExectime.'s'
.($iExectime>100 ? ' ('.round($iExectime/60).'min)' : '')
.'</td>'
. '<td'
.($aEntry['SCRIPTTTL']<$this->_iMinTtl ? ' class="message-warning" title="(using minimal TTL = '.$this->_iMinTtl.' min)"' : '')
......
<?php
define("APP_VERSION", '2.1.3');
define("APP_VERSION", '2.1.4');
require_once('classes/render-adminlte.class.php');
require_once('classes/cronlog-renderer.class.php');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment