[ZBX-6911] dashboard layout not stored in profiles Created: 2013 Aug 20  Updated: 2017 May 30  Resolved: 2013 Oct 09

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

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: dashboard, profiles, widget
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

dashboard layout (arranging elements in 3 columns) is not stored in the profiles table, it apparently is only stored in a cookie.

element expanded/collapsed state is stored in profiles



 Comments   
Comment by Vitalij Romanovskij (Inactive) [ 2013 Sep 25 ]

fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-6911

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(3) $_REQUEST values should not be accessed directly, but using the hasRequest() and getRequest() functions instead.

  • frontends/php/dashboard.php:128:136

vitalij_zab In my version I still don't have this functions

sasha please update to the latest trunk. It has been added in r38824.

vitalij_zab FIXED in r38862

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(4) $_REQUEST should never be modified during script execution

  • frontends/php/dashboard.php:129

vitalij_zab FIXED in r38834

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(5) single quotes should be used to define simple strings.

  • frontends/php/dashboard.php:132
    ":" => ':'

vitalij_zab FIXED in r38834 (row was changed to new logic)

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(6) Will be better to save widget positions in separate keys for columns and rows.

vitalij_zab FIXED in r38834

sasha REOPENED the name of indexes doesn't correspond to contents

web.dashboard.widget.webovr.row <=> web.dashboard.widget.webovr.col

Will be better to rename variables $xparam and $yparam to $col and $row accordingly

vitalij_zab FIXED in r38862

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(7) Profile keys should be renamed:

web.dashboard.sort.hat_syssum_widget => web.dashboard.widget.syssum.col
                                     => web.dashboard.widget.syssum.row
web.dashboard.rf_rate.hat_syssum     => web.dashboard.widget.syssum.rf_rate
web.dashboard.hats.hat_syssum.state  => web.dashboard.widget.syssum.state

vitalij_zab FIXED in r38834

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(8) [I] an upgrade patch should be added to rename existing profile indexes

sasha RESOLVED in r38853

asaveljevs In DBpatch_2010178(), there is the following SQL update statement:

if (ZBX_DB_OK > DBexecute(
		"update profiles"
		" set idx='web.dashboard.widget.%s.state'"
		" where idx='web.dashboard.state.hat_%s'",
		state_strings[i], state_strings[i]))
...

It is not clear where the old value of "web.dashboard.state.hat_%s" comes from. According to our documentation it should probably be "web.dashboard.hats.hat_%s.state".

sasha Thanks! RESOLVED in r38906

asaveljevs CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(9) Please review my changes in r38823.

vitalij_zab REVIEWED

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 26 ]

(10) Position of widgets shouldn't be saved in cookies

vitalij_zab FIXED in r38834

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Sep 30 ]

(11) Please review my changes in r38850:38852

vitalij_zab REVIEWED

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 01 ]

(12) Two AJAX requests are created when changing of position of a widget.

vitalij_zab FIXED in r38887

sasha CLOSED

Comment by richlv [ 2013 Oct 01 ]

(13) when testing, please verify that a user that has a 2.0 cookie in the browser will see the same layout, opening the frontend after it has been upgraded to 2.2 (and that this data will be written to profiles right away, and i guess we should drop the cookie, too)

sasha it should be documented only

<richlv> as discussed, in upgrade notes we should add info that :
a) after upgrade custom dashboard layouts will be lost;
b) after upgrade, browsers may have a cookie that is not used

vitalij_zab UPDATED documentation for "Upgrade notes for 2.2.0".

martins-v REVIEWED. Some text improvement made. Can be closed.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 01 ]

Frontend side is successfully tested!

Comment by Vitalij Romanovskij (Inactive) [ 2013 Oct 02 ]

fixed in pre-2.1.7 (trunk) r38922

Comment by Ivo Kurzemnieks [ 2013 Oct 02 ]

(14) Sorting dashboard blocks vertically, does not save it's position in profile table. Position is saved if block is moved horizontally.

vitalij_zab fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-6911 r38935

jelisejev I've made some changes in r38987. Using parent() forces us to rely on a specific HTML structure, which is a bad idea. Please review.

vitalij_zab REVIEWED, CLOSED

Comment by Vitalij Romanovskij (Inactive) [ 2013 Oct 04 ]

fixed in pre-2.1.7 (trunk) r38993

Comment by Pavels Jelisejevs (Inactive) [ 2013 Oct 04 ]

(15) After the change, the portletState() "load" method doesn't do anything and can be removed. We can also remove the "init" method.

jelisejev RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-6911.
Eduards CLOSED but please review r.39125

jelisejev Everything ok, thnx.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Oct 09 ]

Fixed in 2.1.7 r39136. CLOSED.

Generated at Fri Apr 19 06:11:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.