diff options
author | Ivo Kurzemnieks <ivo.kurzemnieks@zabbix.com> | 2020-08-06 18:40:07 +0300 |
---|---|---|
committer | Ivo Kurzemnieks <ivo.kurzemnieks@zabbix.com> | 2020-08-06 18:40:57 +0300 |
commit | 34f8fa0b5f32bc618c1baf0bb755057e92810219 (patch) | |
tree | ad30e6c066badce553d57e7bcd1c15b5bb82132b /ui | |
parent | bbb9d01adaad6b5c49d5a28297560eae92d86ee7 (diff) |
..F....... [ZBX-18149] fixed discovered hosts showing links to host prototypes which should not possible
* commit 'bf469ddc602a1f65b5240626cf5ee4d08e931aa9':
..F....... [ZBX-18149] removed accidentally added field to request
..F....... [ZBX-18149] fixed discovered hosts showing links to host prototypes which should not possible
Diffstat (limited to 'ui')
-rw-r--r-- | ui/host_discovery.php | 2 | ||||
-rw-r--r-- | ui/include/views/configuration.host.discovery.list.php | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/ui/host_discovery.php b/ui/host_discovery.php index 83fb13431e0..94074b9025b 100644 --- a/ui/host_discovery.php +++ b/ui/host_discovery.php @@ -817,7 +817,7 @@ else { // Select LLD rules. $options = [ 'output' => API_OUTPUT_EXTEND, - 'selectHosts' => ['hostid', 'name', 'status'], + 'selectHosts' => ['hostid', 'name', 'status', 'flags'], 'selectItems' => API_OUTPUT_COUNT, 'selectGraphs' => API_OUTPUT_COUNT, 'selectTriggers' => API_OUTPUT_COUNT, diff --git a/ui/include/views/configuration.host.discovery.list.php b/ui/include/views/configuration.host.discovery.list.php index d9a8c7f9d00..c0c2f56bbce 100644 --- a/ui/include/views/configuration.host.discovery.list.php +++ b/ui/include/views/configuration.host.discovery.list.php @@ -263,12 +263,14 @@ foreach ($data['discoveries'] as $discovery) { ), CViewHelper::showNum($discovery['graphs']) ], - [ - new CLink(_('Host prototypes'), - (new CUrl('host_prototypes.php'))->setArgument('parent_discoveryid', $discovery['itemid']) - ), - CViewHelper::showNum($discovery['hostPrototypes']) - ], + ($discovery['hosts'][0]['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) + ? [ + new CLink(_('Host prototypes'), + (new CUrl('host_prototypes.php'))->setArgument('parent_discoveryid', $discovery['itemid']) + ), + CViewHelper::showNum($discovery['hostPrototypes']) + ] + : '', (new CDiv(CHtml::encode($discovery['key_'])))->addClass(ZBX_STYLE_WORDWRAP), $discovery['delay'], item_type2str($discovery['type']), |