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

Issue 44750044: Implement the environment create/edit view.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by frankban
Modified:
10 years, 4 months ago
Reviewers:
mp+200305, gary.poster, benji-york
Visibility:
Public.

Description

Implement the environment create/edit view. Add a cli/forms.py module including helpers to create and handle Urwid forms. Allow for creating a new environment from the env_index view. Implement the env_edit view, used for creating or updating environments. Fix a corner case in envs.set_env_data: delete the env_db default key only if the environments has been modified. Tests: `make check`. QA: start the demo app (`make` and `./cli-app-demo.py). Use it to edit existing environments and to create new ones (ec2 and local). Check form errors are correctly handled. Exit the demo app with either ^X or selecting an environment to use. The demo app should show changes on exit, and notify whether a new db has been saved and/or an environment has been selected. https://code.launchpad.net/~frankban/juju-quickstart/env-manage-edit/+merge/200305 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 27

Patch Set 2 : Implement the environment create/edit view. #

Patch Set 3 : Implement the environment create/edit view. #

Patch Set 4 : Implement the environment create/edit view. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1021 lines, -45 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/app.py View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M quickstart/cli/base.py View 1 2 2 chunks +4 lines, -5 lines 0 comments Download
A quickstart/cli/forms.py View 1 1 chunk +215 lines, -0 lines 0 comments Download
M quickstart/cli/ui.py View 2 chunks +3 lines, -0 lines 0 comments Download
M quickstart/cli/views.py View 1 2 9 chunks +134 lines, -9 lines 0 comments Download
M quickstart/manage.py View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M quickstart/models/envs.py View 1 2 2 chunks +14 lines, -3 lines 0 comments Download
M quickstart/tests/cli/test_base.py View 1 2 1 chunk +9 lines, -9 lines 0 comments Download
A quickstart/tests/cli/test_forms.py View 1 1 chunk +345 lines, -0 lines 0 comments Download
M quickstart/tests/cli/test_views.py View 1 2 8 chunks +272 lines, -13 lines 0 comments Download
M quickstart/tests/models/test_envs.py View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 12
frankban
Please take a look.
10 years, 4 months ago (2014-01-02 13:36:41 UTC) #1
frankban
Sorry for the long diff, tests for views are a little verbose.
10 years, 4 months ago (2014-01-02 13:41:25 UTC) #2
gary.poster
QA comments, pre-review: - Looking very cool. - I like the fact that I can ...
10 years, 4 months ago (2014-01-02 14:24:57 UTC) #3
benji-york
Looks great. LGTM-ly, yrs Benji https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py File quickstart/cli/forms.py (right): https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py#newcode208 quickstart/cli/forms.py:208: return ui.create_controls(*controls) This is ...
10 years, 4 months ago (2014-01-02 15:05:31 UTC) #4
gary.poster
LGTM! Thank you! https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py File quickstart/cli/forms.py (right): https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py#newcode44 quickstart/cli/forms.py:44: def create_string_widget(field, value, error): Nice behavior/approach ...
10 years, 4 months ago (2014-01-02 15:19:28 UTC) #5
frankban
Please take a look. https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py File quickstart/cli/forms.py (right): https://codereview.appspot.com/44750044/diff/1/quickstart/cli/forms.py#newcode82 quickstart/cli/forms.py:82: if generate_method is not None: ...
10 years, 4 months ago (2014-01-02 17:51:03 UTC) #6
frankban
Now working on the QA comments. In the meanwhile, thank you for the great reviews!
10 years, 4 months ago (2014-01-02 17:52:44 UTC) #7
gary.poster
https://codereview.appspot.com/44750044/diff/1/quickstart/cli/views.py File quickstart/cli/views.py (right): https://codereview.appspot.com/44750044/diff/1/quickstart/cli/views.py#newcode230 quickstart/cli/views.py:230: def use(env_data): On 2014/01/02 17:51:04, frankban wrote: > On ...
10 years, 4 months ago (2014-01-02 18:48:25 UTC) #8
frankban
Please take a look.
10 years, 4 months ago (2014-01-03 11:39:37 UTC) #9
frankban
On 2014/01/02 14:24:57, gary.poster wrote: > QA comments, pre-review: > > - Looking very cool. ...
10 years, 4 months ago (2014-01-03 11:42:10 UTC) #10
gary.poster
On 2014/01/03 11:42:10, frankban wrote: > On 2014/01/02 14:24:57, gary.poster wrote: > > QA comments, ...
10 years, 4 months ago (2014-01-03 13:51:06 UTC) #11
frankban
10 years, 4 months ago (2014-01-03 13:57:55 UTC) #12
*** Submitted:

Implement the environment create/edit view.

Add a cli/forms.py module including helpers
to create and handle Urwid forms.

Allow for creating a new environment from the 
env_index view.

Implement the env_edit view, used for creating
or updating environments.

Fix a corner case in envs.set_env_data: delete
the env_db default key only if the environments
has been modified.

Tests: `make check`.

QA: start the demo app 
(`make` and `./cli-app-demo.py).
Use it to edit existing environments and
to create new ones (ec2 and local).
Check form errors are correctly handled.
Exit the demo app with either ^X or 
selecting an environment to use. The
demo app should show changes on exit,
and notify whether a new db has been saved
and/or an environment has been selected.

R=gary.poster, benji1
CC=
https://codereview.appspot.com/44750044
Sign in to reply to this message.

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