diff options
author | Elina Pulke <elina.pulke@zabbix.com> | 2022-06-21 16:46:51 +0300 |
---|---|---|
committer | Elina Pulke <elina.pulke@zabbix.com> | 2022-06-21 16:46:51 +0300 |
commit | d93ed9e46dc307706176861b06e9c7e73b64c1a8 (patch) | |
tree | b204b02ef34b97b2e0de2ef1675f2f68fa462df9 | |
parent | 52fadc279aa4abf360b0bf1f39499b53296c3db4 (diff) | |
parent | 8ab124c5f723ad71cf42d63f098c7913182664a3 (diff) |
..F....... [ZBX-21185] fixed undefined index error for item popup in Configuration->Graphs->Create graph
Merge in ZBX/zabbix from feature/ZBX-21185-6.0 to release/6.0
* commit '8ab124c5f723ad71cf42d63f098c7913182664a3':
..F....... [ZBX-21185] fixed ['pattern'] undefined index error in item popup
-rw-r--r-- | ui/app/views/popup.generic.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/views/popup.generic.php b/ui/app/views/popup.generic.php index 76d2a9533af..4a00b473662 100644 --- a/ui/app/views/popup.generic.php +++ b/ui/app/views/popup.generic.php @@ -452,15 +452,16 @@ switch ($data['popup_type']) { else { foreach ($data['table_records'] as &$item) { $host = reset($item['hosts']); + $item_pattern = array_key_exists('pattern', $item) ? $item['pattern'] : $item['itemid']; $table->addRow([ $data['multiselect'] - ? new CCheckBox('item['.$item['itemid'].']', $item['pattern']) + ? new CCheckBox('item['.$item['itemid'].']', $item_pattern) : null, (new CLink($item['name'], 'javascript:void(0);')) ->onClick('javascript: addValue('. json_encode($options['reference']).', '. - json_encode($item['pattern']).', '. + json_encode($item_pattern).', '. $options['parentid']. ');'.$js_action_onclick), (new CDiv($item['key_']))->addClass(ZBX_STYLE_WORDWRAP), @@ -473,7 +474,7 @@ switch ($data['popup_type']) { ]); $item = [ - 'id' => $item['pattern'], + 'id' => $item_pattern, 'itemid' => $item['itemid'], 'name' => $options['patternselect'] ? $item['name'] |