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

Issue 13997043: Remove DB.units list

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

Description

Remove DB.units list This branch is a monster. Apologies in advance. This removes the db.units list and makes the GUI only use service.get('units') for service specific unit lists. Outside of the simulator we only ever look at units in the context of a service and keeping two copies of things was silly. This works better with the databinding code and is a pattern we intend to move forward with (wrt to relations I expect we'll get rid of the global list as well). There was however a fair bit of code that touched units which lead to a number of minor changes. Then I realized I was fixing some code in deprecated views so I went through and did a first pass at removing dead code related to the old views. Also there are changes to the test server to run on a random port which should allow safely running make check/lbox w/o getting the test server from another branch. https://code.launchpad.net/~bcsaller/juju-gui/destroyService-error/+merge/187944 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 34

Patch Set 2 : Remove DB.units list #

Patch Set 3 : Remove DB.units list #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1292 lines, -6518 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 4 chunks +0 lines, -188 lines 0 comments Download
M app/models/handlers.js View 3 chunks +12 lines, -6 lines 0 comments Download
M app/models/models.js View 1 13 chunks +22 lines, -60 lines 0 comments Download
M app/modules-debug.js View 1 2 3 chunks +0 lines, -24 lines 0 comments Download
M app/modules-prod.js View 1 chunk +1 line, -5 lines 0 comments Download
M app/store/env/fakebackend.js View 1 10 chunks +42 lines, -29 lines 0 comments Download
M app/store/env/simulator.js View 4 chunks +50 lines, -45 lines 0 comments Download
D app/templates/service.handlebars View 1 chunk +0 lines, -33 lines 0 comments Download
D app/views/charm.js View 1 chunk +0 lines, -187 lines 0 comments Download
D app/views/charm-panel.js View 1 chunk +0 lines, -947 lines 0 comments Download
M app/views/inspector.js View 1 2 4 chunks +10 lines, -8 lines 0 comments Download
M app/views/landscape.js View 1 chunk +1 line, -1 line 0 comments Download
D app/views/service.js View 1 chunk +0 lines, -802 lines 0 comments Download
M app/views/topology/service.js View 1 chunk +0 lines, -1 line 0 comments Download
D app/views/unit.js View 1 chunk +0 lines, -377 lines 0 comments Download
M test-server.js View 1 1 chunk +14 lines, -13 lines 0 comments Download
M test-server.sh View 1 1 chunk +7 lines, -3 lines 0 comments Download
M test/index.html View 1 2 3 chunks +1 line, -10 lines 0 comments Download
M test/test_app.js View 1 1 chunk +0 lines, -27 lines 0 comments Download
D test/test_charm_configuration.js View 1 chunk +0 lines, -458 lines 0 comments Download
D test/test_charm_panel.js View 1 chunk +0 lines, -253 lines 0 comments Download
D test/test_charm_view.js View 1 chunk +0 lines, -238 lines 0 comments Download
M test/test_fakebackend.js View 1 10 chunks +26 lines, -23 lines 0 comments Download
M test/test_inspector_overview.js View 1 2 7 chunks +0 lines, -19 lines 0 comments Download
M test/test_landscape.js View 5 chunks +9 lines, -6 lines 0 comments Download
M test/test_model.js View 1 2 1 chunk +860 lines, -905 lines 0 comments Download
M test/test_model_handlers.js View 1 15 chunks +43 lines, -36 lines 0 comments Download
M test/test_notifications.js View 1 1 chunk +0 lines, -49 lines 0 comments Download
M test/test_sandbox_go.js View 1 2 6 chunks +10 lines, -6 lines 0 comments Download
M test/test_sandbox_python.js View 7 chunks +17 lines, -15 lines 0 comments Download
D test/test_service_config_view.js View 1 2 1 chunk +0 lines, -273 lines 0 comments Download
D test/test_service_view.js View 1 chunk +0 lines, -910 lines 0 comments Download
M test/test_simulator.js View 1 chunk +2 lines, -3 lines 0 comments Download
M test/test_templates.js View 1 chunk +1 line, -28 lines 0 comments Download
M test/test_unit_detail_viewlet.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
D test/test_unit_view.js View 1 chunk +0 lines, -330 lines 0 comments Download
M test/test_utils.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M undocumented View 1 chunk +159 lines, -198 lines 0 comments Download

Messages

Total messages: 6
bcsaller
Please take a look.
10 years, 7 months ago (2013-09-26 22:24:00 UTC) #1
benjamin.saller
Now with review notes https://codereview.appspot.com/13997043/diff/1/app/app.js File app/app.js (left): https://codereview.appspot.com/13997043/diff/1/app/app.js#oldcode550 app/app.js:550: We always had one of ...
10 years, 7 months ago (2013-09-26 22:39:46 UTC) #2
jeff.pihach
LGTM with trivial Thanks for putting in the time to do all of this cleanup! ...
10 years, 7 months ago (2013-09-27 14:30:59 UTC) #3
gary.poster
LGTM with largely irrelevant comments. This is great, thank you! Exciting to see old code ...
10 years, 7 months ago (2013-09-27 14:55:53 UTC) #4
benjamin.saller
Thanks for the reviews, cleaning up a little after the trunk merge, but should land ...
10 years, 7 months ago (2013-09-27 17:12:42 UTC) #5
bcsaller
10 years, 7 months ago (2013-09-27 17:20:53 UTC) #6
*** Submitted:

Remove DB.units list

This branch is a monster. Apologies in advance.

This removes the db.units list and makes the GUI only use service.get('units')
for service specific unit lists. Outside of the simulator we only ever look 
at units in the context of a service and keeping two copies of things was
silly. This works better with the databinding code and is a pattern we intend 
to move forward with (wrt to relations I expect we'll get rid of the global
list as well).

There was however a fair bit of code that touched units which lead to a number
of minor changes. Then I realized I was fixing some code in deprecated views
so I went through and did a first pass at removing dead code related to the
old views.

Also there are changes to the test server to run on a random port which should
allow safely running make check/lbox w/o getting the test server from another
branch.

R=benjamin.saller, jeff.pihach, gary.poster
CC=
https://codereview.appspot.com/13997043
Sign in to reply to this message.

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