diff options
author | Mārtiņš Tālbergs <martins.talbergs@zabbix.com> | 2021-03-01 14:38:14 +0300 |
---|---|---|
committer | Mārtiņš Tālbergs <martins.talbergs@zabbix.com> | 2021-03-01 14:38:14 +0300 |
commit | 51979394019909650c7589dbc876318a98560ee6 (patch) | |
tree | a3287d0fc89e7b17f98f81dd8eb262f383fc1ed5 /ui | |
parent | 91b38cc69d6efdd60da89d4396441a41a11ae7ce (diff) |
A.F....... [ZBXNEXT-6288] removed resources "screen" and "slideshow" from audit log
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/controllers/CControllerAuditLogList.php | 2 | ||||
-rw-r--r-- | ui/app/views/js/reports.auditlog.list.js.php | 49 | ||||
-rw-r--r-- | ui/include/classes/api/services/CAuditLog.php | 12 | ||||
-rw-r--r-- | ui/include/defines.inc.php | 2 | ||||
-rw-r--r-- | ui/include/screens.inc.php | 20 | ||||
-rw-r--r-- | ui/screenconf.php | 11 | ||||
-rw-r--r-- | ui/screenedit.php | 9 | ||||
-rw-r--r-- | ui/slideconf.php | 4 |
8 files changed, 30 insertions, 79 deletions
diff --git a/ui/app/controllers/CControllerAuditLogList.php b/ui/app/controllers/CControllerAuditLogList.php index 9b896b26314..d0b3e1bdea2 100644 --- a/ui/app/controllers/CControllerAuditLogList.php +++ b/ui/app/controllers/CControllerAuditLogList.php @@ -201,10 +201,8 @@ class CControllerAuditLogList extends CController { AUDIT_RESOURCE_VALUE_MAP => _('Value map'), AUDIT_RESOURCE_IT_SERVICE => _('Service'), AUDIT_RESOURCE_MAP => _('Map'), - AUDIT_RESOURCE_SCREEN => _('Screen'), AUDIT_RESOURCE_SCENARIO => _('Web scenario'), AUDIT_RESOURCE_DISCOVERY_RULE => _('Discovery rule'), - AUDIT_RESOURCE_SLIDESHOW => _('Slide show'), AUDIT_RESOURCE_PROXY => _('Proxy'), AUDIT_RESOURCE_REGEXP => _('Regular expression'), AUDIT_RESOURCE_MAINTENANCE => _('Maintenance'), diff --git a/ui/app/views/js/reports.auditlog.list.js.php b/ui/app/views/js/reports.auditlog.list.js.php index 8184a64b3c5..206a7501266 100644 --- a/ui/app/views/js/reports.auditlog.list.js.php +++ b/ui/app/views/js/reports.auditlog.list.js.php @@ -79,27 +79,26 @@ AUDIT_RESOURCE_GRAPH_PROTOTYPE, AUDIT_RESOURCE_GRAPH_ELEMENT, AUDIT_RESOURCE_USER_GROUP, AUDIT_RESOURCE_APPLICATION, AUDIT_RESOURCE_TRIGGER, AUDIT_RESOURCE_TRIGGER_PROTOTYPE, AUDIT_RESOURCE_HOST_GROUP, AUDIT_RESOURCE_ITEM, AUDIT_RESOURCE_ITEM_PROTOTYPE, - AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, AUDIT_RESOURCE_SCREEN, - AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_SLIDESHOW, - AUDIT_RESOURCE_PROXY, AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, - AUDIT_RESOURCE_MACRO, AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, - AUDIT_RESOURCE_DASHBOARD, AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, - AUDIT_RESOURCE_TEMPLATE_DASHBOARD, AUDIT_RESOURCE_AUTH_TOKEN + AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, + AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_PROXY, + AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, AUDIT_RESOURCE_MACRO, + AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, AUDIT_RESOURCE_DASHBOARD, + AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, AUDIT_RESOURCE_TEMPLATE_DASHBOARD, + AUDIT_RESOURCE_AUTH_TOKEN ], AUDIT_ACTION_UPDATE => [ - AUDIT_RESOURCE_USER, AUDIT_RESOURCE_ZABBIX_CONFIG, - AUDIT_RESOURCE_MEDIA_TYPE, AUDIT_RESOURCE_HOST, AUDIT_RESOURCE_HOST_PROTOTYPE, - AUDIT_RESOURCE_ACTION, AUDIT_RESOURCE_GRAPH, AUDIT_RESOURCE_GRAPH_PROTOTYPE, - AUDIT_RESOURCE_GRAPH_ELEMENT, AUDIT_RESOURCE_USER_GROUP, AUDIT_RESOURCE_APPLICATION, - AUDIT_RESOURCE_TRIGGER, AUDIT_RESOURCE_TRIGGER_PROTOTYPE, AUDIT_RESOURCE_HOST_GROUP, - AUDIT_RESOURCE_ITEM, AUDIT_RESOURCE_ITEM_PROTOTYPE, AUDIT_RESOURCE_IMAGE, - AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, AUDIT_RESOURCE_SCREEN, - AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_SLIDESHOW, - AUDIT_RESOURCE_PROXY, AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, - AUDIT_RESOURCE_MACRO, AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, - AUDIT_RESOURCE_DASHBOARD, AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, - AUDIT_RESOURCE_SETTINGS, AUDIT_RESOURCE_HOUSEKEEPING, AUDIT_RESOURCE_AUTHENTICATION, - AUDIT_RESOURCE_TEMPLATE_DASHBOARD, AUDIT_RESOURCE_AUTH_TOKEN + AUDIT_RESOURCE_USER, AUDIT_RESOURCE_ZABBIX_CONFIG, AUDIT_RESOURCE_MEDIA_TYPE, + AUDIT_RESOURCE_HOST, AUDIT_RESOURCE_HOST_PROTOTYPE, AUDIT_RESOURCE_ACTION, AUDIT_RESOURCE_GRAPH, + AUDIT_RESOURCE_GRAPH_PROTOTYPE, AUDIT_RESOURCE_GRAPH_ELEMENT, AUDIT_RESOURCE_USER_GROUP, + AUDIT_RESOURCE_APPLICATION, AUDIT_RESOURCE_TRIGGER, AUDIT_RESOURCE_TRIGGER_PROTOTYPE, + AUDIT_RESOURCE_HOST_GROUP, AUDIT_RESOURCE_ITEM, AUDIT_RESOURCE_ITEM_PROTOTYPE, + AUDIT_RESOURCE_IMAGE, AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, + AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_PROXY, + AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, AUDIT_RESOURCE_MACRO, + AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, AUDIT_RESOURCE_DASHBOARD, + AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, AUDIT_RESOURCE_SETTINGS, + AUDIT_RESOURCE_HOUSEKEEPING, AUDIT_RESOURCE_AUTHENTICATION, AUDIT_RESOURCE_TEMPLATE_DASHBOARD, + AUDIT_RESOURCE_AUTH_TOKEN ], AUDIT_ACTION_DISABLE => [AUDIT_RESOURCE_HOST, AUDIT_RESOURCE_DISCOVERY_RULE], AUDIT_ACTION_ENABLE => [AUDIT_RESOURCE_HOST, AUDIT_RESOURCE_DISCOVERY_RULE], @@ -109,12 +108,12 @@ AUDIT_RESOURCE_GRAPH_PROTOTYPE, AUDIT_RESOURCE_GRAPH_ELEMENT, AUDIT_RESOURCE_USER_GROUP, AUDIT_RESOURCE_APPLICATION, AUDIT_RESOURCE_TRIGGER, AUDIT_RESOURCE_TRIGGER_PROTOTYPE, AUDIT_RESOURCE_HOST_GROUP, AUDIT_RESOURCE_ITEM, AUDIT_RESOURCE_ITEM_PROTOTYPE, - AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, AUDIT_RESOURCE_SCREEN, - AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_SLIDESHOW, - AUDIT_RESOURCE_PROXY, AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, - AUDIT_RESOURCE_MACRO, AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, - AUDIT_RESOURCE_CORRELATION, AUDIT_RESOURCE_DASHBOARD, AUDIT_RESOURCE_AUTOREGISTRATION, - AUDIT_RESOURCE_MODULE, AUDIT_RESOURCE_TEMPLATE_DASHBOARD, AUDIT_RESOURCE_AUTH_TOKEN + AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, + AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_PROXY, + AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_SCRIPT, AUDIT_RESOURCE_MACRO, + AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_ICON_MAP, AUDIT_RESOURCE_CORRELATION, + AUDIT_RESOURCE_DASHBOARD, AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, + AUDIT_RESOURCE_TEMPLATE_DASHBOARD, AUDIT_RESOURCE_AUTH_TOKEN ], AUDIT_ACTION_EXECUTE => [AUDIT_RESOURCE_SCRIPT] ]); ?> diff --git a/ui/include/classes/api/services/CAuditLog.php b/ui/include/classes/api/services/CAuditLog.php index 288c345b2b7..6c65643681a 100644 --- a/ui/include/classes/api/services/CAuditLog.php +++ b/ui/include/classes/api/services/CAuditLog.php @@ -90,12 +90,12 @@ class CAuditLog extends CApiService { AUDIT_RESOURCE_ACTION, AUDIT_RESOURCE_GRAPH, AUDIT_RESOURCE_GRAPH_ELEMENT, AUDIT_RESOURCE_USER_GROUP, AUDIT_RESOURCE_APPLICATION, AUDIT_RESOURCE_TRIGGER, AUDIT_RESOURCE_HOST_GROUP, AUDIT_RESOURCE_ITEM, AUDIT_RESOURCE_IMAGE, AUDIT_RESOURCE_VALUE_MAP, AUDIT_RESOURCE_IT_SERVICE, AUDIT_RESOURCE_MAP, - AUDIT_RESOURCE_SCREEN, AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_SLIDESHOW, - AUDIT_RESOURCE_SCRIPT, AUDIT_RESOURCE_PROXY, AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_REGEXP, - AUDIT_RESOURCE_MACRO, AUDIT_RESOURCE_TEMPLATE, AUDIT_RESOURCE_TRIGGER_PROTOTYPE, AUDIT_RESOURCE_ICON_MAP, - AUDIT_RESOURCE_DASHBOARD, AUDIT_RESOURCE_CORRELATION, AUDIT_RESOURCE_GRAPH_PROTOTYPE, - AUDIT_RESOURCE_ITEM_PROTOTYPE, AUDIT_RESOURCE_HOST_PROTOTYPE, AUDIT_RESOURCE_AUTOREGISTRATION, - AUDIT_RESOURCE_MODULE, AUDIT_RESOURCE_SETTINGS, AUDIT_RESOURCE_HOUSEKEEPING, AUDIT_RESOURCE_AUTHENTICATION, + AUDIT_RESOURCE_SCENARIO, AUDIT_RESOURCE_DISCOVERY_RULE, AUDIT_RESOURCE_SCRIPT, AUDIT_RESOURCE_PROXY, + AUDIT_RESOURCE_MAINTENANCE, AUDIT_RESOURCE_REGEXP, AUDIT_RESOURCE_MACRO, AUDIT_RESOURCE_TEMPLATE, + AUDIT_RESOURCE_TRIGGER_PROTOTYPE, AUDIT_RESOURCE_ICON_MAP, AUDIT_RESOURCE_DASHBOARD, + AUDIT_RESOURCE_CORRELATION, AUDIT_RESOURCE_GRAPH_PROTOTYPE, AUDIT_RESOURCE_ITEM_PROTOTYPE, + AUDIT_RESOURCE_HOST_PROTOTYPE, AUDIT_RESOURCE_AUTOREGISTRATION, AUDIT_RESOURCE_MODULE, + AUDIT_RESOURCE_SETTINGS, AUDIT_RESOURCE_HOUSEKEEPING, AUDIT_RESOURCE_AUTHENTICATION, AUDIT_RESOURCE_TEMPLATE_DASHBOARD, AUDIT_RESOURCE_AUTH_TOKEN ]; diff --git a/ui/include/defines.inc.php b/ui/include/defines.inc.php index 23c1c9fc089..0785aa76eea 100644 --- a/ui/include/defines.inc.php +++ b/ui/include/defines.inc.php @@ -230,10 +230,8 @@ define('AUDIT_RESOURCE_IMAGE', 16); define('AUDIT_RESOURCE_VALUE_MAP', 17); define('AUDIT_RESOURCE_IT_SERVICE', 18); define('AUDIT_RESOURCE_MAP', 19); -define('AUDIT_RESOURCE_SCREEN', 20); define('AUDIT_RESOURCE_SCENARIO', 22); define('AUDIT_RESOURCE_DISCOVERY_RULE', 23); -define('AUDIT_RESOURCE_SLIDESHOW', 24); define('AUDIT_RESOURCE_SCRIPT', 25); define('AUDIT_RESOURCE_PROXY', 26); define('AUDIT_RESOURCE_MAINTENANCE', 27); diff --git a/ui/include/screens.inc.php b/ui/include/screens.inc.php index 80739dd25eb..3a3e37fa739 100644 --- a/ui/include/screens.inc.php +++ b/ui/include/screens.inc.php @@ -80,11 +80,6 @@ function addScreenRow(array $screen, $row_num) { $result = API::Screen()->update($options); - if ($result) { - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], - _('Row added') - ); - } DBend($result); } @@ -111,11 +106,6 @@ function addScreenColumn(array $screen, $col_num) { $result = API::Screen()->update($options); - if ($result) { - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], - _('Column added') - ); - } DBend($result); } @@ -145,11 +135,6 @@ function delScreenRow(array $screen, $row_num) { $result = API::Screen()->update($options); - if ($result) { - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], - _('Row deleted') - ); - } DBend($result); } @@ -179,11 +164,6 @@ function delScreenColumn(array $screen, $col_num) { $result = API::Screen()->update($options); - if ($result) { - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], - _('Column deleted') - ); - } DBend($result); } diff --git a/ui/screenconf.php b/ui/screenconf.php index fa7c1ffc0a0..4b0b1685fcf 100644 --- a/ui/screenconf.php +++ b/ui/screenconf.php @@ -141,12 +141,6 @@ if (hasRequest('add') || hasRequest('update')) { $screenOld = reset($screenOld); $result = API::Screen()->update($screen); - - if ($result) { - add_audit_ext(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], 'screens', - $screenOld, $screen - ); - } } else { $screen = [ @@ -192,8 +186,6 @@ if (hasRequest('add') || hasRequest('update')) { if ($result) { $screenid = reset($screenids); $screenid = reset($screenid); - - add_audit_details(AUDIT_ACTION_ADD, AUDIT_RESOURCE_SCREEN, $screenid, $screen['name']); } } @@ -231,9 +223,6 @@ elseif ((hasRequest('delete') && hasRequest('screenid')) $result = DBend($result); if ($result) { - foreach ($screens as $screen) { - add_audit_details(AUDIT_ACTION_DELETE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name']); - } unset($_REQUEST['screenid'], $_REQUEST['form']); uncheckTableRows($parent_id); } diff --git a/ui/screenedit.php b/ui/screenedit.php index 72464ced961..056ab312db7 100644 --- a/ui/screenedit.php +++ b/ui/screenedit.php @@ -165,7 +165,6 @@ if (!empty($_REQUEST['ajaxAction']) && $_REQUEST['ajaxAction'] == 'sw_pos') { ' AND screenitemid='.zbx_dbstr($sitem['screenitemid']) ); } - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], 'Screen items switched'); DBend(true); } @@ -218,11 +217,6 @@ if (hasRequest('add') || hasRequest('update')) { } if ($result) { - add_audit_details(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], 'Cell changed '. - (hasRequest('screenitemid') ? 'screen itemid "'.getRequest('screenitemid').'"' : ''). - (hasRequest('x') && hasRequest('y') ? ' coordinates "'.getRequest('x').','.getRequest('y').'"' : ''). - (hasRequest('resourcetype') ? ' resource type "'.getRequest('resourcetype').'"' : '') - ); unset($_REQUEST['form']); } @@ -237,9 +231,6 @@ elseif (hasRequest('delete')) { if ($screenitemid) { $screenitemid = reset($screenitemid); $screenitemid = reset($screenitemid); - add_audit_details(AUDIT_ACTION_DELETE, AUDIT_RESOURCE_SCREEN, $screen['screenid'], $screen['name'], - 'Screen itemid "'.$screenitemid.'"' - ); } unset($_REQUEST['x']); diff --git a/ui/slideconf.php b/ui/slideconf.php index d8064f7d46a..e86c7408f6d 100644 --- a/ui/slideconf.php +++ b/ui/slideconf.php @@ -164,7 +164,6 @@ if (hasRequest('add') || hasRequest('update')) { } if ($result) { - add_audit($auditAction, AUDIT_RESOURCE_SLIDESHOW, ' Name "'.getRequest('name').'" '); unset($_REQUEST['form'], $_REQUEST['slideshowid']); } @@ -184,9 +183,6 @@ elseif (isset($_REQUEST['delete']) && isset($_REQUEST['slideshowid'])) { $result = delete_slideshow($_REQUEST['slideshowid']); - if ($result) { - add_audit(AUDIT_ACTION_DELETE, AUDIT_RESOURCE_SLIDESHOW, ' Name "'.$db_slideshow['name'].'" '); - } unset($_REQUEST['slideshowid'], $_REQUEST['form']); $result = DBend($result); |