diff options
author | Andrejs Verza <andrejs.verza@zabbix.com> | 2020-10-11 11:42:23 +0300 |
---|---|---|
committer | Andrejs Verza <andrejs.verza@zabbix.com> | 2020-10-11 11:42:23 +0300 |
commit | 4de30d396a01fab8b3fe950438fe619e7464ff49 (patch) | |
tree | 6b5c4ca65eb81f4ead5ad9e3a49ba7c6f0e6f8f3 /ui/app | |
parent | 9e7ea552f0dc6af69881656c1c4995d9320ed41b (diff) |
..F....... [ZBXNEXT-6001] fixed incomplete merge commit
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 11 | ||||
-rw-r--r-- | ui/app/views/monitoring.problem.view.php | 18 |
2 files changed, 10 insertions, 19 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index c9ad329f56e..ef7d495bc6a 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -72,7 +72,7 @@ abstract class CControllerHost extends CController { 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $groupids ? $groupids : null, + 'groupids' => $groupids, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) @@ -106,7 +106,7 @@ abstract class CControllerHost extends CController { * @param string $filter['evaltype'] Filter hosts by tags. * @param string $filter['tags'] Filter hosts by tag names and values. * @param string $filter['severities'] Filter problems on hosts by severities. - * @param string $filter['show_suppressed'] Filter supressed problems. + * @param string $filter['show_suppressed'] Filter suppressed problems. * @param int $filter['maintenance_status'] Filter hosts by maintenance. * @param int $filter['page'] Page number. * @param string $filter['sort'] Sorting field. @@ -115,15 +115,14 @@ abstract class CControllerHost extends CController { * @return array */ protected function getData(array $filter): array { - $groupids = $filter['groupids'] ? getSubGroups($filter['groupids'], $filter_groups) : null; - $limit = CSettingsHelper::get(CSettingsHelper::SEARCH_LIMIT) + 1; + $groupids = $filter['groupids'] ? getSubGroups($filter['groupids']) : null; $hosts = API::Host()->get([ 'output' => ['hostid', 'name', 'status'], 'evaltype' => $filter['evaltype'], 'tags' => $filter['tags'], 'inheritedTags' => true, - 'groupids' => $groupids ? $groupids : null, + 'groupids' => $groupids, 'severities' => $filter['severities'] ? $filter['severities'] : null, 'withProblemsSuppressed' => $filter['severities'] ? (($filter['show_suppressed'] == ZBX_PROBLEM_SUPPRESSED_TRUE) ? null : false) @@ -153,7 +152,7 @@ abstract class CControllerHost extends CController { // Split result array and create paging. $paging = CPagerHelper::paginate($filter['page'], $hosts, $filter['sortorder'], $view_curl); - // Get additonal data to limited host amount. + // Get additional data to limited host amount. $hosts = API::Host()->get([ 'output' => ['hostid', 'name', 'status', 'maintenance_status', 'maintenanceid', 'maintenance_type', 'available', 'snmp_available', 'jmx_available', 'ipmi_available', 'error', 'ipmi_error', 'snmp_error', diff --git a/ui/app/views/monitoring.problem.view.php b/ui/app/views/monitoring.problem.view.php index 1f17d605e5c..4e0d3e341c8 100644 --- a/ui/app/views/monitoring.problem.view.php +++ b/ui/app/views/monitoring.problem.view.php @@ -96,38 +96,30 @@ if ($data['action'] === 'problem.view') { ->setControls( (new CTag('nav', true, (new CList()) - ->addItem(new CRedirectButton(_('Export to CSV'), + ->addItem((new CRedirectButton(_('Export to CSV'), (new CUrl())->setArgument('action', 'problem.view.csv') - )) + ))->setId('export_csv')) ->addItem(get_icon('kioskmode', ['mode' => $web_layout_mode])) ))->setAttribute('aria-label', _('Content controls')) ); if ($web_layout_mode == ZBX_LAYOUT_NORMAL) { - $defaults = [ - 'tags' => [['tag' => '', 'value' => '', 'operator' => TAG_OPERATOR_LIKE]], - 'inventory' => [['field' => 'type', 'value' => '']] - ]; $filter = (new CTabFilter()) ->setId('monitoring_problem_filter') - ->setIdx($data['tabfilter_idx']) - ->setSelected((int) $data['tab_selected']) - ->setExpanded((bool) $data['tab_expanded']) - ->addTemplate(new CPartial($data['filter_view'], $data['filter_defaults'] + $defaults)); + ->setOptions($data['tabfilter_options']) + ->addTemplate(new CPartial($data['filter_view'], $data['filter_defaults'])); foreach ($data['filter_tabs'] as $tab) { $tab['tab_view'] = $data['filter_view']; $filter->addTemplatedTab($tab['filter_name'], $tab); } - $filter->addTimeselector($data['timerange']); // Set javascript options for tab filter initialization in monitoring.problem.view.js.php file. $data['filter_options'] = $filter->options; $widget->addItem($filter); - - $this->includeJsFile('monitoring.problem.view.js.php', $data); } + $this->includeJsFile('monitoring.problem.view.js.php', $data); $widget ->addItem($screen->get()) ->show(); |