get logs from device

This commit is contained in:
2020-10-15 11:20:21 +07:00
parent 4a33ee9a7d
commit 53de75104e
11 changed files with 376 additions and 59 deletions

View File

@@ -35,8 +35,8 @@ use yii\widgets\ActiveForm;
Kiểm soát truy cập
</a>
</li>
<li>
<a href="#">
<li class="<?php if (in_array($this->context->id, ['logs'])) echo "active"; ?>">
<a href="<?php echo \yii\helpers\Url::to(['/logs']); ?>">
Báo cáo
</a>
</li>

View File

@@ -33,6 +33,15 @@
['label' => 'Cấp quyền truy cập', 'url' => ['/assign'], 'icon' => 'cogs']
];
}
if (in_array($this->context->id, ['logs'])) {
$items = [
['label' => 'Sự kiện hôm nay', 'url' => ['/logs'], 'icon' => 'clock-o'],
['label' => 'Sự kiện 3 ngày gần đây', 'url' => ['/logs/3-days'], 'icon' => 'calendar'],
['label' => 'Sự kiện tuần này', 'url' => ['/logs/this-week'], 'icon' => 'calendar'],
['label' => 'Sự kiện tuần trước', 'url' => ['/logs/last-week'], 'icon' => 'calendar'],
['label' => 'Tất cả', 'url' => ['/logs/all'], 'icon' => 'calendar']
];
}
?>
<?=
dmstr\widgets\Menu::widget(