adding import angular, remove use strict and update simple quote to double quote

This commit is contained in:
Tieu-Philippe KHIM 2018-02-19 15:15:05 +01:00
parent 86adef6fbc
commit bba7ea1f70
67 changed files with 234 additions and 231 deletions

View File

@ -1,8 +1,8 @@
import '../css/bootstrap.less';
import '../css/style.scss';
import "../css/bootstrap.less";
import "../css/style.scss";
import './module';
import './services';
import './components';
import './filters';
import "./module";
import "./services";
import "./components";
import "./filters";

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glances', {
import GlancesController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glances", {
controller: GlancesController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesController($scope, GlancesStats, hotkeys, ARGUMENTS) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesHelpController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesHelp', {
import GlancesHelpController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesHelp", {
controller: GlancesHelpController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesHelpController($http) {
var vm = this;

View File

@ -1,32 +1,32 @@
// import all components
import './glances/component';
import './help/component';
import './plugin-alert/component';
import './plugin-amps/component';
import './plugin-cloud/component';
import './plugin-cpu/component';
import './plugin-diskio/component';
import './plugin-docker/component';
import './plugin-folders/component';
import './plugin-fs/component';
import './plugin-gpu/component';
import './plugin-ip/component';
import './plugin-irq/component';
import './plugin-load/component';
import './plugin-mem/component';
import './plugin-mem-more/component';
import './plugin-memswap/component';
import './plugin-network/component';
import './plugin-percpu/component';
import './plugin-ports/component';
import './plugin-process/component';
import './plugin-processcount/component';
import './plugin-processlist/component';
import './plugin-quicklook/component';
import './plugin-raid/component';
import './plugin-sensors/component';
import './plugin-system/component';
import './plugin-uptime/component';
import './plugin-wifi/component';
import "./glances/component";
import "./help/component";
import "./plugin-alert/component";
import "./plugin-amps/component";
import "./plugin-cloud/component";
import "./plugin-cpu/component";
import "./plugin-diskio/component";
import "./plugin-docker/component";
import "./plugin-folders/component";
import "./plugin-fs/component";
import "./plugin-gpu/component";
import "./plugin-ip/component";
import "./plugin-irq/component";
import "./plugin-load/component";
import "./plugin-mem/component";
import "./plugin-mem-more/component";
import "./plugin-memswap/component";
import "./plugin-network/component";
import "./plugin-percpu/component";
import "./plugin-ports/component";
import "./plugin-process/component";
import "./plugin-processcount/component";
import "./plugin-processlist/component";
import "./plugin-quicklook/component";
import "./plugin-raid/component";
import "./plugin-sensors/component";
import "./plugin-system/component";
import "./plugin-uptime/component";
import "./plugin-wifi/component";

View File

@ -1,7 +1,8 @@
'use strict';
import GlancesPluginAlertController from './controller';
import template from './view.html';
import angular from "angular";
import GlancesPluginAlertController from "./controller";
import template from "./view.html";
export default angular.module('glancesApp').component('glancesPluginAlert', {
controller: GlancesPluginAlertController,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginAlertController($scope, favicoService) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesPluginAmpsController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginAmps', {
import GlancesPluginAmpsController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginAmps", {
controller: GlancesPluginAmpsController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginAmpsController($scope, GlancesStats, favicoService) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesPluginCloudController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginCloud', {
import GlancesPluginCloudController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginCloud", {
controller: GlancesPluginCloudController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginCloudController($scope, GlancesStats) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesPluginCpuController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginCpu', {
import GlancesPluginCpuController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginCpu", {
controller: GlancesPluginCpuController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginCpuController($scope, GlancesStats) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesPluginDiskioController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginDiskio', {
import GlancesPluginDiskioController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginDiskio", {
controller: GlancesPluginDiskioController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginDiskioController($scope, $filter, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginDockerController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginDocker', {
import GlancesPluginDockerController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginDocker", {
controller: GlancesPluginDockerController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginDockerController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginFsController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginFolders', {
import GlancesPluginFsController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginFolders", {
controller: GlancesPluginFsController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginFoldersController($scope, GlancesStats) {
var vm = this;

View File

@ -1,9 +1,10 @@
'use strict';
import GlancesPluginFsController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginFs', {
import GlancesPluginFsController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginFs", {
controller: GlancesPluginFsController,
controllerAs: 'vm',
templateUrl: template,

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginFsController($scope, $filter, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginGpuController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginGpu', {
import GlancesPluginGpuController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginGpu", {
controller: GlancesPluginGpuController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginGpuController($scope, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginIpController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginIp', {
import GlancesPluginIpController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginIp", {
controller: GlancesPluginIpController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginIpController($scope, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginIrqController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginIrq', {
import GlancesPluginIrqController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginIrq", {
controller: GlancesPluginIrqController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginIrqController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginLoadController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginLoad', {
import GlancesPluginLoadController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginLoad", {
controller: GlancesPluginLoadController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginLoadController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginMemMoreController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginMemMore', {
import GlancesPluginMemMoreController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginMemMore", {
controller: GlancesPluginMemMoreController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginMemMoreController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginMemController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginMem', {
import GlancesPluginMemController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginMem", {
controller: GlancesPluginMemController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginMemController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginMemswapController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginMemswap', {
import GlancesPluginMemswapController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginMemswap", {
controller: GlancesPluginMemswapController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginMemswapController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginNetworkController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginNetwork', {
import GlancesPluginNetworkController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginNetwork", {
controller: GlancesPluginNetworkController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginNetworkController($scope, $filter, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginPercpuController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginPercpu', {
import GlancesPluginPercpuController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginPercpu", {
controller: GlancesPluginPercpuController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginPercpuController($scope, GlancesStats, GlancesPluginHelper) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginPortsController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginPorts', {
import GlancesPluginPortsController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginPorts", {
controller: GlancesPluginPortsController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginPortsController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginProcessController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginProcess', {
import GlancesPluginProcessController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginProcess", {
controller: GlancesPluginProcessController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginProcessController(ARGUMENTS, hotkeys) {
var vm = this;

View File

@ -1,13 +1,14 @@
'use strict';
import GlancesPluginProcesscountController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginProcesscount', {
import GlancesPluginProcesscountController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginProcesscount", {
controller: GlancesPluginProcesscountController,
controllerAs: 'vm',
controllerAs: "vm",
bindings: {
sorter: '<'
sorter: "<"
},
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginProcesscountController($scope, GlancesStats) {
var vm = this;

View File

@ -1,13 +1,14 @@
'use strict';
import GlancesPluginProcesslistController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginProcesslist', {
import GlancesPluginProcesslistController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginProcesslist", {
controller: GlancesPluginProcesslistController,
controllerAs: 'vm',
controllerAs: "vm",
bindings: {
sorter: '<'
sorter: "<"
},
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginProcesslistController($scope, GlancesStats, GlancesPluginHelper, $filter, CONFIG, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginQuicklookController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginQuicklook', {
import GlancesPluginQuicklookController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginQuicklook", {
controller: GlancesPluginQuicklookController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginQuicklookController($scope, GlancesStats, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginRaidController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginRaid', {
import GlancesPluginRaidController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginRaid", {
controller: GlancesPluginRaidController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginRaidController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginSensorsController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginSensors', {
import GlancesPluginSensorsController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginSensors", {
controller: GlancesPluginSensorsController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginSensorsController($scope, GlancesStats, GlancesPluginHelper, ARGUMENTS) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginSystemController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginSystem', {
import GlancesPluginSystemController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginSystem", {
controller: GlancesPluginSystemController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginSystemController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginUptimeController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginUptime', {
import GlancesPluginUptimeController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginUptime", {
controller: GlancesPluginUptimeController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginUptimeController($scope, GlancesStats) {
var vm = this;

View File

@ -1,10 +1,11 @@
'use strict';
import GlancesPluginWifiController from './controller';
import template from './view.html';
import angular from "angular";
export default angular.module('glancesApp').component('glancesPluginWifi', {
import GlancesPluginWifiController from "./controller";
import template from "./view.html";
export default angular.module("glancesApp").component("glancesPluginWifi", {
controller: GlancesPluginWifiController,
controllerAs: 'vm',
controllerAs: "vm",
templateUrl: template,
});

View File

@ -1,4 +1,3 @@
'use strict';
export default function GlancesPluginWifiController($scope, $filter, GlancesStats) {
var vm = this;

View File

@ -1,7 +1,7 @@
// import angular from 'angular';
import angular from "angular";
export default angular.module('glancesApp').directive("sortableTh", function () {
export default angular.module("glancesApp").directive("sortableTh", function () {
return {
restrict: 'A',
scope: {

View File

@ -1,15 +1,6 @@
import _ from 'lodash';
// import angular from 'angular';
export default angular.module('glancesApp')
.filter('min_size', min_size_filter)
.filter('exclamation', exclamation_filter)
.filter('bytes', bytes_filter)
.filter('bits', bits_filter)
.filter('leftPad', leftPad_filter)
.filter('timemillis', timemillis_filter)
.filter('timedelta', timedelta_filter);
import angular from "angular";
import _ from "lodash";
function min_size_filter() {
return function (input, max) {
@ -122,3 +113,12 @@ function timedelta_filter($filter) {
};
}
}
export default angular.module("glancesApp")
.filter("min_size", min_size_filter)
.filter("exclamation", exclamation_filter)
.filter("bytes", bytes_filter)
.filter("bits", bits_filter)
.filter("leftPad", leftPad_filter)
.filter("timemillis", timemillis_filter)
.filter("timedelta", timedelta_filter);

View File

@ -1,11 +1,11 @@
import angular from 'angular';
import 'angular-hotkeys';
import angular from "angular";
import "angular-hotkeys";
export default angular.module('glancesApp', ['glances.config', 'cfp.hotkeys'])
export default angular.module("glancesApp", ["glances.config", "cfp.hotkeys"])
.value('CONFIG', {})
.value('ARGUMENTS', {})
.value("CONFIG", {})
.value("ARGUMENTS", {})
.config(function (hotkeysProvider) {
hotkeysProvider.useNgRoute = false;
@ -15,8 +15,8 @@ export default angular.module('glancesApp', ['glances.config', 'cfp.hotkeys'])
.run(function ($rootScope, GlancesStats) {
$rootScope.title = "Glances";
$rootScope.$on('data_refreshed', function (event, data) {
$rootScope.title = data.stats.system.hostname + ' - Glances';
$rootScope.$on("data_refreshed", function (event, data) {
$rootScope.title = `${data.stats.system.hostname} - Glances`;
});
GlancesStats.init();

View File

@ -1,4 +1,5 @@
import angular from "angular";
import Favico from 'favico.js';
export default angular.module('glancesApp').service('favicoService', favicoService);

View File

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

View File

@ -1,5 +1,5 @@
export default angular.module('glancesApp').service('GlancesPluginHelper', GlancesPluginHelper);
import angular from "angular";
function GlancesPluginHelper () {
@ -43,3 +43,5 @@ function GlancesPluginHelper () {
return plugin;
}
export default angular.module('glancesApp').service('GlancesPluginHelper', GlancesPluginHelper);

View File

@ -1,7 +1,5 @@
// import angular from 'angular';
export default angular.module('glancesApp').service('GlancesStats', GlancesStats);
import angular from 'angular';
function GlancesStats ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REFRESH_TIME, CONFIG, ARGUMENTS) {
@ -71,3 +69,5 @@ function GlancesStats ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REF
});
};
}
export default angular.module('glancesApp').service('GlancesStats', GlancesStats);