[ZBX-2737] Various messages at linking templates Created: 2010 Jul 22  Updated: 2017 May 30  Resolved: 2012 Jan 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.3
Fix Version/s: 2.0.0

Type: Incident report Priority: Trivial
Reporter: Alexander Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: trivial, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix pre1.8.3, r13531.


Attachments: JPEG File link.jpg     JPEG File new_trigger.jpg     JPEG File re-link.jpg     JPEG File unlink-and-clear.jpg     JPEG File unlink.jpg    

 Comments   
Comment by Alexander Sorokin (Inactive) [ 2011 Nov 11 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-2737

Comment by Igor Danoshaites (Inactive) [ 2011 Nov 17 ]

<Igor> Dev branch (changes for v1.8) tested, all is fine.

Need the same changes for trunk version.

Comment by richlv [ 2011 Dec 10 ]

(7) changelog entry has not been added to the trunk changelog

<sanja> RESOLVED

Comment by Alexander Sorokin (Inactive) [ 2011 Dec 22 ]

Fixed for trunk in development branch svn://svn.zabbix.com/branches/dev/ZBX-2737-trunk/

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(8) [GUI]
In many places messages looks like: "'Added new application "%2$s" to host "%1$s".'", i suggest change order of arguments. (yoda style? )

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(9) {GUI]
Class.capplication.php:635 Lets get host from db with one query and use api for this.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(10) [GUI]
class.cdiscoveryrule.php why message output is in "create" method if one already exist in "createReal"?
In "delete" same for all host with one query.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(11) [GUI]
class.cdrule.php:596 no point in the end.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(12) [GUI]
class.cgraph.php 2 tabs are used for indents.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(13) [GUI]
class.cgraph.php same for one api request for all hosts, CHost->get have 'graphids' parameter.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(14) [GUI]
Everywhere where word "host" is added to message it should check if it's really a "host" not "template".

<sanja> RESOLVED by new messages syntax (19).

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(15) [GUI]
class.citem.php one api request for all hosts in "delete".

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(16) [GUI]
class.citemprototype:814 there is "host" in message but item name is used as value.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(17) [GUI]
class.cproxy.php:543 maybe there should be "proxy" in message instead of "host"?

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(18) [GUI]
class.ctemplate.php all these get_host_by_* should be changed to API requests.

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

(19) [GUI]
We decided that format for messages should be changed, so....

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexander Vladishev [ 2011 Dec 30 ]

(21) [API] Why here "API_OUTPUT_EXTEND"?
frontends/php/api/classes/class.ctrigger.php:1649
frontends/php/api/classes/class.capplication.php:583,614

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Alexander Vladishev [ 2011 Dec 30 ]

(22) In all messages we should use "visible host name". I.e. a field "name" instead of "host"

<sanja> RESOLVED

<pavels> CLOSED.

Comment by richlv [ 2012 Jan 02 ]

(23) revisions 24458 and 24472 introduce incorrectly formatted sql queries. all sql queries should be reformatted in class.ctemplate.php

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 03 ]

(24) There are some places when detailed info messages don't appear at all, for instance, when updating an item prototype. Should they be added as well?

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 03 ]

(25) An error occurs when creating a trigger prototype:

mysql_real_escape_string() expects parameter 1 to be string, array given [include/db.inc.php:616]
Created: Trigger prototype "trigger2" on "".
reset() expects parameter 1 to be array, null given [api/classes/class.ctriggerprototype.php:1134]
Created: Trigger "trigger2" on "".

<sanja> RESOLVED

<richlv> modified lines in rev 24524 don't follow the coding guidelines

<sanja> RESOLVED

<pavels> CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 03 ]

(26) Please review my changes in r24495.

<sanja> CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 05 ]

TESTED.

Before merging, please review my changes in r24539.

<sanja> CLOSED

Comment by Alexander Vladishev [ 2012 Jan 08 ]

(27) error displayed, when saving a new trigger.
https://support.zabbix.com/secure/attachment/17771/new_trigger.jpg

<sanja> RESOLVED

<Sasha> REOPENED Now for an every trigger we make a very difficult SQL statement:

