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

Issue 13373050: Adds relation details viewlet to inspector

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by jeff.pihach
Modified:
10 years, 8 months ago
Reviewers:
rharding, mp+184831, benjamin.saller
Visibility:
Public.

Description

Adds relation details viewlet to inspector This branch adds the relation details viewlet to the inspector and databinds the values to the relation interactions. As with units we now keep a copy of the relations data on the service and keep that up to date during the users interactions and deltas to allow for easy data binding for the viewlet. We no longer rely on the relation_error attribute and instead have aggregateRelations and aggregateRelationError attributes. https://code.launchpad.net/~hatch/juju-gui/inspector-relations/+merge/184831 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 18

Patch Set 2 : Adds relation details viewlet to inspector #

Total comments: 14

Patch Set 3 : Adds relation details viewlet to inspector #

Total comments: 7

Patch Set 4 : Adds relation details viewlet to inspector #

Total comments: 6

Patch Set 5 : Adds relation details viewlet to inspector #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -53 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A app/assets/images/inspector_relations.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/inspector_relations_selected.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M app/models/handlers.js View 1 chunk +1 line, -1 line 0 comments Download
M app/models/models.js View 1 2 3 4 9 chunks +220 lines, -35 lines 0 comments Download
M app/modules-debug.js View 1 chunk +4 lines, -0 lines 0 comments Download
M app/templates/service-config-wrapper.handlebars View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A app/templates/service-relations-list.handlebars View 1 chunk +8 lines, -0 lines 0 comments Download
A app/templates/service-relations-viewlet.handlebars View 1 chunk +3 lines, -0 lines 0 comments Download
M app/views/environment.js View 1 chunk +2 lines, -1 line 0 comments Download
M app/views/inspector.js View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M app/views/topology/relation.js View 1 2 3 4 1 chunk +17 lines, -1 line 0 comments Download
A app/views/viewlets/service-relations.js View 1 chunk +60 lines, -0 lines 0 comments Download
M test/test_fakebackend.js View 1 1 chunk +18 lines, -8 lines 0 comments Download
M test/test_model.js View 1 2 3 5 chunks +31 lines, -7 lines 0 comments Download
M test/test_model_handlers.js View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12
jeff.pihach
Please take a look.
10 years, 8 months ago (2013-09-10 17:03:49 UTC) #1
benjamin.saller
In general good, I had a number of comments though and I haven't done the ...
10 years, 8 months ago (2013-09-10 19:13:20 UTC) #2
jeff.pihach
Please take a look. https://codereview.appspot.com/13373050/diff/1/app/models/models.js File app/models/models.js (right): https://codereview.appspot.com/13373050/diff/1/app/models/models.js#newcode140 app/models/models.js:140: service.set('units', modelList); Good idea, done! ...
10 years, 8 months ago (2013-09-11 14:15:52 UTC) #3
jeff.pihach
Please take a look.
10 years, 8 months ago (2013-09-11 14:40:00 UTC) #4
rharding
It seems there's a bunch of checks working around test limititations and they all silently ...
10 years, 8 months ago (2013-09-11 15:06:48 UTC) #5
rharding
QA ok in Go, sandbox in chrome and IE. We agreed at least an ugly ...
10 years, 8 months ago (2013-09-11 16:24:57 UTC) #6
jeff.pihach
Thanks for the reviews - as discussed in our call, changes will be coming soon. ...
10 years, 8 months ago (2013-09-11 20:36:55 UTC) #7
jeff.pihach
Please take a look.
10 years, 8 months ago (2013-09-11 20:42:45 UTC) #8
benjamin.saller
LGTM. Thanks for this. I would like to see the service.relations manipulation moved into the ...
10 years, 8 months ago (2013-09-11 21:07:56 UTC) #9
jeff.pihach
Moved the service relation remove onto the service. Thanks for the reviews! https://codereview.appspot.com/13373050/diff/23001/app/views/topology/relation.js File app/views/topology/relation.js ...
10 years, 8 months ago (2013-09-11 21:15:21 UTC) #10
jeff.pihach
*** Submitted: Adds relation details viewlet to inspector This branch adds the relation details viewlet ...
10 years, 8 months ago (2013-09-11 21:26:12 UTC) #11
rharding
10 years, 8 months ago (2013-09-11 21:28:07 UTC) #12
LGTM

As noted, I would love to see new/process_delta and  getServicesFromDeltaChanged
work, but will take your word that it's covered by current functional-ish tests.

Other notes below.

https://codereview.appspot.com/13373050/diff/23001/app/views/topology/relatio...
File app/views/topology/relation.js (right):

https://codereview.appspot.com/13373050/diff/23001/app/views/topology/relatio...
app/views/topology/relation.js:591: if (rel.get('relation_id') ===
relation.relation_id) {
On 2013/09/11 21:07:56, benjamin.saller wrote:
> This should be a method of service now, no? its not a method of the view to
> remove the model, only to trigger that based on user interaction.

+1

https://codereview.appspot.com/13373050/diff/23001/test/test_model.js
File test/test_model.js (right):

https://codereview.appspot.com/13373050/diff/23001/test/test_model.js#newcode190
test/test_model.js:190: it('services have unit and relation modellists',
function() {
this tests the change in the initializer, cool

https://codereview.appspot.com/13373050/diff/23001/test/test_model.js#newcode196
test/test_model.js:196: it('relation changes on service update
aggregateRelations', function(done) {
this tests the _bindAttribute is setup correctly from what I see.

https://codereview.appspot.com/13373050/diff/23001/test/test_model.js#newcode205
test/test_model.js:205:
assert.equal(isObject(service.get('aggregateRelations')), true);
isObject seems to be bit of a light check. Recall the issues we had with null
returning true to this check.
Sign in to reply to this message.

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