update services

This commit is contained in:
Tieu-Philippe KHIM 2018-02-13 17:43:19 +01:00
parent b7c2db0e85
commit 8032034f4b
4 changed files with 24 additions and 6 deletions

View File

@ -1,4 +1,10 @@
glancesApp.service('favicoService', function () {
import Favico from 'favico.js';
// import angular from 'angular';
angular.module('glancesApp').service('favicoService', favicoService);
function favicoService () {
var favico = new Favico({
animation: 'none'
@ -11,4 +17,4 @@ glancesApp.service('favicoService', function () {
this.reset = function () {
favico.reset();
};
});
}

View File

@ -0,0 +1,4 @@
import './stats';
import './plugin_helper';
import './favicon';

View File

@ -1,4 +1,7 @@
glancesApp.service('GlancesPluginHelper', function () {
export default angular.module('glancesApp').service('GlancesPluginHelper', GlancesPluginHelper);
function GlancesPluginHelper () {
var plugin = {
'limits': {},
@ -39,4 +42,4 @@ glancesApp.service('GlancesPluginHelper', function () {
};
return plugin;
});
}

View File

@ -1,4 +1,9 @@
glancesApp.service('GlancesStats', function ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REFRESH_TIME, CONFIG, ARGUMENTS) {
// import angular from 'angular';
export default angular.module('glancesApp').service('GlancesStats', GlancesStats);
function GlancesStats ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REFRESH_TIME, CONFIG, ARGUMENTS) {
var _data = false;
@ -65,4 +70,4 @@ glancesApp.service('GlancesStats', function ($http, $q, $rootScope, $timeout, Gl
return response.data;
});
};
});
}