[ZBX-12022] IT services expands all trigger descriptions Created: 2017 Apr 06 Updated: 2018 Oct 09 Resolved: 2017 Aug 29 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 3.0.8 |
Fix Version/s: | 3.0.11rc1, 3.2.8rc1, 3.4.2rc1, 4.0.0alpha1, 4.0 (plan) |
Type: | Problem report | Priority: | Critical |
Reporter: | Alexey Pustovalov | Assignee: | Miks Kronkalns |
Resolution: | Fixed | Votes: | 0 |
Labels: | itservices, trigger | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||
Team: | Team B | ||||
Sprint: | Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 14, Sprint 15 | ||||
Story Points: | 0.5 |
Description |
IT services configuration and monitoring tabs expand all related trigger descriptions. Our all configuration tabs do not expand trigger macros, also it is better to expand trigger descriptions on IT services monitoring ONLY if trigger is in PROBLEM status. |
Comments |
Comment by Miks Kronkalns [ 2017 Apr 07 ] |
(1) No translation string changes iivs CLOSED |
Comment by Miks Kronkalns [ 2017 Apr 07 ] |
RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-12022 |
Comment by Ivo Kurzemnieks [ 2017 May 17 ] |
(2) There are two more lists with services and trigger names that expand macros. Dependencies and Parent service. Macro resolving should also be removed from those two lists. Miks.Kronkalns RESOLVED in r68574. iivs Redundant code left. See (4). |
Comment by Ivo Kurzemnieks [ 2017 May 17 ] |
(3) I don't think you need to select trigger expression and triggerid in sub-query, since you now only need description. Miks.Kronkalns RESOLVED in r68574. iivs triggerid is still used in code that should be deleted. See (4). |
Comment by Ivo Kurzemnieks [ 2017 May 17 ] |
(4) Code related to trigger macros is redundant. // triggers $triggers = zbx_objectValues( array_filter($services, function($service) { return (bool) $service['trigger']; }), 'trigger' ); $triggers = zbx_toHash($triggers, 'triggerid'); foreach ($services as &$service) { if ($service['trigger']) { $service['trigger'] = $triggers[$service['trigger']['triggerid']]; } } unset($service); Miks.Kronkalns RESOLVED in r68574. iivs I gave an example of on piece of code, but there is more. For example: // expand trigger descriptions $triggers = zbx_objectValues( array_filter($parentServices, function($service) { return (bool) $service['trigger']; }), 'trigger' ); $triggers = zbx_toHash($triggers, 'triggerid'); foreach ($parentServices as $key => $parentService) { $parentServices[$key]['trigger'] = !empty($parentService['trigger']) ? $triggers[$parentService['trigger']['triggerid']]['description'] : ''; } All related code must be checked for redundancy. foreach ($parentServices as &$parentService) { $parentService['trigger'] = $parentService['trigger'] ? $parentService['trigger']['description'] : ''; } unset($parentService); REOPENED Miks.Kronkalns RESOLVED in r68841.
REOPENED Miks.Kronkalns RESOLVED in r68966. iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 May 17 ] |
(5) Discussed with sasha and decided to fix another bug: when choosing a parent service the links in the popup list are broken. Current parent link should be non-clickable, but it currectly is clickable as well as other names. Other service names except for root, have hidden links, but no link style. Miks.Kronkalns RESOLVED in r68574. iivs $selected_parent_service = getRequest('parentid', null); by default getRequest() already returns null, so need to force it. But then again if (!$selected_parent_service) for checking null is incorrect. So it's better to write getRequest('parentid', 0); and then compare using if ($selected_parent_service == 0) and not if ($selected_parent_service != 0) because == is easier on eyes. Miks.Kronkalns RESOLVED in r68841. iivs CLOSED |
Comment by Miks Kronkalns [ 2017 May 26 ] |
(6) Pupup window is too small. It should be in default size. Miks.Kronkalns RESOLVED in r68574. iivs Remove that from common.js and put either a normal size for services popup or ->onClick('return PopUp("services.php?pservices=1'.url_param('serviceid').'&parentid="+this.form.parentid.value);') . Miks.Kronkalns RESOLVED in r68841. iivs Line overflows and that is not the only list. REOPENED Miks.Kronkalns RESOLVED in r68966. iivs configuration.services.edit.php
configuration.services.parent.list.php
common.js
services.php
REOPENED Miks.Kronkalns RESOLVED in r69108. iivs Wrong again.
REOPENED Miks.Kronkalns RESOLVED in r71174. iivs Code in configuration.services.edit.php: L269-287 should be reverted. REOPENED Miks.Kronkalns RESOLVED in r71405. iivs CLOSED |
Comment by Miks Kronkalns [ 2017 Aug 17 ] |
Merged latest changes from 3.0 in the working branch r71406 (without conflicts). |
Comment by Miks Kronkalns [ 2017 Aug 28 ] |
Fixed:
|