SELECT DISTINCT h.hostid,h.name,f.triggerid FROM hosts h,functions f,items i WHERE EXISTS ( SELECT hh.hostid FROM hosts hh, hosts_groups hgg, rights r, users_groups ug WHERE hh.hostid=h.hostid AND hh.hostid=hgg.hostid AND r.id=hgg.groupid AND r.groupid=ug.usrgrpid AND ug.userid=3 AND r.permission>=2 AND NOT EXISTS( SELECT hggg.groupid FROM hosts_groups hggg, rights rr, users_groups gg WHERE hggg.hostid=hgg.hostid AND rr.id=hggg.groupid AND rr.groupid=gg.usrgrpid AND gg.userid=3 AND rr.permission<2)) AND (f.triggerid IN ('13022')) AND h.hostid=i.hostid AND f.itemid=i.itemid AND f.triggerid BETWEEN 000000000000000 AND 099999999999999 AND h.status IN (0,1) LIMIT 1 OFFSET 0

We can take a host name from a trigger expression.

<sanja> RESOLVED

<Sasha> REOPENED Now we actually double function implode_exp(). We can change SQL statement in function implode_exp() and get array of visible host names.

<sanja> RESOLVED

<Sasha> REOPENED

  • please review my changes in r24709.
    <sanja> CLOSED
  • frontends/php/api/classes/class.cusermacro.php:735,738 The message "Macro [%1$s:%2$s] already exists" doesn't correspond to the our specification
    <sanja> RESOLVED
    <Sasha> REOPENED
  • _() expects exactly 1 parameter, 3 given [api/classes/class.cusermacro.php:734]
  • _() expects exactly 1 parameter, 3 given [api/classes/class.cusermacro.php:737]
    <sanja> RESOLVED
    <Sasha> CLOSED
  • implode_exp should be return unique list of visible host names
    <sanja> RESOLVED
    <Sasha> REOPENED
  • better use array_uniq() function after the cycle
    <sanja> RESOLVED
    <Sasha> CLOSED
  • please use an "implode()" function instead "foreach ..."
    <sanja> RESOLVED
    <Sasha> REOPENED
  • better use zbx_objectValues() function
    -$hosts = array();
    -foreach ($dbTriggers[$trigger['triggerid']]['hosts'] as $host) { - $hosts[] = $host['name']; -}

    -
    +$hosts = zbx_objectValues($dbTriggers[$trigger['triggerid']]['hosts'], 'name');
    <sanja> RESOLVED
    <Sasha> CLOSED

  • better use single quotes in strings like ", "
    <sanja> RESOLVED
    <Sasha> CLOSED

<Sasha> TESTED
<Sasha> Merged to trunk. Rev. 24780

Comment by Alexander Vladishev [ 2012 Jan 13 ]

(28) Cannot delete template:
pg_query(): Query failed: ERROR: missing FROM-clause entry for table "h" LINE 1: ...CT t.triggerid,t.description,t.flags,t.expression,h.name as ... ^ [include/db.inc.php:430]
...
<sanja> It is alredy fixed in ZBX-4519

Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 16 ]

(29) When adding a new trigger:

reset() expects parameter 1 to be array, null given [api/classes/class.ctrigger.php:1620]
Created: Trigger "321" on "".
<Slava> This can fix this bug:
$hostName=explode(':',$trigger['expression']);
info(_s('Created: Trigger "%1$s" on "%2$s".', $trigger['description'], str_replace('{','',reset($hostName))));

<richlv> better cross-merge the revision that fixed this in r24776

<Sasha> CLOSED duplicate. See (27)

Comment by richlv [ 2012 Jan 25 ]

(30) as discussed with zalex, string change that only changed [] to "" should also be reflected in all translations that had those strings translated. it should be made so that these translations are not lost (both msgid and msgstr must be properly changed). it should not be changed for languages that didn't have those strings translated.
if in doubt, consult translation maintainers : https://zabbix.org/wiki/Translating_Zabbix

<zalex> As I see this recommendation/requirement is totally ignored and at the moment (2012-05-13) is already not actual. All translated strings where [] have been changed to "" are lost.
CLOSED

Comment by Oleksii Zagorskyi [ 2012 May 13 ]

Issue closed.

Generated at Fri Apr 19 05:27:14 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.