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

Issue 11845043: Removes the old API from the Charmview

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by j.c.sackett
Modified:
10 years, 9 months ago
Reviewers:
mp+176998, jeff.pihach, rharding
Visibility:
Public.

Description

Removes the old API from the Charmview -Replaces use of the old API and loadByPath with the new API and charm. -Removes last_change from both models, as no such thing exists in the API; replaces it by adding recent_commits and associated logic to old Charm model. -CharmView now creates last_change data from the recent_commits. There's an argument to be had for refactoring the template/view to properly use the charm attrs, but as charmview will be destroyed once we have the new inspector, it's not worth the effort. -Assorted drive by fixes. -Test updates. https://code.launchpad.net/~jcsackett/juju-gui/remove-old-api-charm-model/+merge/176998 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Removes the old API from the Charmview #

Total comments: 1

Patch Set 3 : Removes the old API from the Charmview #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -282 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 1 chunk +1 line, -1 line 0 comments Download
M app/models/charm.js View 1 2 5 chunks +53 lines, -30 lines 0 comments Download
M app/templates/charm.handlebars View 1 chunk +1 line, -1 line 0 comments Download
M app/views/charm.js View 5 chunks +32 lines, -17 lines 0 comments Download
M test/test_charm_view.js View 1 2 9 chunks +105 lines, -74 lines 0 comments Download
M undocumented View 1 2 1 chunk +162 lines, -159 lines 0 comments Download

Messages

Total messages: 6
j.c.sackett
Please take a look.
10 years, 9 months ago (2013-07-25 17:04:02 UTC) #1
jeff.pihach
LGTM with trivial and a quick testing q https://codereview.appspot.com/11845043/diff/1/app/models/charm.js File app/models/charm.js (right): https://codereview.appspot.com/11845043/diff/1/app/models/charm.js#newcode316 app/models/charm.js:316: valueFn: ...
10 years, 9 months ago (2013-07-25 17:21:06 UTC) #2
j.c.sackett
> valueFn: this._loadRecentCommits Actually, doing that causes test to fail. > test/test_charm_view.js:211: var view = ...
10 years, 9 months ago (2013-07-25 17:48:29 UTC) #3
j.c.sackett
Please take a look.
10 years, 9 months ago (2013-07-25 18:09:06 UTC) #4
rharding
LGTM though I don't get how the tests work without calling .render(). https://codereview.appspot.com/11845043/diff/8001/test/test_charm_view.js File test/test_charm_view.js ...
10 years, 9 months ago (2013-07-26 15:06:31 UTC) #5
j.c.sackett
10 years, 9 months ago (2013-07-26 20:12:54 UTC) #6
*** Submitted:

Removes the old API from the Charmview

-Replaces use of the old API and loadByPath with the new API and charm.
-Removes last_change from both models, as no such thing exists in the API;
replaces it by adding recent_commits and associated logic to old Charm model.
-CharmView now creates last_change data from the recent_commits. There's an
argument to be had for refactoring the template/view to properly use the charm
attrs, but as charmview will be destroyed once we have the new inspector, it's
not worth the effort.
-Assorted drive by fixes.
-Test updates.

R=jeff.pihach, rharding
CC=
https://codereview.appspot.com/11845043
Sign in to reply to this message.

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