added sub indicators to loading sheets
parent
6f5d689f7f
commit
7b1477c24e
|
@ -24,10 +24,8 @@
|
||||||
<div id="breadcrumbs"></div>
|
<div id="breadcrumbs"></div>
|
||||||
<div id="loadingbox" class="sheet hide fade" data-sheet-parent="#breadcrumbs">
|
<div id="loadingbox" class="sheet hide fade" data-sheet-parent="#breadcrumbs">
|
||||||
<div class="sheet-body">
|
<div class="sheet-body">
|
||||||
Loading <span id="loading"></span>...
|
<p>Loading...</p>
|
||||||
<div class="progress progress-striped active">
|
<p><span id="loading"></span></p>
|
||||||
<div class="bar" style="width: 0%"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span id="content">
|
<span id="content">
|
||||||
|
|
|
@ -460,61 +460,15 @@ var AppRouter = Backbone.Router.extend({
|
||||||
|
|
||||||
this.breadCrumbView.render();
|
this.breadCrumbView.render();
|
||||||
|
|
||||||
// set up loading dependencies
|
$('#loadingbox').sheet('show');
|
||||||
|
$("#loading").html('<span class="label" id="loading-system">System Configuration</span>');
|
||||||
/*
|
|
||||||
this.clientListView.dependsOn = [this.systemScopeList];
|
|
||||||
this.whiteListListView.dependsOn = [this.whiteListList, this.clientList];
|
|
||||||
this.accessTokensListView.dependsOn = [this.clientList];
|
|
||||||
this.refreshTokenListView.dependsOn = [this.clientList];
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Several items depend on the clients and whitelists being loaded, so we're going to pre-fetch them here
|
|
||||||
// and not start the app router until they're loaded.
|
|
||||||
//
|
|
||||||
|
|
||||||
// load things in the right order:
|
|
||||||
|
|
||||||
$('#loadingbox').show('slow');
|
|
||||||
$("#loading").html("server configuration");
|
|
||||||
var base = $('base').attr('href');
|
var base = $('base').attr('href');
|
||||||
$.getJSON(base + '.well-known/openid-configuration', function(data) {
|
$.getJSON(base + '.well-known/openid-configuration', function(data) {
|
||||||
app.serverConfiguration = data;
|
app.serverConfiguration = data;
|
||||||
/** /
|
$('#loading-system').addClass('label-success');
|
||||||
$("#content .progress .bar").css("width", "20%");
|
var baseUrl = $.url(app.serverConfiguration.issuer);
|
||||||
$("#loading").html("scopes");
|
Backbone.history.start({pushState: true, root: baseUrl.attr('relative') + 'manage/'});
|
||||||
app.systemScopeList.fetch({
|
$('#loadingbox').sheet('hide');
|
||||||
success: function(collection, response) {
|
|
||||||
$("#content .progress .bar").css("width", "40%");
|
|
||||||
$("#loading").html("clients");
|
|
||||||
app.clientList.fetch({
|
|
||||||
success: function(collection, response) {
|
|
||||||
$("#content .progress .bar").css("width", "60%");
|
|
||||||
$("#loading").html("whitelists");
|
|
||||||
app.whiteListList.fetch({
|
|
||||||
success: function(collection, response) {
|
|
||||||
$("#content .progress .bar").css("width", "80%");
|
|
||||||
$("#loading").html("statistics");
|
|
||||||
app.clientStats.fetch({
|
|
||||||
success: function(model, response) {
|
|
||||||
/**/
|
|
||||||
$("#loadingbox .progress .bar").css("width", "100%");
|
|
||||||
$("#loading").html("console");
|
|
||||||
var baseUrl = $.url(app.serverConfiguration.issuer);
|
|
||||||
Backbone.history.start({pushState: true, root: baseUrl.attr('relative') + 'manage/'});
|
|
||||||
$('#loadingbox').sheet('hide');
|
|
||||||
/** /
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
/**/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -248,12 +248,17 @@ var ClientListView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('clients');
|
$('#loading').html('<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-whitelist">Whitelist</span> ' +
|
||||||
|
'<span class="label" id="loading-stats">Statistics</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.fetchIfNeeded(),
|
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.whiteListList.fetchIfNeeded(),
|
this.options.whiteListList.fetchIfNeeded({success:function(e) {$('#loading-whitelist').addClass('label-success');}}),
|
||||||
this.options.stats.fetchIfNeeded(),
|
this.options.stats.fetchIfNeeded({success:function(e) {$('#loading-stats').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetchIfNeeded()).done(function() {
|
this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -306,13 +311,18 @@ var ClientListView = Backbone.View.extend({
|
||||||
refreshTable:function(e) {
|
refreshTable:function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('clients');
|
$('#loading').html('<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-whitelist">Whitelist</span> ' +
|
||||||
|
'<span class="label" id="loading-stats">Statistics</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
var _self = this;
|
var _self = this;
|
||||||
$.when(this.model.fetch(),
|
$.when(this.model.fetch({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.whiteListList.fetch(),
|
this.options.whiteListList.fetch({success:function(e) {$('#loading-whitelist').addClass('label-success');}}),
|
||||||
this.options.stats.fetch(),
|
this.options.stats.fetch({success:function(e) {$('#loading-stats').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetch()).done(function() {
|
this.options.systemScopeList.fetch({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
_self.render();
|
_self.render();
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,11 +45,15 @@ var ApprovedSiteListView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('approved sites');
|
$('#loading').html('<span class="label" id="loading-grants">Approved Sites</span> ' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.fetchIfNeeded(),
|
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-grants').addClass('label-success');}}),
|
||||||
this.options.clientList.fetchIfNeeded(),
|
this.options.clientList.fetchIfNeeded({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetchIfNeeded()).done(function() {
|
this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -115,11 +119,15 @@ var ApprovedSiteListView = Backbone.View.extend({
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var _self = this;
|
var _self = this;
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('approved sites');
|
$('#loading').html('<span class="label" id="loading-grants">Approved Sites</span> ' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.fetch(),
|
$.when(this.model.fetch({success:function(e) {$('#loading-grants').addClass('label-success');}}),
|
||||||
this.options.clientList.fetch(),
|
this.options.clientList.fetch({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetch()).done(function() {
|
this.options.systemScopeList.fetch({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
_self.render();
|
_self.render();
|
||||||
});
|
});
|
||||||
|
|
|
@ -143,9 +143,10 @@ var SystemScopeListView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('approved sites');
|
$('#loading').html('<span class="label" id="loading-scopes">Scopes</span> ');
|
||||||
|
|
||||||
$.when(this.model.fetchIfNeeded()).done(function() {
|
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -166,9 +167,10 @@ var SystemScopeListView = Backbone.View.extend({
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var _self = this;
|
var _self = this;
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('approved sites');
|
$('#loading').html('<span class="label" id="loading-scopes">Scopes</span> ');
|
||||||
|
|
||||||
$.when(this.model.fetch()).done(function() {
|
$.when(this.model.fetch({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
_self.render();
|
_self.render();
|
||||||
});
|
});
|
||||||
|
|
|
@ -325,12 +325,17 @@ var TokenListView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('tokens');
|
$('#loading').html('<span class="label" id="loading-access">Access Tokens</span> ' +
|
||||||
|
'<span class="label" id="loading-refresh">Refresh Tokens</span> ' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.access.fetchIfNeeded(),
|
$.when(this.model.access.fetchIfNeeded({success:function(e) {$('#loading-access').addClass('label-success');}}),
|
||||||
this.model.refresh.fetchIfNeeded(),
|
this.model.refresh.fetchIfNeeded({success:function(e) {$('#loading-refresh').addClass('label-success');}}),
|
||||||
this.options.clientList.fetchIfNeeded(),
|
this.options.clientList.fetchIfNeeded({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetchIfNeeded()).done(function() {
|
this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -340,12 +345,17 @@ var TokenListView = Backbone.View.extend({
|
||||||
refreshTable:function(e) {
|
refreshTable:function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('tokens');
|
$('#loading').html('<span class="label" id="loading-access">Access Tokens</span> ' +
|
||||||
|
'<span class="label" id="loading-refresh">Refresh Tokens</span> ' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
var _self = this;
|
var _self = this;
|
||||||
$.when(this.model.access.fetch(),
|
$.when(this.model.access.fetch({success:function(e) {$('#loading-access').addClass('label-success');}}),
|
||||||
this.model.refresh.fetch(),
|
this.model.refresh.fetch({success:function(e) {$('#loading-refresh').addClass('label-success');}}),
|
||||||
this.options.clientList.fetch(),
|
this.options.clientList.fetch({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetch()).done(function(){
|
this.options.systemScopeList.fetch({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function(){
|
||||||
_self.render();
|
_self.render();
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
});
|
});
|
||||||
|
|
|
@ -59,11 +59,15 @@ var WhiteListListView = Backbone.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('whitelist');
|
$('#loading').html('<span class="label" id="loading-whitelist">Whitelist</span>' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span>' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span>'
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.fetchIfNeeded(),
|
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-whitelist').addClass('label-success');}}),
|
||||||
this.options.clientList.fetchIfNeeded(),
|
this.options.clientList.fetchIfNeeded({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetchIfNeeded()).done(function() {
|
this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
@ -107,11 +111,15 @@ var WhiteListListView = Backbone.View.extend({
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var _self = this;
|
var _self = this;
|
||||||
$('#loadingbox').sheet('show');
|
$('#loadingbox').sheet('show');
|
||||||
$('#loading').html('whitelist');
|
$('#loading').html('<span class="label" id="loading-whitelist">Whitelist</span> ' +
|
||||||
|
'<span class="label" id="loading-clients">Clients</span> ' +
|
||||||
|
'<span class="label" id="loading-scopes">Scopes</span> '
|
||||||
|
);
|
||||||
|
|
||||||
$.when(this.model.fetch(),
|
$.when(this.model.fetch({success:function(e) {$('#loading-whitelist').addClass('label-success');}}),
|
||||||
this.options.clientList.fetch(),
|
this.options.clientList.fetch({success:function(e) {$('#loading-clients').addClass('label-success');}}),
|
||||||
this.options.systemScopeList.fetch()).done(function() {
|
this.options.systemScopeList.fetch({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
|
||||||
|
.done(function() {
|
||||||
$('#loadingbox').sheet('hide');
|
$('#loadingbox').sheet('hide');
|
||||||
_self.render();
|
_self.render();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue