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:
Diffstat (limited to 'ui/app/controllers/CControllerHostDashboardView.php')
-rw-r--r--ui/app/controllers/CControllerHostDashboardView.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/controllers/CControllerHostDashboardView.php b/ui/app/controllers/CControllerHostDashboardView.php
index e738c79f444..efeed112c44 100644
--- a/ui/app/controllers/CControllerHostDashboardView.php
+++ b/ui/app/controllers/CControllerHostDashboardView.php
@@ -45,7 +45,7 @@ class CControllerHostDashboardView extends CController {
}
protected function checkPermissions() {
- if ($this->getUserType() < USER_TYPE_ZABBIX_USER) {
+ if (!$this->checkAccess(CRoleHelper::UI_MONITORING_HOSTS)) {
return false;
}
@@ -60,6 +60,9 @@ class CControllerHostDashboardView extends CController {
return (bool) $this->host;
}
+ /**
+ * @throws APIException|JsonException
+ */
protected function doAction() {
$host_dashboards = $this->getSortedHostDashboards();
@@ -101,11 +104,14 @@ class CControllerHostDashboardView extends CController {
updateTimeSelectorPeriod($time_selector_options);
+ $widget_defaults = APP::ModuleManager()->getWidgetsDefaults(true);
+
$data = [
'host' => $this->host,
'host_dashboards' => $host_dashboards,
'dashboard' => $dashboard,
- 'widget_defaults' => CWidgetConfig::getDefaults(CWidgetConfig::CONTEXT_TEMPLATE_DASHBOARD),
+ 'widget_defaults' => $widget_defaults,
+ 'configuration_hash' => CDashboardHelper::getConfigurationHash($dashboard, $widget_defaults),
'has_time_selector' => CDashboardHelper::hasTimeSelector($dashboard['pages']),
'time_period' => getTimeSelectorPeriod($time_selector_options),
'active_tab' => CProfile::get('web.dashboard.filter.active', 1)