wingedmonkey/wingedmonkey — pull request #200 by jtomasek (2013-02-11 14:27:12+00:00)
Title: Angularjs polling implementation

This implements Provider Applications listing and polling using AngularJS framework. #108

See commit messages for description.

Provider Application controller now responds with json responses, to be able to do this I implemented ```attributes``` and ```as_json``` methods to provider_application and each _provider_application models. This way we can define how the json response looks.

When user browses to the ProviderApplications list, the page gets loaded and "Loading applications" message appears as request for retrieving the apps is pending. Then when the json response is received, the list is filled with applications. This request is sent 20 seconds after the previous finished. When there is a change in any of provider apps attribute, it gets automatically updated in the view without need of refreshing the page. This way is maintained "up to date" state of the apps.

Stop action is also handled by angular, so when user clicks stop button, request to terminate application is sent and on subsequent poll request, the state of application is updated (the app will disappear if it is terminated).

There are a couple of unfinished things.
- the uptime is not yet calculated
- delete button is displayed regardless of application's state
- confirm message is not present when delete is clicked (will be done according the wireframes)
- one spec test is failing due to different way delete button works
- bring in testing with jasmine/testacular for angular things
- Ovirt and Conductor providers aren't updated with these changes, so this will break its functionality for a moment

I will work right away to get Ovirt and Conductor provider support up to date as well as other unfinished things.

This PR will also probably clash with PR 197 so I will update patchset when it get's in.