Redesign forms to MVC rails and migrate javascript from Prototype to jQuery (ZBXNEXT-870)

[ZBXNEXT-903] Redesign Configuration->Items Created: 2011 Aug 24  Updated: 2017 May 31  Resolved: 2012 Mar 22

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 2.0.0

Type: Change Request (Sub-task) Priority: Blocker
Reporter: Eduards Samersovs (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: itemconfigform
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File item-interface.png    
Issue Links:
Duplicate
is duplicated by ZBX-4596 Error in Details when deleting trigge... Closed
is duplicated by ZBX-2631 confusing flexible interval configura... Closed
is duplicated by ZBX-1601 Clear history of items in templates d... Closed
is duplicated by ZBX-2071 Zabbix frontend fails on IPMI sensors... Closed
is duplicated by ZBX-2662 mass actions partially reset item filter Closed
is duplicated by ZBX-3330 excessive remembering of item filter ... Closed
is duplicated by ZBX-1335 Item filter related issues Closed
is duplicated by ZBX-3304 item filter control visual discrepancy Closed
is duplicated by ZBX-3373 Multiple host interfaces. GUI improve... Closed
is duplicated by ZBX-3466 no error message when creating an ite... Closed
is duplicated by ZBX-4280 Incorrect behavior filter for items Closed
is duplicated by ZBX-4110 ssh key auth form field "password" sh... Closed
is duplicated by ZBX-4588 Unused SNMPv3 fields are left when ch... Closed

 Description   

Specification http://zabbix.org/wiki/Docs/specs/ZBXNEXT-903



 Comments   
Comment by richlv [ 2011 Sep 02 ]

if this refers to item config form, would be nice to take ZBX-3373, ZBX-3402, ZBX-3466, ZBX-3881 and ZBX-4110 into account

Comment by richlv [ 2012 Jan 20 ]

(1) redesign seems to be fairly nice, but there seems to be no design document at all. current implementation should be documented on the specification wiki and basically describe how it works now (field order, value mappings and applications being sorted alphabetically etc etc)
otherwise it's not really possible for testers/reviewers to know for sure that it works as expected (for example, data type currently being sorted by base)

<alexei> We need design doc! I have so many ideas for this form.

<richlv> just to note down that current spec is seriously lacking - doesn't list field ordering, field visibility depending on contents of other fields etc
<richlv> spec does not conform to what is in the dev branch at all... things like how history clearing buttons are implemented and loooots of other things. not sure how testing or developing can happen without doing lots of redundant work.

<richlv> sorry, this doesn't work. i don't know how should i put it. THIS DOESN'T WORK.
there is no f-ing way anybody can determine whether item config form works according to the specification. oh, wait, let me try it differently - ti doesn't.
how can tests be created ? how could it be tested ? by word of mouth rumours ?

Comment by dimir [ 2012 Jan 25 ]

(2) When doing "mass update" of SNMPv3 (authPriv) item to change it to SNMPv2c the "SNMPv3 auth passphrase" and "SNMPv3 priv passphrase" fields are left in the form after update. The bug is not reproduced with direct item edit, only when doing mass update.

FYI in 1.8 it's reproduced in both cases.

<dimir> CLOSED. Moved to a separate issue ZBX-4588 .

Comment by richlv [ 2012 Jan 26 ]

item filter issues are also being looked at. as such, the following would be nice to consider :
ZBX-1335, ZBX-3330, ZBX-3982, ZBX-4280

lower priority :
ZBX-3304, ZBX-3982

Comment by Eduards Samersovs (Inactive) [ 2012 Jan 28 ]

Implemented in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-903

Comment by Oleksii Zagorskyi [ 2012 Jan 29 ]

(3) [Usability] I need to scroll page vertically to save an item changes -> unexpected.
My monitor height is 1050 pixels, btw
Is it ok?

<Eduard> Have decided not create new Tab, because all fields are important.. So it's ok.

<alexei> Yes, it is ok. We decided not to introduce any new tabs for now. CLOSED

Comment by Oleksii Zagorskyi [ 2012 Jan 29 ]

At least the ZBX-3373 is not implemented at all. Seems all other linked "duplicates" could/should be reviewed.
REOPENED.

<Eduard> RESOLVED

Comment by Alexei Vladishev [ 2012 Jan 30 ]

(4) Connect as an user having read-write permission to a host

Configuration->Hosts->Items (click on a host having templated items), click on a template item. See errors below the form:

reset() expects parameter 1 to be array, null given [include/forms.inc.php:951]
Undefined index: discoveryRule [include/forms.inc.php:958]
Undefined index: itemid [include/forms.inc.php:965]
Undefined index: templateid [include/forms.inc.php:967]

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexei Vladishev [ 2012 Jan 30 ]

(5) Configuration->Templates, click on template items

You will see list of items of a host, not template. It seems host selection is remembered in item filter.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexei Vladishev [ 2012 Jan 30 ]

(6) Configuration->Hosts->Items

Click on a template Template_Linux in item name "Template_Linux:Buffers memory". You are supposed to see list of Template_Linux items, however host items are displayed. Probably related to (5).

<Eduard> (5) RESOLVE this issue

<Vedmak> CLOSED

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

(7) If the host doesn't have any available interfaces for the selected item type, the interface select element breaks (tested in Firefox). https://support.zabbix.com/secure/attachment/17947/item-interface.png

<Eduard> RESOLVED ))

