
This adds support for loading progress bars from the nprogress library and displays progress bars while loading the larger datasets on the timeline and test details pages. Change-Id: Ica10d348f67abc348aed2df0b158383ad035e604
41 lines
587 B
JavaScript
41 lines
587 B
JavaScript
'use strict';
|
|
|
|
var nprogress = require('nprogress');
|
|
|
|
var servicesModule = require('./_index.js');
|
|
|
|
/**
|
|
* @ngInject
|
|
*/
|
|
function ProgressService() {
|
|
|
|
return {
|
|
start: function(options) {
|
|
if (options) {
|
|
nprogress.configure(options);
|
|
}
|
|
|
|
nprogress.start();
|
|
},
|
|
|
|
done: function() {
|
|
nprogress.done();
|
|
},
|
|
|
|
remove: function() {
|
|
nprogress.remove();
|
|
},
|
|
|
|
set: function(val) {
|
|
nprogress.set(val);
|
|
},
|
|
|
|
inc: function() {
|
|
nprogress.inc();
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
servicesModule.service('progressService', ProgressService);
|