- 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:
parent
1904e6d0c8
commit
56bb46ffb2
6 changed files with 423 additions and 212 deletions
13
static/js/bootstrap.js
vendored
Normal file
13
static/js/bootstrap.js
vendored
Normal 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);
|
||||
}
|
||||
});
|
Reference in a new issue