Add filter by priority to syslog

This commit is contained in:
Florian Beer
2016-08-05 13:34:23 +02:00
parent eac28226a9
commit a7a8c55eb5
3 changed files with 39 additions and 1 deletions

View File

@ -16,6 +16,21 @@
* the source code distribution for details.
*/
function generate_priority_icon($priority) {
$map = array(
"emerg" => "server_delete",
"alert" => "cancel",
"crit" => "application_lightning",
"err" => "application_delete",
"warning" => "application_error",
"notice" => "application_edit",
"info" => "application",
"debug" => "bug",
);
return '<img src="images/16/' . $map[$priority] .'.png" title="' . $priority . '">';
}
function format_number_short($number, $sf) {
// This formats a number so that we only send back three digits plus an optional decimal point.
// Example: 723.42 -> 723 72.34 -> 72.3 2.23 -> 2.23