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-04-14 09:42:57 +0300
committerAndrejs Verza <andrejs.verza@zabbix.com>2022-04-14 09:43:33 +0300
commitd5b1f273b012fbd1341f2ab154d5e0cc9e7277b9 (patch)
treea75364d3f518970ec4a4a003a2a159f1debc3231
parent770543cf107b9021b98b9bd645d37a70a3233b8a (diff)
..F....... [ZBX-20782] fixed host mass-update popup displaying error response on open
(cherry picked from commit e7963fc99c48791a81f61820296b6c4dc6f609ed)
-rw-r--r--ui/app/controllers/CControllerPopupMassupdateHost.php4
-rw-r--r--ui/app/views/popup.massupdate.host.php4
-rw-r--r--ui/js/common.js9
3 files changed, 12 insertions, 5 deletions
diff --git a/ui/app/controllers/CControllerPopupMassupdateHost.php b/ui/app/controllers/CControllerPopupMassupdateHost.php
index 2114ccb39a5..4ada39853f8 100644
--- a/ui/app/controllers/CControllerPopupMassupdateHost.php
+++ b/ui/app/controllers/CControllerPopupMassupdateHost.php
@@ -476,7 +476,7 @@ class CControllerPopupMassupdateHost extends CControllerPopupMassupdateAbstract
'user' => [
'debug_mode' => $this->getDebugMode()
],
- 'ids' => $this->getInput('hostids'),
+ 'hostids' => $this->getInput('hostids'),
'inventories' => zbx_toHash(getHostInventories(), 'db_field'),
'location_url' => (new CUrl('zabbix.php'))
->setArgument('action', 'host.list')
@@ -494,7 +494,7 @@ class CControllerPopupMassupdateHost extends CControllerPopupMassupdateAbstract
$data['discovered_host'] = !(bool) API::Host()->get([
'output' => [],
- 'hostids' => $data['ids'],
+ 'hostids' => $data['hostids'],
'filter' => ['flags' => ZBX_FLAG_DISCOVERY_NORMAL],
'limit' => 1
]);
diff --git a/ui/app/views/popup.massupdate.host.php b/ui/app/views/popup.massupdate.host.php
index 0a7fe333594..65f42341f49 100644
--- a/ui/app/views/popup.massupdate.host.php
+++ b/ui/app/views/popup.massupdate.host.php
@@ -28,7 +28,7 @@ $form = (new CForm())
->setId('massupdate-form')
->setAttribute('aria-labeledby', ZBX_STYLE_PAGE_TITLE)
->addVar('action', 'popup.massupdate.host')
- ->addVar('ids', $data['ids'])
+ ->addVar('hostids', $data['hostids'])
->addVar('tls_accept', HOST_ENCRYPTION_NONE)
->addVar('update', '1')
->addVar('location_url', $data['location_url'])
@@ -295,7 +295,7 @@ $tabs = (new CTabView())
if (!$data['discovered_host']) {
$tabs->addTab('valuemaps_tab', _('Value mapping'), new CPartial('massupdate.valuemaps.tab', [
'visible' => [],
- 'hostids' => $data['ids'],
+ 'hostids' => $data['hostids'],
'context' => 'host'
]));
}
diff --git a/ui/js/common.js b/ui/js/common.js
index 367cd988cbc..002d28420b7 100644
--- a/ui/js/common.js
+++ b/ui/js/common.js
@@ -1008,7 +1008,14 @@ function openMassupdatePopup(action, parameters = {}, {
}) {
const form = trigger_element.closest('form');
- parameters.ids = chkbxRange.getSelectedIds();
+ switch (action) {
+ case 'popup.massupdate.host':
+ parameters.hostids = chkbxRange.getSelectedIds();
+ break;
+
+ default:
+ parameters.ids = chkbxRange.getSelectedIds();
+ }
switch (action) {
case 'popup.massupdate.item':