[ZBX-4025] cannot create web scenario steps with the same name Created: 2011 Aug 09 Updated: 2017 May 30 Resolved: 2012 Aug 29 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 1.8.6 |
Fix Version/s: | 2.0.3rc1, 2.1.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | Aleksandrs Saveljevs | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | webmonitoring | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Create a Web scenario and a step in it. Try to create another step with the same name. Note that GUI silently updated the first step you have created earlier. |
Comments |
Comment by richlv [ 2011 Sep 04 ] |
still the same in trunk rev 21476. |
Comment by Eduards Samersovs (Inactive) [ 2012 Aug 27 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4025 |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(1) Create two steps with names "a" and "b" and save. Error in query [UPDATE items SET key_='web.test.in[a,a,bps]', status='0', delay='60' WHERE (itemid IN ('26488')) ] [Duplicate entry '10177-web.test.in[a,a,bps]' for key 2] <Eduard> RESOLVED <Toms> CLOSED |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(2) validateHttpDuplicateSteps() is called twice on save <Eduard> RESOLVED <Toms> I think this should be called once and on duplicate entry exception should be called <Eduard> It calls only once! Where is problem?? <Toms> CLOSED |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(3) Duplicate check should be done in single loop using hash table which is associative array in PHP <Eduard> RESOLVED <Toms> CLOSED. in_array() function still uses loop inside itself. review changes <Eduard> Review my changes, I offer show all duplicate steps not only first. <Toms> Sub-issue was closed, so I suggest to make it as a new comment <Eduard> If you change code you can't close sub-issue! |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(4) default.css missing newline at the end <Eduard> RESOLVED <Toms> CLOSED |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(5) config.inc.php <Eduard> RESOLVED <Toms> CLOSED |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(6) configuration.httpconf.popup.js.php new_variable should be local <Eduard> Yes, it is local, isn't? <Toms> without var operator in javascript variable takes more global scope until it finds var definition or it will be global <Eduard> Agree and see VAR before new_variable! function add_var_to_opener_obj(obj, name, value) { var new_variable = window.opener.document.createElement('input'); new_variable.type = 'hidden'; new_variable.name = name; new_variable.value = value; obj.appendChild(new_variable); }<Toms> CLOSED. Sorry, missed the versions. |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(7) httpconf.php line 148 we don't use ternary operators in general <Eduard> Why? <Toms> CLOSED. |
Comment by Toms (Inactive) [ 2012 Aug 28 ] |
(8) according to which code formatting guidelines you made to sql changes in config.inc.php? <Eduard> Multiline function parameters and array elements For function parameters and arrays definitions, there is no trailing comma after the last element both for definitions on single and multiple lines. If a function parameter or array element definition spans multiple lines, closing parenthesis should be on a separate line. Example: $data = array( P.S. certainly in this event we have only one parameter but it is long and now it is easier to read! <Toms> It is not for SQL, I propose to write for SQL as well. For example, if nothing is in line with opening bracket, then closing bracket should be in separate line as well! |
Comment by Toms (Inactive) [ 2012 Aug 29 ] |
TESTED |
Comment by Eduards Samersovs (Inactive) [ 2012 Aug 29 ] |
Fixed in versions pre-2.1.0 (beta) r29930, pre-2.0.3 r29929 |