Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(296)

Issue 14033043: Fix settings emptied out on save.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by frankban
Modified:
10 years, 7 months ago
Reviewers:
mp+188018, gary.poster
Visibility:
Public.

Description

Fix settings emptied out on save. Only the new values were stored in the database by the set_config callback. Also fixed a confusing object passing (using Y.bind) in inspector.js: at the moment newVals was defined it included all the configs. A side effect of env.set_config mutated the object so that the callback received just the new values. Now env.set_config no longer mutates its params. QA - bootstrap, deploy cs:~juju-gui/precise/juju-gui and expose the GUI; - switch the GUI to this branch: juju set juju-gui \ juju-gui-source=lp:~frankban/juju-gui/inspector-settings-emptied-out and wait 10 minutes for the change to be applied; - deploy another service (e.g. haproxy); - change the settings on haproxy and click save; - all the other options should no longer be emptied out. The changed options should display their new value, even after refreshing the page. https://code.launchpad.net/~frankban/juju-gui/inspector-settings-emptied-out/+merge/188018 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fix settings emptied out on save. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -41 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/store/env/go.js View 1 2 chunks +39 lines, -14 lines 0 comments Download
M app/store/env/python.js View 1 1 chunk +1 line, -1 line 0 comments Download
M app/views/ghost-inspector.js View 1 1 chunk +1 line, -1 line 0 comments Download
M app/views/inspector.js View 2 chunks +15 lines, -9 lines 0 comments Download
M app/views/utils.js View 1 1 chunk +21 lines, -16 lines 0 comments Download
M test/test_env_go.js View 1 chunk +23 lines, -0 lines 0 comments Download
M test/test_utils.js View 1 1 chunk +88 lines, -0 lines 0 comments Download

Messages

Total messages: 4
frankban
Please take a look.
10 years, 7 months ago (2013-09-27 11:03:26 UTC) #1
gary.poster
LGTM with trivials and QA ok. I was able to dupe in sandbox (the problematic ...
10 years, 7 months ago (2013-09-27 13:15:01 UTC) #2
frankban
On 2013/09/27 13:15:01, gary.poster wrote: > LGTM with trivials and QA ok. I was able ...
10 years, 7 months ago (2013-09-27 13:49:18 UTC) #3
frankban
10 years, 7 months ago (2013-09-27 14:22:13 UTC) #4
*** Submitted:

Fix settings emptied out on save.

Only the new values were stored in the database
by the set_config callback.

Also fixed a confusing object passing (using Y.bind)
in inspector.js: at the moment newVals was defined
it included all the configs. A side effect of env.set_config
mutated the object so that the callback received just the 
new values. Now env.set_config no longer mutates its params.

QA
- bootstrap, deploy cs:~juju-gui/precise/juju-gui
  and expose the GUI;
- switch the GUI to this branch:
    juju set juju-gui \
        juju-gui-source=lp:~frankban/juju-gui/inspector-settings-emptied-out
  and wait 10 minutes for the change to be applied;
- deploy another service (e.g. haproxy);
- change the settings on haproxy and click save;
- all the other options should no longer be emptied
  out. The changed options should display their new
  value, even after refreshing the page.

R=gary.poster
CC=
https://codereview.appspot.com/14033043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b