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>2022-11-04 19:42:58 +0300
committerAndrejs Verza <andrejs.verza@zabbix.com>2022-11-04 19:42:58 +0300
commit953c2171dcb59a87e1c854c6ae1a855bd3073d57 (patch)
treea3879879bc80ff262345771b2487bda8061c397e
parent245cc244cc7b0ea6afe3e50302ef30057bc69f5a (diff)
..F....... [ZBXNEXT-7469] implemented dashboard configuration monitoring #4
-rw-r--r--ui/app/controllers/CControllerDashboardConfigurationHashGet.php19
-rw-r--r--ui/js/class.dashboard.js2
2 files changed, 14 insertions, 7 deletions
diff --git a/ui/app/controllers/CControllerDashboardConfigurationHashGet.php b/ui/app/controllers/CControllerDashboardConfigurationHashGet.php
index b528e08a3d9..3e7f789a3ff 100644
--- a/ui/app/controllers/CControllerDashboardConfigurationHashGet.php
+++ b/ui/app/controllers/CControllerDashboardConfigurationHashGet.php
@@ -60,11 +60,20 @@ class CControllerDashboardConfigurationHashGet extends CController {
$configuration_hash = null;
if ($this->checkAccess(CRoleHelper::UI_MONITORING_DASHBOARD)) {
- $db_dashboards = API::Dashboard()->get([
- 'output' => ['name', 'display_period', 'auto_start'],
- 'selectPages' => ['dashboard_pageid', 'name', 'display_period', 'widgets'],
- 'dashboardids' => $this->getInput('dashboardid')
- ]);
+ if ($this->hasInput('templateid')) {
+ $db_dashboards = API::TemplateDashboard()->get([
+ 'output' => ['name', 'display_period', 'auto_start'],
+ 'selectPages' => ['dashboard_pageid', 'name', 'display_period', 'widgets'],
+ 'dashboardids' => $this->getInput('dashboardid')
+ ]);
+ }
+ else {
+ $db_dashboards = API::Dashboard()->get([
+ 'output' => ['name', 'display_period', 'auto_start'],
+ 'selectPages' => ['dashboard_pageid', 'name', 'display_period', 'widgets'],
+ 'dashboardids' => $this->getInput('dashboardid')
+ ]);
+ }
if ($db_dashboards) {
$db_dashboard = $db_dashboards[0];
diff --git a/ui/js/class.dashboard.js b/ui/js/class.dashboard.js
index bf682861f11..681b96062c7 100644
--- a/ui/js/class.dashboard.js
+++ b/ui/js/class.dashboard.js
@@ -330,8 +330,6 @@ class CDashboard extends CBaseComponent {
clearTimeout(this._configuration_check_timeout_id);
}
- console.log('start', this._configuration_check_period);
-
this._configuration_check_time = Date.now() + this._configuration_check_period;
this._configuration_check_timeout_id = setTimeout(() => this._checkConfiguration(),
this._configuration_check_period