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

Issue 7095058: Support read-only mode in the GUI

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by frankban
Modified:
12 years, 2 months ago
Reviewers:
mp+143289
Visibility:
Public.

Description

Support read-only mode in the GUI The GUI can be configured so that it denies the execution of write operations. This branch introduces a check at Juju environment level: if the user tries to change the environment and the GUI is in read-only mode, the environment object refuses to send the message to the server, fires a permissionDenied event, logs the exception and executes the provided callback (if any) passing an error event. Subsequently, an error notification is created by the app. In a pre-implementation call with Gary we decided that controls and widget can still be displayed, they are just ineffective. Other changes: Added documentation for all modified objects/methods/functions. Fixed a bug: the environment view was not propagating the getModelURL from the app to the topology instance. Also added a test for this bug. Updated the destroy service callback to make the destroy dialog disappear also when an error occurs. Fixed an intermittent failure when test_environment_view.js is run in isolation. https://code.launchpad.net/~frankban/juju-gui/bug-1083928-read-only-mode/+merge/143289 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 25

Patch Set 2 : Support read-only mode in the GUI #

Patch Set 3 : Support read-only mode in the GUI #

Patch Set 4 : Support read-only mode in the GUI #

Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -54 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 3 chunks +25 lines, -1 line 0 comments Download
M app/config-debug.js View 1 chunk +1 line, -0 lines 0 comments Download
M app/config-prod.js View 1 chunk +1 line, -0 lines 0 comments Download
M app/store/env.js View 1 9 chunks +171 lines, -28 lines 0 comments Download
M app/views/environment.js View 1 chunk +1 line, -0 lines 0 comments Download
M app/views/topology/service.js View 1 3 chunks +4 lines, -3 lines 0 comments Download
M app/views/utils.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/test_app.js View 1 chunk +9 lines, -0 lines 0 comments Download
M test/test_application_notifications.js View 1 chunk +11 lines, -2 lines 0 comments Download
M test/test_env.js View 1 1 chunk +121 lines, -0 lines 0 comments Download
M test/test_environment_view.js View 2 chunks +14 lines, -1 line 0 comments Download
M test/test_service_module.js View 1 1 chunk +6 lines, -5 lines 0 comments Download
M undocumented View 1 chunk +0 lines, -13 lines 0 comments Download

Messages

Total messages: 9
frankban
Please take a look.
12 years, 2 months ago (2013-01-15 12:35:48 UTC) #1
gary.poster
Hi Francesco. This is a code-only review, which I'm posting so you can look and ...
12 years, 2 months ago (2013-01-15 14:57:20 UTC) #2
frankban
On 2013/01/15 14:57:20, gary.poster wrote: > Hi Francesco. This is a code-only review, which I'm ...
12 years, 2 months ago (2013-01-15 15:27:13 UTC) #3
gary.poster
On 2013/01/15 15:27:13, frankban wrote: > On 2013/01/15 14:57:20, gary.poster wrote: > > Hi Francesco. ...
12 years, 2 months ago (2013-01-15 15:45:53 UTC) #4
teknico
Land with changes. Special thanks for all those method docs, and sorry for peppering the ...
12 years, 2 months ago (2013-01-15 16:45:43 UTC) #5
gary.poster
Land with changes. QA and test runs went well other than issues already on trunk. ...
12 years, 2 months ago (2013-01-15 18:06:25 UTC) #6
gary.poster
Land with changes. QA and test runs went well other than issues already on trunk. ...
12 years, 2 months ago (2013-01-15 18:06:48 UTC) #7
frankban
Please take a look. https://codereview.appspot.com/7095058/diff/1/app/store/env.js File app/store/env.js (right): https://codereview.appspot.com/7095058/diff/1/app/store/env.js#newcode159 app/store/env.js:159: var message = ('GUI is ...
12 years, 2 months ago (2013-01-15 18:09:59 UTC) #8
frankban
12 years, 2 months ago (2013-01-15 18:30:01 UTC) #9
*** Submitted:

Support read-only mode in the GUI

The GUI can be configured so that it denies the 
execution of write operations. This branch 
introduces a check at Juju environment level:
if the user tries to change the environment and
the GUI is in read-only mode, the environment
object refuses to send the message to the server,
fires a permissionDenied event, logs the exception
and executes the provided callback (if any) 
passing an error event.
Subsequently, an error notification is created by
the app. In a pre-implementation call with Gary 
we decided that controls and widget can still be
displayed, they are just ineffective.

Other changes:

Added documentation for all modified 
objects/methods/functions.

Fixed a bug: the environment view was not 
propagating the getModelURL from the app to
the topology instance.
Also added a test for this bug.

Updated the destroy service callback to make
the destroy dialog disappear also when
an error occurs.

Fixed an intermittent failure when 
test_environment_view.js is run in isolation.

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

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