This commit is contained in:
jqh 2020-07-14 16:32:35 +08:00
parent 5241eaa11b
commit eb0d72ffc8
2 changed files with 4 additions and 4 deletions

View File

@ -258,7 +258,7 @@
@foreach($logDirs as $d) @foreach($logDirs as $d)
<li @if($d === $fileName) class="active" @endif> <li @if($d === $fileName) class="active" @endif>
<a class="dir" href="{{ route('dcat-log-viewer', ['dir' => $d]) }}"> <a class="dir" href="{{ route('dcat-log-viewer', ['dir' => $d]) }}">
<i class="fa fa-folder-o"></i>{{ $d }} <i class="fa fa-folder-o"></i>{{ basename($d) }}
</a> </a>
</li> </li>
@endforeach @endforeach

View File

@ -158,10 +158,10 @@ class LogViewer
} }
$files = glob($this->mergeDirectory().'/*.*'); $files = glob($this->mergeDirectory().'/*.*');
$files = array_combine($files, array_map('filemtime', $files)); //$files = array_combine($files, array_map('filemtime', $files));
arsort($files); rsort($files);
return array_map('basename', array_keys($files)); return array_map('basename', $files);
} }
public function getLogDirectories() public function getLogDirectories()