<pavels> CLOSED.

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

(8) when selecting some SNMP or IPMI type, the select key button becomes disabled, but the input itself is still editable.

<Eduard> It's ok, for SNMP and IMPI user type key by hands..

<pavels> Oh, OK. CLOSED.

Comment by Alexei Vladishev [ 2012 Jan 31 ]

(9) Configuration->Hosts->Items

Look at the debug information. The amount of API calls, permission checks and unnecessarily data exchange kills performance. It has to be fixed.

<Eduard> RESOLVED

<Vedmak> There is still quite a lot sqls.. ~130 more than in trunk. Maybe we should discuss that problem together.

<Eduard> RESOLVED

<Vedmak> CLOSED

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

(10) It would be nice to vertically align the custom multiplier checkbox, in firefox it's shifted to the top.

<Eduard> RESOLVED, still not in css at this time..

<pavels> Ok, CLOSED.

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

(11) Maybe we should group the input fields into several logical groups (e.g. type specific fields, intervals and history, applications) and add a margin between them? The form would be more usable, and it will be clearer, how the fields depend on each other.

<pavels> After some discussion with Eduards and Sasha we've decided not to do that now. CLOSED.

Comment by Alexei Vladishev [ 2012 Jan 31 ]

(12) Applications not sorted in the list of item prototypes "CPU, Availability", must be "Availability, CPU".

<Eduard> RESOLVED

<Vedmak> Sorting is not natural: 1, 12, 2.

<Eduard> RESOLVED

<Vedmak> CLOSED

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

(13) In configurations.item.edit.php:
1. there are a lot of really long lines, that are hard to read. Remember, that we have a 120 symbol limit;
2. I suggest you move all of the "insert_post_js" code to configuration.item.edit.js.php to avoid mixing PHP and JS.

<Eduard> RESOLVED

<pavels> I don't think that using large ternary operators in function calls is a good idea. I mean blocks like:

$itemFormList->addRow(_('Host'), array(
new CTextBox('hostname', $this->data['hostname'], ZBX_TEXTBOX_STANDARD_SIZE, true),
empty($this->data['itemid'])
? new CButton('btn_host', _('Select'),
"return PopUp('popup.php?dstfrm=".$itemForm->getName().'&dstfld1=hostname&dstfld2=form_hostid'.
"&srctbl=hosts_and_templates&srcfld1=name&srcfld2=hostid&noempty=1&submitParent=1', 450, 450);",
'formlist'
)
: null
));
<Eduard> After some discussion with Pavels we decided not to do this. CLOSED

