diff --git a/wire/modules/Process/ProcessLogger/ProcessLogger.module b/wire/modules/Process/ProcessLogger/ProcessLogger.module index ef465051..b408d043 100644 --- a/wire/modules/Process/ProcessLogger/ProcessLogger.module +++ b/wire/modules/Process/ProcessLogger/ProcessLogger.module @@ -69,8 +69,9 @@ class ProcessLogger extends Process { } public function ___execute() { + $log = $this->wire()->log; /** @var MarkupAdminDataTable $table */ - $table = $this->wire('modules')->get('MarkupAdminDataTable'); + $table = $this->wire()->modules->get('MarkupAdminDataTable'); $table->setEncodeEntities(false); $table->headerRow(array( $this->_x('Name', 'th'), @@ -78,24 +79,25 @@ class ProcessLogger extends Process { $this->_x('Entries', 'th'), $this->_x('Size', 'th'), )); - $logs = $this->wire()->log->getLogs(); - foreach($logs as $log) { - $logName = $log['name']; + $logInfos = $log->getLogs(true); + foreach($logInfos as $logInfo) { + $logName = $logInfo['name']; if(ctype_digit($logName)) $logName = " $logName"; $table->row(array( - $logName => "./view/$log[name]/", - "$log[modified] " . wireRelativeTimeStr($log['modified']), - $this->wire()->log->getTotalEntries($log['name']), - "$log[size] " . wireBytesStr($log['size']) + $logName => "./view/$logInfo[name]/", + "$logInfo[modified] " . wireRelativeTimeStr($logInfo['modified']), + $log->getTotalEntries($logInfo['name']), + "$logInfo[size] " . wireBytesStr($logInfo['size']) )); } - $cnt = count($logs); + $cnt = count($logInfos); + $icon = wireIconMarkup('tree', 'fw lg'); $out = - "

" . sprintf($this->_n('%d log', '%d logs', $cnt), $cnt) . "

" . + "

" . $icon . sprintf($this->_n('%d log', '%d logs', $cnt), $cnt) . "

" . $table->render() . "

" . "" . $this->_('Create or add to log file from the API:') . "
" . - "wire('log')->save('name', 'entry text');" . + "wire()->log->save('name', 'entry text');" . "

"; return $out; @@ -382,6 +384,8 @@ class ProcessLogger extends Process { } else { $table->headerRow($headers); } + + $leafIcon = wireIconMarkup('leaf', 'ProcessLogNew'); foreach($items as $entry) { @@ -390,7 +394,7 @@ class ProcessLogger extends Process { if($time && $ts > $time) { // highlight new items - $date = " $date"; + $date = $leafIcon . $date; } if(strpos($entry['text'], '&') !== false) { @@ -450,14 +454,15 @@ class ProcessLogger extends Process { $pagerOut = ''; } - $pageNum = $this->wire('input')->pageNum(); + $pageNum = $this->wire()->input->pageNum(); $time = time(); + $spinner = wireIconMarkup('tree', "fw lf $iconClass id='ProcessLogPage'"); $out = "
" . $pagerOut . "

" . - " $pagerHeadline " . + "$spinner $pagerHeadline " . "

" . $table->render() . "
$pagerOut
" .