webui: New eventlog severity classification (#5830)

* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
This commit is contained in:
Richard Mayhew
2017-02-13 00:41:05 +02:00
committed by Neil Lathwood
parent a75ec7ab31
commit 5bfd23e7eb
31 changed files with 116 additions and 112 deletions

View File

@@ -118,7 +118,7 @@ foreach ($pkgs_id as $pkg) {
}
echo '+'.$name.'-'.$version.$dbuild.'-'.$arch;
log_event('Package installed: '.$name.' ('.$arch.') version '.$version.$dbuild, $device, 'package');
log_event('Package installed: ' . $name . ' (' . $arch . ') version ' . $version . $dbuild, $device, 'package');
} elseif (count($pkgs_db[$manager][$name][$arch], 1)) {
$pkg_c = dbFetchRow('SELECT * FROM `packages` WHERE `device_id` = ? AND `manager` = ? AND `name` = ? and `arch` = ? ORDER BY version DESC, build DESC', array($device['device_id'], $manager, $name, $arch));
if ($pkg_c['build'] != '') {
@@ -135,7 +135,7 @@ foreach ($pkgs_id as $pkg) {
'size' => $size,
);
dbUpdate($pkg_update, 'packages', '`pkg_id` = ?', array($pkg_c['pkg_id']));
log_event('Package updated: '.$name.' ('.$arch.') from '.$pkg_c['version'].$pkg_c_dbuild.' to '.$version.$dbuild, $device, 'package');
log_event('Package updated: ' . $name . ' (' . $arch . ') from ' . $pkg_c['version'] . $pkg_c_dbuild . ' to ' . $version . $dbuild, $device, 'package');
unset($pkgs_db_id[$pkg_c['pkg_id']]);
}//end if
}//end if
@@ -146,7 +146,7 @@ foreach ($pkgs_id as $pkg) {
foreach ($pkgs_db_id as $id => $pkg) {
dbDelete('packages', '`pkg_id` = ?', array($id));
echo '-'.$pkg['text'];
log_event('Package removed: '.$pkg['name'].' '.$pkg['arch'].' '.$pkg['version'].($pkg['build'] != '' ? '-'.$pkg['build'] : ''), $device, 'package');
log_event('Package removed: ' . $pkg['name'] . ' ' . $pkg['arch'] . ' ' . $pkg['version'] . ($pkg['build'] != '' ? '-' . $pkg['build'] : ''), $device, 'package');
}
echo "\n";