Comment by Alexei Vladishev [ 2012 Jan 31 ]

(14) Please fix ZBX-3304 in other places as well (list of hosts, somewhere else?) to make it consistent.

<Eduard> RESOLVED also in Hosts and Host inventories.

<alexei> please make 'Filter' preferred action, i.e. mark it with yellow border

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexei Vladishev [ 2012 Feb 01 ]

(15) Only interfaces matching item type must be displayed. If no interfaces found then empty (or 'none') drop-down should be displayed with red message 'No interface found' on the right side.

<Eduard> RESOLVED

<alexei> it is not correct, the logic must be as follows:

case ITEM_TYPE_ZABBIX:
return INTERFACE_TYPE_AGENT;
case ITEM_TYPE_SNMPv1:
case ITEM_TYPE_SNMPv2c:
case ITEM_TYPE_SNMPv3:
case ITEM_TYPE_SNMPTRAP:
return INTERFACE_TYPE_SNMP;
case ITEM_TYPE_IPMI:
return INTERFACE_TYPE_IPMI;
case ITEM_TYPE_JMX:
return INTERFACE_TYPE_JMX;
case ITEM_TYPE_SIMPLE:
case ITEM_TYPE_EXTERNAL:
case ITEM_TYPE_SSH:
case ITEM_TYPE_TELNET:
return INTERFACE_TYPE_ANY;
default:
return INTERFACE_TYPE_NONE;

<Eduard> RESOLVED"

<pavels> I think the message should read "No interfaceS found". Plus, when we try to submit a form with that message, it still submits some interface ID and the error message reads "Item uses incorrect interface type" instead of "No interface for item".

<Eduard> After discussion with Pavels we decided not to do this. CLOSED

<pavels> Wait, we've decided no to change the "No interface found" message, the part about the error remains. REOPENED.

<Eduard> RESOLVED

<pavels> CLOSED.

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

(16) Regarding itemTypeInterface() in functions.js. It's not a good idea to duplicate this logic on the client side. I think we should pass the interface mapping rules as an associative array from the PHP side.

<Eduard> RESOLVED, impl. without any array..

<Vedmak> I'm not sure what it was about initially, but "insert_javascript_itemTypeInterface" must be removed from CItemGeneral class And i think Pavel's idea about implementation was that we should not change more than one function/method if we add new interface.

<Eduard> RESOLVED

<Vedmak> CLOSED

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

(17) In the item mass update form the "show value mappings" link should not be displayed if the value "show value" checkbox is unchecked.

<Eduard> RESOLVED

<pavels> The "show value mapping" link is broken (leads to config.php)

<Eduard> RESOLVED

<pavels> CLOSED.

Comment by Alexei Vladishev [ 2012 Feb 03 ]

(18) Please fix ZBX-1601 as well. Remove the history button for items from templates.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexander Vladishev [ 2012 Feb 03 ]

(19) "Log time format" field should be visible only with "Type of information" = "Log"

<Eduard> RESOLVED

<Sasha> CLOSED

Comment by Alexander Vladishev [ 2012 Feb 03 ]

(20) "SNMP OID", "SNMP community" and "Port" fields should not be visible with "Type of information" = "Character"

<Eduard> RESOLVED

<Sasha> CLOSED

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

(21) in the "copy to" form in FireFox there is no margin between the "target" label and the lower border.

<Eduard> RESOLVED

<pavels> CLOSED.

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

(22) The "Group" drop down is not working in firefox in the "copy to" form.

<Eduard> RESOLVED

<pavels> CLOSED.

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

(23) In configuration.item.edit.js the two jQuery.ready blocks should be united in one.

<Eduard> RESOLVED

<pavels> CLOSED.

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

