diff options
author | Simon Rettberg | 2014-10-15 15:14:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-10-15 15:14:06 +0200 |
commit | 429ba64e17dd5d5acd542cf34774cdbe96d9818f (patch) | |
tree | ade66c974bafa900d8786a701e338bcb599c6a55 /modules/eventlog.inc.php | |
parent | Update translations (diff) | |
download | slx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.tar.gz slx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.tar.xz slx-admin-429ba64e17dd5d5acd542cf34774cdbe96d9818f.zip |
eventlog: add api, add page to view events
Diffstat (limited to 'modules/eventlog.inc.php')
-rw-r--r-- | modules/eventlog.inc.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/eventlog.inc.php b/modules/eventlog.inc.php index 1a63a0a6..0105928b 100644 --- a/modules/eventlog.inc.php +++ b/modules/eventlog.inc.php @@ -30,6 +30,7 @@ class Page_EventLog extends Page } $row['date'] = $day . date(' H:i', $row['dateline']); $row['icon'] = $this->typeToIcon($row['logtypeid']); + $row['color'] = $this->typeToColor($row['logtypeid']); $lines[] = $row; } @@ -52,4 +53,18 @@ class Page_EventLog extends Page } } + private function typeToColor($type) + { + switch ($type) { + case 'info': + return 'green'; + case 'warning': + return 'orange'; + case 'error': + return 'red'; + default: + return ''; + } + } + } |