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

Issue 78220043: Add to GUI the ability to delete charms & bundles.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by bac
Modified:
10 years, 1 month ago
Reviewers:
mp+211951, benji, matthew.scott, rharding
Visibility:
Public.

Description

Add to GUI the ability to delete charms & bundles. On the charm detail page, a 'Delete' link is added if the user has edit permission. On the bundle detail page, a new 'Actions' section is added that has 'Feature' and 'Delete' links. We talked about removing the charmworld/scripts/remove_charm.py file but that isn't done in this branch. QA: ingest some charms and bundles. While not logged in, visit the charm and bundle pages and notice you don't see the 'Delete' links. Log in. Now see the links. Click 'Delete' then cancel or submit without checking the box. Note the charm isn't deleted. Now delete it for real. Note that it is gone. Repeat for bundles. Try featuring a bundle. Late breaking thought: deleting a charm that a bundle depends upon may cause it to be undeployable. Refuse to delete a charm if a bundle depends on it or just leave it be? Note this is no worse than the remove_charm.py script, though it is easier to do. https://code.launchpad.net/~bac/charmworld/remove-bundles/+merge/211951 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : Add to GUI the ability to delete charms & bundles. #

Total comments: 5

Patch Set 3 : Add to GUI the ability to delete charms & bundles. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+798 lines, -67 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A charmworld/forms/delete.py View 1 chunk +32 lines, -0 lines 0 comments Download
M charmworld/jobs/ingest.py View 1 1 chunk +5 lines, -1 line 0 comments Download
M charmworld/jobs/tests/test_worker.py View 3 chunks +26 lines, -17 lines 0 comments Download
M charmworld/jobs/worker.py View 4 chunks +7 lines, -7 lines 0 comments Download
M charmworld/models.py View 1 chunk +5 lines, -5 lines 0 comments Download
M charmworld/routes.py View 1 chunk +13 lines, -0 lines 0 comments Download
M charmworld/scripts/remove_charm.py View 3 chunks +7 lines, -21 lines 0 comments Download
M charmworld/scripts/tests/test_remove_charm.py View 3 chunks +3 lines, -3 lines 0 comments Download
M charmworld/search.py View 1 chunk +4 lines, -2 lines 0 comments Download
M charmworld/templates/bundle.pt View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M charmworld/templates/charm.pt View 1 chunk +7 lines, -2 lines 0 comments Download
A charmworld/templates/delete.pt View 1 chunk +14 lines, -0 lines 0 comments Download
M charmworld/tests/test_models.py View 1 chunk +1 line, -1 line 0 comments Download
M charmworld/tests/test_utils.py View 3 chunks +51 lines, -1 line 0 comments Download
M charmworld/utils.py View 5 chunks +57 lines, -4 lines 0 comments Download
M charmworld/views/bundles.py View 3 chunks +7 lines, -1 line 0 comments Download
M charmworld/views/charms.py View 3 chunks +3 lines, -2 lines 0 comments Download
A charmworld/views/delete.py View 1 chunk +97 lines, -0 lines 0 comments Download
A charmworld/views/tests/test_delete.py View 1 chunk +437 lines, -0 lines 0 comments Download

Messages

Total messages: 8
bac
Please take a look.
10 years, 1 month ago (2014-03-20 14:25:03 UTC) #1
bac
Notes for reviewer https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/ingest.py File charmworld/jobs/ingest.py (right): https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/ingest.py#newcode725 charmworld/jobs/ingest.py:725: log.info('Invalid revision %s', rev_raw) Drive-by fix ...
10 years, 1 month ago (2014-03-20 14:36:58 UTC) #2
bac
Please take a look.
10 years, 1 month ago (2014-03-20 14:51:11 UTC) #3
benji
LGTM https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/worker.py File charmworld/jobs/worker.py (right): https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/worker.py#newcode56 charmworld/jobs/worker.py:56: for _, jobs in self.ingest_jobs: I might like ...
10 years, 1 month ago (2014-03-20 16:14:17 UTC) #4
rharding
Thanks for this branch. It looks really nice. For your question, I think a short ...
10 years, 1 month ago (2014-03-20 17:03:43 UTC) #5
rharding
LGTM aside from routes question. The links and bundle warnings would be a good follow ...
10 years, 1 month ago (2014-03-20 17:04:29 UTC) #6
bac
Please take a look. https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/worker.py File charmworld/jobs/worker.py (right): https://codereview.appspot.com/78220043/diff/1/charmworld/jobs/worker.py#newcode56 charmworld/jobs/worker.py:56: for _, jobs in self.ingest_jobs: ...
10 years, 1 month ago (2014-03-20 19:29:55 UTC) #7
matthew.scott
10 years, 1 month ago (2014-03-20 20:02:41 UTC) #8
QA Okay!  LGTM
Sign in to reply to this message.

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