- Make the discovery information be preloaded via a bootstrap.js file before angular runs

- Have ApiService generate all the api methods specified by the API discovery information
- Change all call sites (except for a select few when it does not make sense) to use ApiService
This commit is contained in:
Joseph Schorr 2013-12-26 17:45:16 -05:00
parent 1904e6d0c8
commit 56bb46ffb2
6 changed files with 423 additions and 212 deletions

13
static/js/bootstrap.js vendored Normal file
View file

@ -0,0 +1,13 @@
$.ajax({
type: 'GET',
async: false,
url: '/api/discovery',
success: function(data) {
window.__endpoints = data.endpoints;
},
error: function() {
setTimeout(function() {
$('#couldnotloadModal').modal({});
}, 250);
}
});