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

Issue 9132043: Converted service and unit views to use promises

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by jeff.pihach
Modified:
11 years ago
Reviewers:
mp+162205, gary.poster
Visibility:
Public.

Description

Converted service and unit views to use promises In addition to converting the unit and service views to use promises: If the user is viewing a service and that service is no longer available it will redirect them to the environment with a notification. If the user is viewing a unit and that unit is no longer available the user will be redirected to the service. If the user is viewing a unit and that units service is no longer available then the user will be redirected to the service. https://code.launchpad.net/~hatch/juju-gui/view-promises/+merge/162205 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Converted service and unit views to use promises #

Total comments: 22
Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -191 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 7 chunks +96 lines, -35 lines 14 comments Download
M app/models/model-controller.js View 1 chunk +2 lines, -2 lines 0 comments Download
M app/modules-debug.js View 1 chunk +2 lines, -1 line 2 comments Download
M app/store/endpoints.js View 1 chunk +2 lines, -1 line 0 comments Download
M app/subapps/browser/views/charm.js View 3 chunks +21 lines, -1 line 1 comment Download
M app/subapps/browser/views/editorial.js View 4 chunks +6 lines, -1 line 1 comment Download
M app/subapps/browser/views/search.js View 3 chunks +3 lines, -0 lines 1 comment Download
M app/views/service.js View 8 chunks +160 lines, -134 lines 0 comments Download
M app/views/utils.js View 1 chunk +5 lines, -0 lines 1 comment Download
M lib/views/browser/main.less View 2 chunks +1 line, -1 line 1 comment Download
M lib/views/stylesheet.less View 4 chunks +8 lines, -4 lines 1 comment Download
M test/index.html View 1 chunk +2 lines, -0 lines 0 comments Download
M test/test_app.js View 1 chunk +1 line, -1 line 0 comments Download
M test/test_browser_charm_details.js View 1 chunk +24 lines, -0 lines 0 comments Download
M test/test_browser_editorial.js View 1 chunk +28 lines, -0 lines 0 comments Download
M test/test_browser_search_view.js View 1 chunk +15 lines, -0 lines 0 comments Download
A test/test_model_controller.js View 1 chunk +229 lines, -0 lines 0 comments Download
M test/test_service_view.js View 2 chunks +8 lines, -10 lines 0 comments Download

Messages

Total messages: 4
jeff.pihach
Please take a look.
11 years ago (2013-05-02 18:23:08 UTC) #1
jeff.pihach
Please take a look.
11 years ago (2013-05-02 18:28:08 UTC) #2
gary.poster
This is good code but a bad diff, I'm afraid. Please take a look at ...
11 years ago (2013-05-02 19:08:31 UTC) #3
jeff.pihach
11 years ago (2013-05-02 19:57:01 UTC) #4
Thanks for the review, comments below and changes have been made to the review
with the proper diff.

https://codereview.appspot.com/9132043/diff/2001/app/app.js
File app/app.js (right):

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode519
app/app.js:519: self.showView('unit', options, { update: true });
On 2013/05/02 19:08:31, gary.poster wrote:
> If we're showing "please wait" then that should be the first time the view is
> rendered, right?  So update: true would not be necessary.

Done.

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode520
app/app.js:520: }, 100);
Additional comments added :)

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode576
app/app.js:576: // only have it's config updated not re-rendered.
On 2013/05/02 19:08:31, gary.poster wrote:
> grammar police: it's -> its

Done.

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode578
app/app.js:578: self.showView(viewName, options, { update: true });
On 2013/05/02 19:08:31, gary.poster wrote:
> If we're showing "please wait" then that should be the first time the view is
> rendered, right?  So update: true would not be necessary.

Done.

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode593
app/app.js:593: // while it is being viewed.
Additional comments added to the code

At this point the service view could be in loading state
or showing details but the service has become unavailable
or was never available. This calls a method on the view
to redirect to the environment and to create a notification

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode865
app/app.js:865: this.renderEnvironment = false;
On 2013/05/02 19:08:31, gary.poster wrote:
> I'd like this to be marked with an XXX, pointing to the change that we are
> making to enable a registration of /:gui:/ for the environment view.

Done.

https://codereview.appspot.com/9132043/diff/2001/app/app.js#newcode1027
app/app.js:1027: { path: '*', callbacks: 'toggleStaticViews'},
No card yet, Ben and I weren't sure that this router change would be necessary
come the new layout changes.

https://codereview.appspot.com/9132043/diff/2001/app/modules-debug.js
File app/modules-debug.js (right):

https://codereview.appspot.com/9132043/diff/2001/app/modules-debug.js#newcode168
app/modules-debug.js:168: requires: ['service-view-promise-support']
On 2013/05/02 19:08:31, gary.poster wrote:
> I thought we didn't need this now.

Done.
Sign in to reply to this message.

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