[ZBX-6275] Error indicators for template objects Created: 2013 Feb 15  Updated: 2017 May 30  Resolved: 2013 Aug 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.6, 2.1.0
Fix Version/s: 2.1.2, 2.2.0

Type: Incident report Priority: Major
Reporter: Pavels Jelisejevs (Inactive) Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: template
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBX-6909 reset() expects parameter 1 to be arr... Closed

 Description   

The "error" columns in the template item, trigger and discovery rule lists must be removed: template objects can't have errors.



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2013 Feb 21 ]

This issue should be resolved after finishing ZBXNEXT-1575.

Comment by Guntis Zarins (Inactive) [ 2013 Jul 24 ]

For triggers list remove "error" column, if only one host selected and it is template.

Resolved in r37263 [svn://svn.zabbix.com/branches/dev/ZBX-6275@37263]

RESOLVED

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jul 24 ]

(1) It would be better to pass the status of the host in a "host" array, instead of a separate "host_status" parameter. If no host is selected, the "host" array should be empty.

guntis.zarins Resolved in r37293. RESOLVED

jelisejev In host_discovery.php you pass the host as an API call parameter. It should be added to the $data array.

guntis.zarins Resolved in 37298. RESOLVED

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jul 24 ]

(2) In configuration.host.discovery.list.php you shouldn't compare host_status with item status.

guntis.zarins Resolved in r37293. RESOLVED

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jul 24 ]

(3) If a ternary operator contains an expression with a comparison operator, it should be written in braces. For example:

($this->get('host_status') != HOST_STATUS_TEMPLATE) ? _('Error') : null

But:

$this->get('host_status') ? _('Error') : null

guntis.zarins Resolved in r37293. RESOLVED

jelisejev CLOSED.

Comment by Guntis Zarins (Inactive) [ 2013 Jul 25 ]

RESOLVED

Comment by Guntis Zarins (Inactive) [ 2013 Jul 25 ]

RESOLVED

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jul 25 ]

TESTED.

Comment by Guntis Zarins (Inactive) [ 2013 Jul 25 ]

(4) Was conflicts when merging development branch. Need to test.
Revision [svn://svn.zabbix.com/branches/dev/ZBX-6275/] r37317.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 26 ]

(5) Please, don't use empty() function in a new code

guntis.zarins RESOLVED in 37342.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 26 ]

(6) commented code should be removed

  • frontends/php/include/views/configuration.item.list.php:252:254

guntis.zarins RESOLVED in 37342.

sasha CLOSED

Comment by Guntis Zarins (Inactive) [ 2013 Jul 26 ]

RESOLVED

Comment by Alexander Vladishev [ 2013 Jul 26 ]

(7) It is bad idea to transfer all array of $host only for one "status" field.

guntis.zarins RESOLVED in 37346.

guntis.zarins Corrected that not be reseted hosts array. RESOLVED in 37351.

sasha REOPENED

  • frontends/php/host_discovery.php:324 excessive check for existence of an array of $hosts
  • frontends/php/include/views/configuration.item.list.php $statusIcons array is incorrectly processed

guntis.zarins RESOLVED in 37353.

sasha REOPENED

  • frontends/php/include/views/configuration.triggers.list.php:214:216 unused code
else {
    $error = null;
}
  • frontends/php/include/views/configuration.triggers.list.php:197 unnecessary variable $templated
  • frontends/php/include/views/configuration.host.discovery.list.php:77 $error should be initialized under "if ($data['showErrorColumn'])"

guntis.zarins RESOLVED in 37355.

sasha REVIEWED and TESTED with change in r37357. Please review.

guntis.zarins CLOSED

Comment by Alexander Vladishev [ 2013 Jul 26 ]

Successfully tested!

Comment by Guntis Zarins (Inactive) [ 2013 Jul 26 ]

FIXED in 2.1.2 r37360
CLOSED

Comment by Ivo Kurzemnieks [ 2013 Jul 29 ]

(8) In Templates -> Discovery rules there is an error after editing a discovery rule.

reset() expects parameter 1 to be array, null given [host_discovery.php:324]

Broken in r37359

guntis.zarins RESOLVED in r37403. [svn://svn.zabbix.com/branches/dev/ZBX-6275]

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 29 ]

(9) Templates -> Items and Templates -> Triggers.

  • error column is displayed after editing of an item or trigger

guntis.zarins RESOLVED in r37403. [svn://svn.zabbix.com/branches/dev/ZBX-6275]

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Jul 30 ]

(10) Please review my changes in r37421

guntis.zarins CLOSED.

Comment by Alexander Vladishev [ 2013 Jul 30 ]

(11) Error column is not displayed for "All" hosts

How to reproduce:

  • go to Configuration->Templates->Triggers
  • should be selected group "Templates" and a template (for example "Template OS Linux")
  • select group "Zabbix servers"

guntis.zarins RESOLVED in 37447.

guntis.zarins Change solution. RESOLVED in 37458.

sasha REOPENED

  • it's possible to open a trigger form with a lld-created trigger
  • an empty form is displayed with not existing (or not accessible) trigger ID

guntis.zarins RESOLVED in 37676.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Aug 07 ]

(12) frontends/php/include/html.inc.php:342:344 - according to description the get_header_host_table() function can return only objects.

sasha RESOLVED in r37644. Please review.

guntis.zarins CLOSED

Comment by Alexander Vladishev [ 2013 Aug 13 ]

(13) please review my changes in r 37781.

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 19 ]

Fixed in 2.1.3 r37942.

CLOSED.

Generated at Thu Apr 25 23:57:49 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.