Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Verza <andrejs.verza@zabbix.com>2021-02-17 10:46:24 +0300
committerAndrejs Verza <andrejs.verza@zabbix.com>2021-02-17 10:46:24 +0300
commit9d84a209605d821bc432f4da8a18062c71e23aca (patch)
tree4a85cf1cfebab25863ad3d4949725d30dad47663 /ui/app/controllers
parent627515704bacbbb29acf3612b8c7bfde880ba5a0 (diff)
..F....... [ZBXNEXT-6309] partially implemented pages for host dashboards
Diffstat (limited to 'ui/app/controllers')
-rw-r--r--ui/app/controllers/CControllerHostDashboardView.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/app/controllers/CControllerHostDashboardView.php b/ui/app/controllers/CControllerHostDashboardView.php
index 8a13fef3159..81e9b108298 100644
--- a/ui/app/controllers/CControllerHostDashboardView.php
+++ b/ui/app/controllers/CControllerHostDashboardView.php
@@ -77,20 +77,18 @@ class CControllerHostDashboardView extends CController {
$dashboards = API::TemplateDashboard()->get([
'output' => ['dashboardid', 'name', 'templateid'],
- 'selectPages' => ['widgets'],
+ 'selectPages' => ['dashboard_pageid', 'name', 'display_period', 'widgets'],
'dashboardids' => [$dashboardid]
]);
$dashboard = array_shift($dashboards);
- $dashboard['widgets'] = [$dashboard['pages'][0]['widgets']];
-
if ($dashboard !== null) {
CProfile::update('web.host.dashboard.dashboardid', $dashboard['dashboardid'], PROFILE_TYPE_ID,
$this->getInput('hostid')
);
- $dashboard['widgets'] = CDashboardHelper::prepareWidgetsForGrid($dashboard['widgets'],
+ $dashboard['pages'] = CDashboardHelper::preparePagesForGrid($dashboard['pages'],
$dashboard['templateid'], true
);
@@ -108,7 +106,7 @@ class CControllerHostDashboardView extends CController {
'host_dashboards' => $host_dashboards,
'dashboard' => $dashboard,
'widget_defaults' => CWidgetConfig::getDefaults(CWidgetConfig::CONTEXT_TEMPLATE_DASHBOARD),
- 'time_selector' => CDashboardHelper::hasTimeSelector($dashboard['widgets'])
+ 'time_selector' => CDashboardHelper::hasTimeSelector($dashboard['pages'])
? getTimeSelectorPeriod($time_selector_options)
: null,
'active_tab' => CProfile::get('web.dashbrd.filter.active', 1)