diff options
author | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-10-12 12:55:45 +0300 |
---|---|---|
committer | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-10-12 12:55:45 +0300 |
commit | 71f92a54451554983bbd42934a7c7a6bd771a133 (patch) | |
tree | fc516a096eaf9e67b7b6ea8676c8aa88fa896d9a /ui/app/controllers/CControllerHost.php | |
parent | 2645c25a71b766b47aed0d3b9f177d57c966e61e (diff) |
..F....... [ZBXNEXT-710] fixed filter unsaved state on multiselect data changes between database data and user posted data; added filter_reset for monitoring host
Diffstat (limited to 'ui/app/controllers/CControllerHost.php')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index ac7020047c2..398163d2e0d 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -296,6 +296,10 @@ abstract class CControllerHost extends CController { * @return array */ protected function cleanInput(array $input): array { + if (array_key_exists('filter_reset', $input) && $input['filter_reset']) { + return array_intersect_key(['filter_name' => ''], $input); + } + if (array_key_exists('tags', $input) && $input['tags']) { $input['tags'] = array_filter($input['tags'], function($tag) { return !($tag['tag'] === '' && $tag['value'] === ''); @@ -303,8 +307,6 @@ abstract class CControllerHost extends CController { $input['tags'] = array_values($input['tags']); } - $input += ['severities' => []]; - return $input; } } |