prezi/repoguard — pull request #4 by karthik-rangarajan (2014-09-25 03:30:01+00:00)
Title: Repoguard UI - Backend and Frontend

This is the first pull request for Version 1 of the Repoguard UI. Even if I says so myself, it looks pretty good in terms of design, thanks to Addepar's @chrnguyen's awesome design work. In terms of code. I've tried to not be completely hackish, but there are definitely hacks in some places and I'll do my best to refactor them at some point.

Right now, there are a few basic features:
* List valid issues within a given date range
* List false positives within a given date range
* Mark an issue as a false/true positive
* Filter by commits/reviewers/rules
* Review code within the UI (a modal opens up with the file contents at that commit

A few things are hardcoded in the JavaScript - the page size jumps out off the top of my head. At the backend, currently, you can either turn off authentication, or it uses LDAP by default. I should have probably made this more extensible, and will probably do this in the future.

Here's some screenshots to show the functionality!

![Valid Issues](https://cloud.githubusercontent.com/assets/6006468/4399096/7d92c0c0-4462-11e4-84ec-dbb7b0dc3116.png)

![Mark As False Positive](https://cloud.githubusercontent.com/assets/6006468/4399102/ab17ba0a-4462-11e4-9b4a-9844776954e7.png)

![False Positives/Mark as Valid](https://cloud.githubusercontent.com/assets/6006468/4399109/d2bf932a-4462-11e4-8727-f56cdfaec1ba.png)

![Filter by Commits/Rules/Reviewers](https://cloud.githubusercontent.com/assets/6006468/4399122/0ce9dd08-4463-11e4-9768-d90086495a5e.png)
![Filter by Commit](https://cloud.githubusercontent.com/assets/6006468/4399124/0cf190a2-4463-11e4-908f-ddc9ca3f83db.png)
![Filter by Commit](https://cloud.githubusercontent.com/assets/6006468/4399125/0cf3609e-4463-11e4-88d2-d9871d36c81c.png)
![Filter by Reviewer](https://cloud.githubusercontent.com/assets/6006468/4399123/0cefc89e-4463-11e4-9d81-483e25ef10f0.png)

-------

There's a bunch of functionality that I planned missing - particularly, top rule hits and top offenders (i.e. commit authors that make mistakes over and over again). A front-end configuration file is also something I wanted to have, but I couldn't get to it either. The backend isn't very CORS friendly now either, so unfortunately, the backend and frontend are coupled in spite of there being an API and XHR requests to talk to the API.

This can be run by setting the `PYTHONPATH` variable to the repoguard directory, and then running `python guardserver.py`. It can also be setup as a WSGI application in Apache - I'll try and add a couple of sample config files for that to make things easy.

@kepten @lucaddepar