learningequality/ka-lite — pull request #189 by bcipolli (2013-07-05 14:33:54+00:00)
Title: Control panel

I worked with @arnaudbenard and @wangguan59 to create a "control panel" Django app, which can summarize basic information about zones: associated facilities and devices, and reports about related facility users and syncing activity, respectively.

Data from this code can be used by administrators to summarize overall usage, mastery, and validate proper syncing behavior on either the central or distributed servers. This checkin also exposes full coach reports functionality from the central server.

In the future, this control panel will be used for USB-based data syncing.

**Notes on review / testing:**
* This code is necessary for Monday's release to the IDOC. Please consider for a code review urgently!
* This code depends on three other outstanding pull requests. So don't code review until those are done.
* However, please do pull this code and run it.
* A demo will be viewable on the playground later today.

**Changes:**
* Central server: homepage (default landing page) always accessible
* Central server: user now has a link from their username to their organization management page.
* Central server: each zone now has a "manage" link, instead of "edit" link.

**New functionality (distributed server):**
* Admins have a link on the "easyadmin" page to their zone management page.
* Generate "real" data now includes login information

**New functionality (both on central and distributed servers):**
* Zone management page: display all associated facilities and devices, with links to reports and data upload/download (USB-based; functionality disabled)
* Facility management page: List all groups and users, with summary information and links to group coach reports
* Device management page: Summarizes syncing activity

**Code churn:**
* I turned on "strip trailing whitespace" in my editor; you see some lines are simply removing trailing whitespace while a file was edited
* I moved a bunch of code from other places into this "control panel"

**Added functionality that doesn't really fit here:**
* Implemented pooling and display of "Headless zones" for central-server Django admins. These are zones that have been generated by a (stand-alone) distributed server, which then successfully sync'd through the Internet (and thus aren't connected to any central server account).

**Implemented in future iterations:**
* Pagination
* All buttons (shown here for display feedback)
* USB-based syncing
* Printing
* Forcing syncing

**How tested:**
* All pages and functionality tested manually on both central and distributed servers, including syncing tests.