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

show execution time of running job

parent 3cf0409e
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{ ...@@ -209,6 +209,13 @@ class cronlogrenderer extends cronlog{
$bIsRunning=true; $bIsRunning=true;
$sColStatus.=$this->t('status-running'); $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 // render table of last logfile per cron job
$sHtml.='<tr onclick="showFile(\''.$aEntry['logfile'].'\');" title="'.sprintf($this->t('row-click-show-logfile'), $aEntry['logfile']).'"' $sHtml.='<tr onclick="showFile(\''.$aEntry['logfile'].'\');" title="'.sprintf($this->t('row-click-show-logfile'), $aEntry['logfile']).'"'
.($bIsRunning ? ' class="message-running"' : '') .($bIsRunning ? ' class="message-running"' : '')
...@@ -218,11 +225,12 @@ class cronlogrenderer extends cronlog{ ...@@ -218,11 +225,12 @@ class cronlogrenderer extends cronlog{
. '<td>'.$aEntry['SCRIPTLABEL'].'</td>' . '<td>'.$aEntry['SCRIPTLABEL'].'</td>'
. '<td>'.$aEntry['server'].'</td>' . '<td>'.$aEntry['server'].'</td>'
. '<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>' .'<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>'
. '<td' . '<td'
.($aEntry['SCRIPTTTL']<$this->_iMinTtl ? ' class="message-warning" title="(using minimal TTL = '.$this->_iMinTtl.' min)"' : '') .($aEntry['SCRIPTTTL']<$this->_iMinTtl ? ' class="message-warning" title="(using minimal TTL = '.$this->_iMinTtl.' min)"' : '')
......
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