Update Admin\Logs page
The last 14 files of logs are not removed.
This commit is contained in:
parent
5ccfccef81
commit
7e7f4a291b
2 changed files with 10 additions and 0 deletions
|
@ -26,8 +26,11 @@ class Logs extends Admin
|
|||
|
||||
$logsFiles = $this->c->LogViewer->files();
|
||||
$info = $this->c->LogViewer->info($logsFiles);
|
||||
$i = 0;
|
||||
|
||||
foreach ($info as $hash => &$cur) {
|
||||
++$i;
|
||||
|
||||
$cur['linkView'] = $this->c->Router->link(
|
||||
'AdminLogsAction',
|
||||
[
|
||||
|
@ -42,6 +45,11 @@ class Logs extends Admin
|
|||
'hash' => $hash,
|
||||
]
|
||||
);
|
||||
|
||||
if ($i < 15) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$cur['linkDelete'] = $this->c->Router->link(
|
||||
'AdminLogsAction',
|
||||
[
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
<span class="f-llv @if ($cur['debug']) f-llvde @endif" title="{{ __('Level debug') }}"><span>{{ num($cur['debug']) }}</span></span>
|
||||
<span class="f-logbt">
|
||||
<a class="f-btn f-lga f-lgadown" href="{{ $cur['linkDownload'] }}" title="{{ __('Download log') }}"><span class="f-lgs">{!! __('Download log') !!}</span></a>
|
||||
@if ($cur['linkDelete'])
|
||||
<a class="f-btn f-lga f-lgadel" href="{{ $cur['linkDelete'] }}" title="{{ __('Delete log') }}"><span class="f-lgs">{!! __('Delete log') !!}</span></a>
|
||||
@endif
|
||||
</span>
|
||||
</li>
|
||||
@endforeach
|
||||
|
|
Loading…
Add table
Reference in a new issue