70f4f18b
Administrator
first_commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
/* @var $panel yii\debug\panels\LogPanel */
/* @var $data array */
use yii\log\Target;
use yii\log\Logger;
?>
<?php
$title = 'Logged ' . count($data['messages']) . ' messages';
$errorCount = count(Target::filterMessages($data['messages'], Logger::LEVEL_ERROR));
$warningCount = count(Target::filterMessages($data['messages'], Logger::LEVEL_WARNING));
$output = [];
if ($errorCount) {
$output[] = "<span class=\"label label-important\">$errorCount</span>";
$title .= ", $errorCount errors";
}
if ($warningCount) {
$output[] = "<span class=\"label label-warning\">$warningCount</span>";
$title .= ", $warningCount warnings";
}
?>
<div class="yii-debug-toolbar-block">
<a href="<?= $panel->getUrl() ?>" title="<?= $title ?>">Log
<span class="label"><?= count($data['messages']) ?></span>
<?= implode(' ', $output) ?>
</a>
</div>
|