(24) In configuration.item.edit.php the numerous zbx_subarray_push should be somehow restructured to be more maintainable.

<Eduard> After discussion with Pavels we decided optimize it not in this time. CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(25) [GUI]
In items.php there were two places where variable in "foreach" is used as reference and not unset afterwards.

<Eduard> RESOLVED

<pavels> CLOSED.

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(26) [GUI]
Go to any templated item configuration form, change for example "Populates host inventory field" value, then add new flexible interval, after page reload, "Populates host inventory field" value is reset.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(27) [GUI]
Applications subfilter for items list seems broken.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(28) [GUI]
Button "Select" near "key" input in item form is enable for JMX items and disabled for SNMP trap, not sure but it probably should be enabled for all types that are in keys popup and disabled for others.

Also that button has "hand" cursor even if disabled.

<Eduard> Cursor RESOLVED

<Vedmak> "Select" button should be disabled also for "Zabbix trapper", "External check", "Database monitor", "SSH agent", "TELENT agent", "JMX agent", "Calculated" item types.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(29) [GUI]
In mass update form interfaces can be updated even if items are from different hosts.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(30) [GUI]
In item list if we filter not by host, but by group, then host column is missing.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(31) [GUI]
In item mass update form, try to add 3 new flexible intervals then delete one of them, 2 are deleted instead of one. All the time random intervals are deleted..
And Undefined offset: 1 [include/views/configuration.item.massupdate.php:243] is shown.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(32) [GUI]
After adding flexible interval in item mass update form application list becomes empty.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 03 ]

(33) [GUI]
If we mass update item with incorrect type/interface pair, error is shown in item list (update form closes) and without any success/fail message.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexander Vladishev [ 2012 Feb 03 ]

(34) [GUI] flexible intervals in "Mass update" and "Item" forms should be unified.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 06 ]

(35) [GUI]
In item form only 7 flexible intervals can be added, but in mass update form 8.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 06 ]

(36) [GUI]
"Delete history and trends" button appears for items in template, but not appears for host inherited items, i think it should be otherwise.

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by richlv [ 2012 Feb 07 ]

(37) add an application to an item that has a name :
'
(single quote).

try to use it in item subfilter :

[02/07/2012 12:59:18 AM] JavaScript - items.php?sid=df9ac3e9bc8c64ca&form_refresh=4&filter_groupid=0&filter_hostid=0&filter_group=&filter_hostname=2&filter_application=&filter_name=&filter_key=&filter_type=-1&filter_delay=&filter_value_type=-1&filter_history=&filter_trends=&filter_status=-1&filter_with_triggers=-1&filter_templated_items=-1&subfilter_apps%5BU%23%25%40%26*%23%24%40%26*%23%24%26%24%40%232%5D=U%23%25%40%26*%23%24%40%26*%23%24%26%24%40%232
Script compilation
Syntax error at line 1 in event handler: expected ')', got ']'
', 'subfilter_apps[']', ''', true);
--------------------^

<Eduard> RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2012 Feb 07 ]

(38) [GUI]
Some fields are now not correctly hidden/shown, also when item type "Database monitoring" selected "Additional parameters" field is empty, but it should contain basic params as in trunk.

<Eduard> RESOLVED

<Vedmak> Previous fixed, but i found one more case. When select "Type of information" numeric unsigned and "Data type" boolean, multiplier fields are hidden, then change
"Type of information" to numeric float and then back to numeric unsigned, now multiplier fields are shown though boolean data type is selected.

<Vedmak> CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Feb 08 ]

trunk r.25256 version pre-1.9.10

Comment by richlv [ 2012 Mar 21 ]

(39) the merge has resurrected hosts_mon.php file, which was deleted in rev 24986
this has happened before already, so i'd strongly suggest figuring out what goes wrong with merges...

<Eduard> Out of ZBXNEXT-903 problem, CLOSED !

Generated at Wed Apr 24 07:14:37 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.