Improve Review Bot's admin interface

Review Request #6999 — Created March 1, 2015 and discarded — Latest diff uploaded

Information

ReviewBot
master

Reviewers

As a part of the project "Improve Review Bot's admin interface" in https://reviewboard.hackpad.com/Student-Project-Ideas-bWzTgtBtq9f, this change improves UI in "Tool Change" view in admin site.

The styling of the form is done in https://reviews.reviewboard.org/r/6998/

Works done are:

  1. implemented JSONDictWidget
    this is the widget to be used for profile.tool_settings
  2. linked profile model admin with ProfileForest and ProfileForm
  3. made ProfileForm use JSONDictWidget for 'tool_settings' field

Now, tool_settings part is rendered as a set of widgets which are declared in "reviewbot/tools/{tool_name}.py" for each tool.

Browser test done:
1. go to http://localhost:8080/admin/extensions/reviewbotext.extension.ReviewBotExtension/db/reviewbotext/tool/
2. click one of the tools. for example, "PEP8 Style Checker"
3. see if existing profiles' "Tool settings" part is displayed well
4. click "Add another profile"
5. fill out the form and save
6. click the same tool
7. see if newly added profile is displayed well
8. try deleting and check again

Some possible edge cases are:
1. there's no existing profiles
2. there's exactly one porfile


    Loading...