mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-03 07:03:40 +03:00
Set CONFIG and ARGUMENTS as value in angular
This commit is contained in:
parent
a13b64d3e8
commit
1ff6d97b22
@ -1,22 +1,8 @@
|
|||||||
var glancesApp = angular.module('glancesApp', ['ngRoute', 'glances.config', 'fps.hotkeys'])
|
var glancesApp = angular.module('glancesApp', ['ngRoute', 'glances.config', 'fps.hotkeys'])
|
||||||
|
|
||||||
.config(function($routeProvider, $locationProvider) {
|
.value('CONFIG', {})
|
||||||
$routeProvider.when('/', {
|
.value('ARGUMENTS', {})
|
||||||
template : '<glances arguments="arguments"></glances>',
|
|
||||||
controller : 'StatsController',
|
|
||||||
resolve: {
|
|
||||||
help: function(GlancesStats) {
|
|
||||||
return GlancesStats.getHelp();
|
|
||||||
},
|
|
||||||
config: function(GlancesStats) {
|
|
||||||
return GlancesStats.getConfig();
|
|
||||||
},
|
|
||||||
arguments: function(GlancesStats) {
|
|
||||||
return GlancesStats.getArguments();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.run(function($rootScope) {
|
.run(function($rootScope) {
|
||||||
$rootScope.title = "Glances";
|
$rootScope.title = "Glances";
|
||||||
});
|
});
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
glancesApp.component('glances', {
|
glancesApp.component('glances', {
|
||||||
controller: GlancesController,
|
controller: GlancesController,
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
templateUrl: 'components/glances/view.html'
|
templateUrl: 'components/glances/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,29 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesController($scope, $timeout, GlancesStats, REFRESH_TIME, Hotkeys) {
|
function GlancesController($scope, $timeout, GlancesStats, REFRESH_TIME, Hotkeys, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.dataLoaded = false;
|
vm.dataLoaded = false;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var refreshDataSuccess = function (data) {
|
|
||||||
data.isBsd = data.stats['system']['os_name'] === 'FreeBSD';
|
|
||||||
data.isLinux = data.stats['system']['os_name'] === 'Linux';
|
|
||||||
data.isMac = data.stats['system']['os_name'] === 'Darwin';
|
|
||||||
data.isWindows = data.stats['system']['os_name'] === 'Windows';
|
|
||||||
|
|
||||||
$scope.$broadcast('data_refreshed', data);
|
|
||||||
vm.dataLoaded = true;
|
|
||||||
|
|
||||||
nextLoad();
|
|
||||||
};
|
|
||||||
|
|
||||||
var refreshDataError = function() {
|
|
||||||
$scope.$broadcast('is_disconnected');
|
|
||||||
nextLoad();
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.refreshData = function () {
|
vm.refreshData = function () {
|
||||||
GlancesStats.getData().then(refreshDataSuccess, refreshDataError);
|
GlancesStats.getData().then(function (data) {
|
||||||
|
$scope.$broadcast('data_refreshed', data);
|
||||||
|
vm.dataLoaded = true;
|
||||||
|
|
||||||
|
nextLoad();
|
||||||
|
}, function() {
|
||||||
|
$scope.$broadcast('is_disconnected');
|
||||||
|
nextLoad();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var loadPromise;
|
var loadPromise;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<glances-plugin-system></glances-plugin-system>
|
<glances-plugin-system></glances-plugin-system>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<glances-plugin-ip arguments="vm.arguments"></glances-plugin-ip>
|
<glances-plugin-ip></glances-plugin-ip>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<glances-plugin-uptime></glances-plugin-uptime>
|
<glances-plugin-uptime></glances-plugin-uptime>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!vm.arguments.disable_quicklook">
|
<div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!vm.arguments.disable_quicklook">
|
||||||
<glances-plugin-quicklook arguments="vm.arguments"></glances-plugin-quicklook>
|
<glances-plugin-quicklook></glances-plugin-quicklook>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && !vm.arguments.percpu">
|
<div class="col-sm-6 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && !vm.arguments.percpu">
|
||||||
<glances-plugin-cpu></glances-plugin-cpu>
|
<glances-plugin-cpu></glances-plugin-cpu>
|
||||||
@ -60,21 +60,21 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 sidebar" ng-if="!vm.arguments.disable_left_sidebar">
|
<div class="col-sm-6 sidebar" ng-if="!vm.arguments.disable_left_sidebar">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<glances-plugin-network id="plugin-network" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_network"></glances-plugin-network>
|
<glances-plugin-network id="plugin-network" class="plugin table-row-group" ng-if="!vm.arguments.disable_network"></glances-plugin-network>
|
||||||
<glances-plugin-wifi id="plugin-wifi" class="plugin table-row-group" ng-if="!vm.arguments.disable_wifi"></glances-plugin-wifi>
|
<glances-plugin-wifi id="plugin-wifi" class="plugin table-row-group" ng-if="!vm.arguments.disable_wifi"></glances-plugin-wifi>
|
||||||
<glances-plugin-ports id="plugin-ports" class="plugin table-row-group" ng-if="!vm.arguments.disable_ports"></glances-plugin-ports>
|
<glances-plugin-ports id="plugin-ports" class="plugin table-row-group" ng-if="!vm.arguments.disable_ports"></glances-plugin-ports>
|
||||||
<glances-plugin-diskio id="plugin-diskio" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_diskio"></glances-plugin-diskio>
|
<glances-plugin-diskio id="plugin-diskio" class="plugin table-row-group" ng-if="!vm.arguments.disable_diskio"></glances-plugin-diskio>
|
||||||
<glances-plugin-fs id="plugin-fs" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_fs"></glances-plugin-fs>
|
<glances-plugin-fs id="plugin-fs" class="plugin table-row-group" ng-if="!vm.arguments.disable_fs"></glances-plugin-fs>
|
||||||
<glances-plugin-irq arguments="vm.arguments" ng-if="vm.arguments.enable_irq"></glances-plugin-irq>
|
<glances-plugin-irq ng-if="vm.arguments.enable_irq"></glances-plugin-irq>
|
||||||
<glances-plugin-folders arguments="vm.arguments" ng-if="!vm.arguments.disable_fs"></glances-plugin-folders>
|
<glances-plugin-folders ng-if="!vm.arguments.disable_fs"></glances-plugin-folders>
|
||||||
<glances-plugin-raid arguments="vm.arguments"></glances-plugin-raid>
|
<glances-plugin-raid></glances-plugin-raid>
|
||||||
<glances-plugin-sensors arguments="vm.arguments" ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>
|
<glances-plugin-sensors ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-18">
|
<div class="col-sm-18">
|
||||||
<glances-plugin-docker arguments="vm.arguments" ng-if="!vm.arguments.disable_docker"></glances-plugin-docker>
|
<glances-plugin-docker ng-if="!vm.arguments.disable_docker"></glances-plugin-docker>
|
||||||
<glances-plugin-alert ng-if="!vm.arguments.disable_alert"></glances-plugin-alert>
|
<glances-plugin-alert ng-if="!vm.arguments.disable_alert"></glances-plugin-alert>
|
||||||
<glances-plugin-process arguments="vm.arguments"></glances-plugin-process>
|
<glances-plugin-process></glances-plugin-process>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,5 @@
|
|||||||
glancesApp.component('glancesHelp', {
|
glancesApp.component('glancesHelp', {
|
||||||
controller: GlancesHelpController,
|
controller: GlancesHelpController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
},
|
|
||||||
templateUrl: 'components/help/view.html'
|
templateUrl: 'components/help/view.html'
|
||||||
});
|
});
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginDiskio', {
|
glancesApp.component('glancesPluginDiskio', {
|
||||||
controller: GlancesPluginDiskioController,
|
controller: GlancesPluginDiskioController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-diskio/view.html'
|
templateUrl: 'components/plugin-diskio/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginDiskioController($scope, $filter) {
|
function GlancesPluginDiskioController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.disks = [];
|
vm.disks = [];
|
||||||
|
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginFs', {
|
glancesApp.component('glancesPluginFs', {
|
||||||
controller: GlancesPluginFsController,
|
controller: GlancesPluginFsController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-fs/view.html'
|
templateUrl: 'components/plugin-fs/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginFsController($scope, $filter) {
|
function GlancesPluginFsController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var _view = {};
|
var _view = {};
|
||||||
|
|
||||||
vm.fileSystems = [];
|
vm.fileSystems = [];
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginIp', {
|
glancesApp.component('glancesPluginIp', {
|
||||||
controller: GlancesPluginIpController,
|
controller: GlancesPluginIpController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-ip/view.html'
|
templateUrl: 'components/plugin-ip/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginIpController($scope) {
|
function GlancesPluginIpController($scope, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.address = null;
|
vm.address = null;
|
||||||
vm.gateway = null;
|
vm.gateway = null;
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginNetwork', {
|
glancesApp.component('glancesPluginNetwork', {
|
||||||
controller: GlancesPluginNetworkController,
|
controller: GlancesPluginNetworkController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-network/view.html'
|
templateUrl: 'components/plugin-network/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginNetworkController($scope, $filter) {
|
function GlancesPluginNetworkController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.networks = [];
|
vm.networks = [];
|
||||||
|
|
||||||
|
@ -3,9 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginProcess', {
|
glancesApp.component('glancesPluginProcess', {
|
||||||
controller: GlancesPluginProcessController,
|
controller: GlancesPluginProcessController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
stats: '<',
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-process/view.html'
|
templateUrl: 'components/plugin-process/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginProcessController() {
|
function GlancesPluginProcessController(ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.sorter = {
|
vm.sorter = {
|
||||||
column: "cpu_percent",
|
column: "cpu_percent",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div ng-show="!vm.arguments.disable_process">
|
<div ng-show="!vm.arguments.disable_process">
|
||||||
<glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>
|
<glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>
|
||||||
<glances-plugin-amps arguments="vm.arguments" ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>
|
<glances-plugin-amps ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>
|
||||||
<glances-plugin-processlist arguments="vm.arguments" sorter="vm.sorter"></glances-plugin-processlist>
|
<glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press 'z' to display)</div>
|
<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press 'z' to display)</div>
|
||||||
|
@ -4,7 +4,6 @@ glancesApp.component('glancesPluginProcesslist', {
|
|||||||
controller: GlancesPluginProcesslistController,
|
controller: GlancesPluginProcesslistController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
arguments: '<',
|
|
||||||
sorter: '<'
|
sorter: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-processlist/view.html'
|
templateUrl: 'components/plugin-processlist/view.html'
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter, GlancesStats) {
|
function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter, CONFIG, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
var _maxProcessesToDisplay = undefined;
|
|
||||||
vm.processes = [];
|
vm.processes = [];
|
||||||
vm.ioReadWritePresent = false;
|
vm.ioReadWritePresent = false;
|
||||||
|
|
||||||
GlancesStats.getConfig().then(function(config) {
|
|
||||||
_maxProcessesToDisplay = config.outputs !== undefined ? config.outputs.max_processes_display : undefined;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function(event, data) {
|
$scope.$on('data_refreshed', function(event, data) {
|
||||||
var processlistStats = data.stats['processlist'];
|
var processlistStats = data.stats['processlist'];
|
||||||
|
|
||||||
@ -63,6 +59,6 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
|||||||
};
|
};
|
||||||
|
|
||||||
vm.getLimit = function() {
|
vm.getLimit = function() {
|
||||||
return _maxProcessesToDisplay;
|
return CONFIG.outputs !== undefined ? CONFIG.outputs.max_processes_display : undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginQuicklook', {
|
glancesApp.component('glancesPluginQuicklook', {
|
||||||
controller: GlancesPluginQuicklookController,
|
controller: GlancesPluginQuicklookController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-quicklook/view.html'
|
templateUrl: 'components/plugin-quicklook/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginQuicklookController($scope) {
|
function GlancesPluginQuicklookController($scope, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var _view = {};
|
var _view = {};
|
||||||
|
|
||||||
vm.mem = null;
|
vm.mem = null;
|
||||||
|
@ -3,8 +3,5 @@
|
|||||||
glancesApp.component('glancesPluginSystem', {
|
glancesApp.component('glancesPluginSystem', {
|
||||||
controller: GlancesPluginSystemController,
|
controller: GlancesPluginSystemController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
isDisconnected: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-system/view.html'
|
templateUrl: 'components/plugin-system/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
glancesApp.controller('StatsController', function ($scope, help, config, arguments) {
|
|
||||||
$scope.help = help;
|
|
||||||
$scope.config = config;
|
|
||||||
$scope.arguments = arguments;
|
|
||||||
});
|
|
@ -1,6 +1,4 @@
|
|||||||
glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper) {
|
glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper, CONFIG, ARGUMENTS) {
|
||||||
|
|
||||||
var _config;
|
|
||||||
|
|
||||||
this.getData = function() {
|
this.getData = function() {
|
||||||
return $q.all([
|
return $q.all([
|
||||||
@ -9,7 +7,11 @@ glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper) {
|
|||||||
]).then(function(results) {
|
]).then(function(results) {
|
||||||
return {
|
return {
|
||||||
'stats': results[0],
|
'stats': results[0],
|
||||||
'view': results[1]
|
'view': results[1],
|
||||||
|
'isBsd': results[0]['system']['os_name'] === 'FreeBSD',
|
||||||
|
'isLinux': results[0]['system']['os_name'] === 'Linux',
|
||||||
|
'isMac': results[0]['system']['os_name'] === 'Darwin',
|
||||||
|
'isWindows': results[0]['system']['os_name'] === 'Windows'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -20,12 +22,6 @@ glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getAllLimits = function() {
|
|
||||||
return $http.get('api/2/all/limits').then(function (response) {
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getAllViews = function() {
|
this.getAllViews = function() {
|
||||||
return $http.get('api/2/all/views').then(function (response) {
|
return $http.get('api/2/all/views').then(function (response) {
|
||||||
return response.data;
|
return response.data;
|
||||||
@ -38,30 +34,15 @@ glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getConfig = function() {
|
|
||||||
if (!_config) {
|
|
||||||
return $http.get('api/2/config').then(function (response) {
|
|
||||||
_config = response.data;
|
|
||||||
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var deferrer = $q.defer();
|
|
||||||
deferrer.resolve(_config);
|
|
||||||
|
|
||||||
return deferrer.promise;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getArguments = function() {
|
|
||||||
return $http.get('api/2/args').then(function (response) {
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// load limits to init GlancePlugin helper
|
// load limits to init GlancePlugin helper
|
||||||
this.getAllLimits().then(function(limits) {
|
$http.get('api/2/all/limits').then(function (response) {
|
||||||
GlancesPluginHelper.setLimits(limits);
|
GlancesPluginHelper.setLimits(response.data);
|
||||||
|
});
|
||||||
|
$http.get('api/2/config').then(function (response) {
|
||||||
|
angular.extend(CONFIG, response.data);
|
||||||
|
});
|
||||||
|
$http.get('api/2/args').then(function (response) {
|
||||||
|
angular.extend(ARGUMENTS, response.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
333
glances/outputs/static/public/js/main.min.js
vendored
333
glances/outputs/static/public/js/main.min.js
vendored
@ -1,32 +1,12 @@
|
|||||||
var glancesApp = angular.module('glancesApp', ['ngRoute', 'glances.config', 'fps.hotkeys'])
|
var glancesApp = angular.module('glancesApp', ['ngRoute', 'glances.config', 'fps.hotkeys'])
|
||||||
|
|
||||||
.config(["$routeProvider", "$locationProvider", function($routeProvider, $locationProvider) {
|
.value('CONFIG', {})
|
||||||
$routeProvider.when('/', {
|
.value('ARGUMENTS', {})
|
||||||
template : '<glances arguments="arguments"></glances>',
|
|
||||||
controller : 'StatsController',
|
|
||||||
resolve: {
|
|
||||||
help: ["GlancesStats", function(GlancesStats) {
|
|
||||||
return GlancesStats.getHelp();
|
|
||||||
}],
|
|
||||||
config: ["GlancesStats", function(GlancesStats) {
|
|
||||||
return GlancesStats.getConfig();
|
|
||||||
}],
|
|
||||||
arguments: ["GlancesStats", function(GlancesStats) {
|
|
||||||
return GlancesStats.getArguments();
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}])
|
|
||||||
.run(["$rootScope", function($rootScope) {
|
.run(["$rootScope", function($rootScope) {
|
||||||
$rootScope.title = "Glances";
|
$rootScope.title = "Glances";
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
glancesApp.controller('StatsController', ["$scope", "help", "config", "arguments", function ($scope, help, config, arguments) {
|
|
||||||
$scope.help = help;
|
|
||||||
$scope.config = config;
|
|
||||||
$scope.arguments = arguments;
|
|
||||||
}]);
|
|
||||||
|
|
||||||
glancesApp.directive("sortableTh", function() {
|
glancesApp.directive("sortableTh", function() {
|
||||||
return {
|
return {
|
||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
@ -235,9 +215,7 @@ glancesApp.service('GlancesPluginHelper', function () {
|
|||||||
return plugin;
|
return plugin;
|
||||||
});
|
});
|
||||||
|
|
||||||
glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", function($http, $q, GlancesPluginHelper) {
|
glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", "CONFIG", "ARGUMENTS", function($http, $q, GlancesPluginHelper, CONFIG, ARGUMENTS) {
|
||||||
|
|
||||||
var _config;
|
|
||||||
|
|
||||||
this.getData = function() {
|
this.getData = function() {
|
||||||
return $q.all([
|
return $q.all([
|
||||||
@ -246,7 +224,11 @@ glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", functi
|
|||||||
]).then(function(results) {
|
]).then(function(results) {
|
||||||
return {
|
return {
|
||||||
'stats': results[0],
|
'stats': results[0],
|
||||||
'view': results[1]
|
'view': results[1],
|
||||||
|
'isBsd': results[0]['system']['os_name'] === 'FreeBSD',
|
||||||
|
'isLinux': results[0]['system']['os_name'] === 'Linux',
|
||||||
|
'isMac': results[0]['system']['os_name'] === 'Darwin',
|
||||||
|
'isWindows': results[0]['system']['os_name'] === 'Windows'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -257,12 +239,6 @@ glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", functi
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getAllLimits = function() {
|
|
||||||
return $http.get('api/2/all/limits').then(function (response) {
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getAllViews = function() {
|
this.getAllViews = function() {
|
||||||
return $http.get('api/2/all/views').then(function (response) {
|
return $http.get('api/2/all/views').then(function (response) {
|
||||||
return response.data;
|
return response.data;
|
||||||
@ -275,70 +251,44 @@ glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", functi
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getConfig = function() {
|
|
||||||
if (!_config) {
|
|
||||||
return $http.get('api/2/config').then(function (response) {
|
|
||||||
_config = response.data;
|
|
||||||
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var deferrer = $q.defer();
|
|
||||||
deferrer.resolve(_config);
|
|
||||||
|
|
||||||
return deferrer.promise;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getArguments = function() {
|
|
||||||
return $http.get('api/2/args').then(function (response) {
|
|
||||||
return response.data;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// load limits to init GlancePlugin helper
|
// load limits to init GlancePlugin helper
|
||||||
this.getAllLimits().then(function(limits) {
|
$http.get('api/2/all/limits').then(function (response) {
|
||||||
GlancesPluginHelper.setLimits(limits);
|
GlancesPluginHelper.setLimits(response.data);
|
||||||
|
});
|
||||||
|
$http.get('api/2/config').then(function (response) {
|
||||||
|
angular.extend(CONFIG, response.data);
|
||||||
|
});
|
||||||
|
$http.get('api/2/args').then(function (response) {
|
||||||
|
angular.extend(ARGUMENTS, response.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glances', {
|
glancesApp.component('glances', {
|
||||||
controller: GlancesController,
|
controller: GlancesController,
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
templateUrl: 'components/glances/view.html'
|
templateUrl: 'components/glances/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesController($scope, $timeout, GlancesStats, REFRESH_TIME, Hotkeys) {
|
function GlancesController($scope, $timeout, GlancesStats, REFRESH_TIME, Hotkeys, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.dataLoaded = false;
|
vm.dataLoaded = false;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var refreshDataSuccess = function (data) {
|
|
||||||
data.isBsd = data.stats['system']['os_name'] === 'FreeBSD';
|
|
||||||
data.isLinux = data.stats['system']['os_name'] === 'Linux';
|
|
||||||
data.isMac = data.stats['system']['os_name'] === 'Darwin';
|
|
||||||
data.isWindows = data.stats['system']['os_name'] === 'Windows';
|
|
||||||
|
|
||||||
$scope.$broadcast('data_refreshed', data);
|
|
||||||
vm.dataLoaded = true;
|
|
||||||
|
|
||||||
nextLoad();
|
|
||||||
};
|
|
||||||
|
|
||||||
var refreshDataError = function() {
|
|
||||||
$scope.$broadcast('is_disconnected');
|
|
||||||
nextLoad();
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.refreshData = function () {
|
vm.refreshData = function () {
|
||||||
GlancesStats.getData().then(refreshDataSuccess, refreshDataError);
|
GlancesStats.getData().then(function (data) {
|
||||||
|
$scope.$broadcast('data_refreshed', data);
|
||||||
|
vm.dataLoaded = true;
|
||||||
|
|
||||||
|
nextLoad();
|
||||||
|
}, function() {
|
||||||
|
$scope.$broadcast('is_disconnected');
|
||||||
|
nextLoad();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var loadPromise;
|
var loadPromise;
|
||||||
@ -366,8 +316,6 @@ function GlancesController($scope, $timeout, GlancesStats, REFRESH_TIME, Hotkeys
|
|||||||
glancesApp.component('glancesHelp', {
|
glancesApp.component('glancesHelp', {
|
||||||
controller: GlancesHelpController,
|
controller: GlancesHelpController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
},
|
|
||||||
templateUrl: 'components/help/view.html'
|
templateUrl: 'components/help/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -553,16 +501,14 @@ function GlancesPluginCpuController($scope) {
|
|||||||
glancesApp.component('glancesPluginDiskio', {
|
glancesApp.component('glancesPluginDiskio', {
|
||||||
controller: GlancesPluginDiskioController,
|
controller: GlancesPluginDiskioController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-diskio/view.html'
|
templateUrl: 'components/plugin-diskio/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginDiskioController($scope, $filter) {
|
function GlancesPluginDiskioController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.disks = [];
|
vm.disks = [];
|
||||||
|
|
||||||
@ -596,16 +542,14 @@ function GlancesPluginDiskioController($scope, $filter) {
|
|||||||
glancesApp.component('glancesPluginFs', {
|
glancesApp.component('glancesPluginFs', {
|
||||||
controller: GlancesPluginFsController,
|
controller: GlancesPluginFsController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-fs/view.html'
|
templateUrl: 'components/plugin-fs/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginFsController($scope, $filter) {
|
function GlancesPluginFsController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var _view = {};
|
var _view = {};
|
||||||
|
|
||||||
vm.fileSystems = [];
|
vm.fileSystems = [];
|
||||||
@ -648,6 +592,37 @@ function GlancesPluginFsController($scope, $filter) {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginIp', {
|
||||||
|
controller: GlancesPluginIpController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
templateUrl: 'components/plugin-ip/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginIpController($scope, ARGUMENTS) {
|
||||||
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
|
vm.address = null;
|
||||||
|
vm.gateway = null;
|
||||||
|
vm.mask = null;
|
||||||
|
vm.maskCidr = null;
|
||||||
|
vm.publicAddress = null;
|
||||||
|
|
||||||
|
$scope.$on('data_refreshed', function(event, data) {
|
||||||
|
var ipStats = data.stats['ip'];
|
||||||
|
|
||||||
|
vm.address = ipStats.address;
|
||||||
|
vm.gateway = ipStats.gateway;
|
||||||
|
vm.mask = ipStats.mask;
|
||||||
|
vm.maskCidr = ipStats.mask_cidr;
|
||||||
|
vm.publicAddress = ipStats.public_address
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginLoad', {
|
glancesApp.component('glancesPluginLoad', {
|
||||||
controller: GlancesPluginLoadController,
|
controller: GlancesPluginLoadController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
@ -724,39 +699,6 @@ function GlancesPluginMemController($scope) {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginIp', {
|
|
||||||
controller: GlancesPluginIpController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-ip/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginIpController($scope) {
|
|
||||||
var vm = this;
|
|
||||||
|
|
||||||
vm.address = null;
|
|
||||||
vm.gateway = null;
|
|
||||||
vm.mask = null;
|
|
||||||
vm.maskCidr = null;
|
|
||||||
vm.publicAddress = null;
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function(event, data) {
|
|
||||||
var ipStats = data.stats['ip'];
|
|
||||||
|
|
||||||
vm.address = ipStats.address;
|
|
||||||
vm.gateway = ipStats.gateway;
|
|
||||||
vm.mask = ipStats.mask;
|
|
||||||
vm.maskCidr = ipStats.mask_cidr;
|
|
||||||
vm.publicAddress = ipStats.public_address
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glancesPluginMemMore', {
|
glancesApp.component('glancesPluginMemMore', {
|
||||||
controller: GlancesPluginMemMoreController,
|
controller: GlancesPluginMemMoreController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
@ -785,19 +727,55 @@ function GlancesPluginMemMoreController($scope) {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginMemswap', {
|
||||||
|
controller: GlancesPluginMemswapController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
templateUrl: 'components/plugin-memswap/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginMemswapController($scope) {
|
||||||
|
var vm = this;
|
||||||
|
var _view = {};
|
||||||
|
|
||||||
|
vm.percent = null;
|
||||||
|
vm.total = null;
|
||||||
|
vm.used = null;
|
||||||
|
vm.free = null;
|
||||||
|
|
||||||
|
$scope.$on('data_refreshed', function(event, data) {
|
||||||
|
var stats = data.stats['memswap'];
|
||||||
|
_view = data.view['memswap'];
|
||||||
|
|
||||||
|
vm.percent = stats['percent'];
|
||||||
|
vm.total = stats['total'];
|
||||||
|
vm.used = stats['used'];
|
||||||
|
vm.free = stats['free'];
|
||||||
|
});
|
||||||
|
|
||||||
|
this.getDecoration = function (value) {
|
||||||
|
if (_view[value] === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _view[value].decoration.toLowerCase();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginNetwork', {
|
glancesApp.component('glancesPluginNetwork', {
|
||||||
controller: GlancesPluginNetworkController,
|
controller: GlancesPluginNetworkController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-network/view.html'
|
templateUrl: 'components/plugin-network/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginNetworkController($scope, $filter) {
|
function GlancesPluginNetworkController($scope, $filter, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.networks = [];
|
vm.networks = [];
|
||||||
|
|
||||||
@ -914,17 +892,14 @@ function GlancesPluginPortsController($scope) {
|
|||||||
glancesApp.component('glancesPluginProcess', {
|
glancesApp.component('glancesPluginProcess', {
|
||||||
controller: GlancesPluginProcessController,
|
controller: GlancesPluginProcessController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
stats: '<',
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-process/view.html'
|
templateUrl: 'components/plugin-process/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginProcessController() {
|
function GlancesPluginProcessController(ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
vm.sorter = {
|
vm.sorter = {
|
||||||
column: "cpu_percent",
|
column: "cpu_percent",
|
||||||
@ -981,7 +956,6 @@ glancesApp.component('glancesPluginProcesslist', {
|
|||||||
controller: GlancesPluginProcesslistController,
|
controller: GlancesPluginProcesslistController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
arguments: '<',
|
|
||||||
sorter: '<'
|
sorter: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-processlist/view.html'
|
templateUrl: 'components/plugin-processlist/view.html'
|
||||||
@ -989,17 +963,13 @@ glancesApp.component('glancesPluginProcesslist', {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter, GlancesStats) {
|
function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter, CONFIG, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
|
|
||||||
var _maxProcessesToDisplay = undefined;
|
|
||||||
vm.processes = [];
|
vm.processes = [];
|
||||||
vm.ioReadWritePresent = false;
|
vm.ioReadWritePresent = false;
|
||||||
|
|
||||||
GlancesStats.getConfig().then(function(config) {
|
|
||||||
_maxProcessesToDisplay = config.outputs !== undefined ? config.outputs.max_processes_display : undefined;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function(event, data) {
|
$scope.$on('data_refreshed', function(event, data) {
|
||||||
var processlistStats = data.stats['processlist'];
|
var processlistStats = data.stats['processlist'];
|
||||||
|
|
||||||
@ -1052,7 +1022,7 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
|||||||
};
|
};
|
||||||
|
|
||||||
vm.getLimit = function() {
|
vm.getLimit = function() {
|
||||||
return _maxProcessesToDisplay;
|
return CONFIG.outputs !== undefined ? CONFIG.outputs.max_processes_display : undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1061,16 +1031,14 @@ function GlancesPluginProcesslistController($scope, GlancesPluginHelper, $filter
|
|||||||
glancesApp.component('glancesPluginQuicklook', {
|
glancesApp.component('glancesPluginQuicklook', {
|
||||||
controller: GlancesPluginQuicklookController,
|
controller: GlancesPluginQuicklookController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
arguments: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-quicklook/view.html'
|
templateUrl: 'components/plugin-quicklook/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesPluginQuicklookController($scope) {
|
function GlancesPluginQuicklookController($scope, ARGUMENTS) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
vm.arguments = ARGUMENTS;
|
||||||
var _view = {};
|
var _view = {};
|
||||||
|
|
||||||
vm.mem = null;
|
vm.mem = null;
|
||||||
@ -1115,9 +1083,6 @@ function GlancesPluginQuicklookController($scope) {
|
|||||||
glancesApp.component('glancesPluginSystem', {
|
glancesApp.component('glancesPluginSystem', {
|
||||||
controller: GlancesPluginSystemController,
|
controller: GlancesPluginSystemController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
|
||||||
isDisconnected: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-system/view.html'
|
templateUrl: 'components/plugin-system/view.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1152,6 +1117,25 @@ function GlancesPluginSystemController($scope) {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginUptime', {
|
||||||
|
controller: GlancesPluginUptimeController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
templateUrl: 'components/plugin-uptime/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginUptimeController($scope) {
|
||||||
|
var vm = this;
|
||||||
|
vm.value = null;
|
||||||
|
|
||||||
|
$scope.$on('data_refreshed', function(event, data) {
|
||||||
|
vm.value = data.stats['uptime'];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginWifi', {
|
glancesApp.component('glancesPluginWifi', {
|
||||||
controller: GlancesPluginWifiController,
|
controller: GlancesPluginWifiController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
@ -1197,60 +1181,3 @@ function GlancesPluginWifiController($scope, $filter) {
|
|||||||
return _view[hotpost.ssid][field].decoration.toLowerCase();
|
return _view[hotpost.ssid][field].decoration.toLowerCase();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glancesPluginUptime', {
|
|
||||||
controller: GlancesPluginUptimeController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
templateUrl: 'components/plugin-uptime/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginUptimeController($scope) {
|
|
||||||
var vm = this;
|
|
||||||
vm.value = null;
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function(event, data) {
|
|
||||||
vm.value = data.stats['uptime'];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glancesPluginMemswap', {
|
|
||||||
controller: GlancesPluginMemswapController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
templateUrl: 'components/plugin-memswap/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginMemswapController($scope) {
|
|
||||||
var vm = this;
|
|
||||||
var _view = {};
|
|
||||||
|
|
||||||
vm.percent = null;
|
|
||||||
vm.total = null;
|
|
||||||
vm.used = null;
|
|
||||||
vm.free = null;
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function(event, data) {
|
|
||||||
var stats = data.stats['memswap'];
|
|
||||||
_view = data.view['memswap'];
|
|
||||||
|
|
||||||
vm.percent = stats['percent'];
|
|
||||||
vm.total = stats['total'];
|
|
||||||
vm.used = stats['used'];
|
|
||||||
vm.free = stats['free'];
|
|
||||||
});
|
|
||||||
|
|
||||||
this.getDecoration = function (value) {
|
|
||||||
if (_view[value] === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _view[value].decoration.toLowerCase();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
angular.module('glancesApp').run(['$templateCache', function($templateCache) {$templateCache.put('components/glances/view.html','<div>\n <div ng-if="!vm.dataLoaded" class="container-fluid" id="loading-page">\n <div class="glances-logo"></div>\n <div class="loader">Loading...</div>\n </div>\n\n <glances-help ng-if="vm.arguments.help_tag"></glances-help>\n\n <div ng-show="vm.dataLoaded && !vm.arguments.help_tag" class="container-fluid">\n <div class="top-plugin">\n <div class="row">\n <div class="col-sm-24">\n <div class="pull-left">\n <glances-plugin-system></glances-plugin-system>\n </div>\n <div class="pull-left">\n <glances-plugin-ip arguments="vm.arguments"></glances-plugin-ip>\n </div>\n <div class="pull-right">\n <glances-plugin-uptime></glances-plugin-uptime>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-24">\n <div class="pull-left">\n <glances-plugin-cloud></glances-plugin-cloud>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!vm.arguments.disable_quicklook">\n <glances-plugin-quicklook arguments="vm.arguments"></glances-plugin-quicklook>\n </div>\n <div class="col-sm-6 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && !vm.arguments.percpu">\n <glances-plugin-cpu></glances-plugin-cpu>\n </div>\n <div class="col-sm-12 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && vm.arguments.percpu">\n <glances-plugin-percpu></glances-plugin-percpu>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!vm.arguments.disable_gpu && statsGpu.gpus.length > 0">\n <glances-plugin-gpu></glances-plugin-gpu>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.argumentsdisable_mem">\n <glances-plugin-mem></glances-plugin-mem>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3"\n ng-if="!vm.arguments.disable_mem && !(!vm.arguments.disable_gpu && statsGpu.gpus.length > 0)">\n <glances-plugin-mem-more></glances-plugin-mem-more>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.arguments.disable_memswap">\n <glances-plugin-memswap></glances-plugin-memswap>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.arguments.disable_load">\n <glances-plugin-load></glances-plugin-load>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-6 sidebar" ng-if="!vm.arguments.disable_left_sidebar">\n <div class="table">\n <glances-plugin-network id="plugin-network" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_network"></glances-plugin-network>\n <glances-plugin-wifi id="plugin-wifi" class="plugin table-row-group" ng-if="!vm.arguments.disable_wifi"></glances-plugin-wifi>\n <glances-plugin-ports id="plugin-ports" class="plugin table-row-group" ng-if="!vm.arguments.disable_ports"></glances-plugin-ports>\n <glances-plugin-diskio id="plugin-diskio" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_diskio"></glances-plugin-diskio>\n <glances-plugin-fs id="plugin-fs" class="plugin table-row-group" arguments="vm.arguments" ng-if="!vm.arguments.disable_fs"></glances-plugin-fs>\n <glances-plugin-irq arguments="vm.arguments" ng-if="vm.arguments.enable_irq"></glances-plugin-irq>\n <glances-plugin-folders arguments="vm.arguments" ng-if="!vm.arguments.disable_fs"></glances-plugin-folders>\n <glances-plugin-raid arguments="vm.arguments"></glances-plugin-raid>\n <glances-plugin-sensors arguments="vm.arguments" ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>\n </div>\n </div>\n <div class="col-sm-18">\n <glances-plugin-docker arguments="vm.arguments" ng-if="!vm.arguments.disable_docker"></glances-plugin-docker>\n <glances-plugin-alert ng-if="!vm.arguments.disable_alert"></glances-plugin-alert>\n <glances-plugin-process arguments="vm.arguments"></glances-plugin-process>\n </div>\n </div>\n </div>\n </div>\n</div>\n');
|
angular.module('glancesApp').run(['$templateCache', function($templateCache) {$templateCache.put('components/glances/view.html','<div>\n <div ng-if="!vm.dataLoaded" class="container-fluid" id="loading-page">\n <div class="glances-logo"></div>\n <div class="loader">Loading...</div>\n </div>\n\n <glances-help ng-if="vm.arguments.help_tag"></glances-help>\n\n <div ng-show="vm.dataLoaded && !vm.arguments.help_tag" class="container-fluid">\n <div class="top-plugin">\n <div class="row">\n <div class="col-sm-24">\n <div class="pull-left">\n <glances-plugin-system></glances-plugin-system>\n </div>\n <div class="pull-left">\n <glances-plugin-ip></glances-plugin-ip>\n </div>\n <div class="pull-right">\n <glances-plugin-uptime></glances-plugin-uptime>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-24">\n <div class="pull-left">\n <glances-plugin-cloud></glances-plugin-cloud>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class="row">\n <div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!vm.arguments.disable_quicklook">\n <glances-plugin-quicklook></glances-plugin-quicklook>\n </div>\n <div class="col-sm-6 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && !vm.arguments.percpu">\n <glances-plugin-cpu></glances-plugin-cpu>\n </div>\n <div class="col-sm-12 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && vm.arguments.percpu">\n <glances-plugin-percpu></glances-plugin-percpu>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!vm.arguments.disable_gpu && statsGpu.gpus.length > 0">\n <glances-plugin-gpu></glances-plugin-gpu>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.argumentsdisable_mem">\n <glances-plugin-mem></glances-plugin-mem>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3"\n ng-if="!vm.arguments.disable_mem && !(!vm.arguments.disable_gpu && statsGpu.gpus.length > 0)">\n <glances-plugin-mem-more></glances-plugin-mem-more>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.arguments.disable_memswap">\n <glances-plugin-memswap></glances-plugin-memswap>\n </div>\n <div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.arguments.disable_load">\n <glances-plugin-load></glances-plugin-load>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-6 sidebar" ng-if="!vm.arguments.disable_left_sidebar">\n <div class="table">\n <glances-plugin-network id="plugin-network" class="plugin table-row-group" ng-if="!vm.arguments.disable_network"></glances-plugin-network>\n <glances-plugin-wifi id="plugin-wifi" class="plugin table-row-group" ng-if="!vm.arguments.disable_wifi"></glances-plugin-wifi>\n <glances-plugin-ports id="plugin-ports" class="plugin table-row-group" ng-if="!vm.arguments.disable_ports"></glances-plugin-ports>\n <glances-plugin-diskio id="plugin-diskio" class="plugin table-row-group" ng-if="!vm.arguments.disable_diskio"></glances-plugin-diskio>\n <glances-plugin-fs id="plugin-fs" class="plugin table-row-group" ng-if="!vm.arguments.disable_fs"></glances-plugin-fs>\n <glances-plugin-irq ng-if="vm.arguments.enable_irq"></glances-plugin-irq>\n <glances-plugin-folders ng-if="!vm.arguments.disable_fs"></glances-plugin-folders>\n <glances-plugin-raid></glances-plugin-raid>\n <glances-plugin-sensors ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>\n </div>\n </div>\n <div class="col-sm-18">\n <glances-plugin-docker ng-if="!vm.arguments.disable_docker"></glances-plugin-docker>\n <glances-plugin-alert ng-if="!vm.arguments.disable_alert"></glances-plugin-alert>\n <glances-plugin-process></glances-plugin-process>\n </div>\n </div>\n </div>\n </div>\n</div>\n');
|
||||||
$templateCache.put('components/help/view.html',' <div class="container-fluid">\n <div class="row">\n <div class="col-sm-12 col-lg-24">{{vm.help.version}} {{vm.help.psutil_version}}</div>\n </div>\n <div class="row"> </div>\n <div class="row">\n <div class="col-sm-12 col-lg-24">{{vm.help.configuration_file}}</div>\n </div>\n <div class="row"> </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_auto}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_network}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_alert}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_mem}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.percpu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_user}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_ip}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_proc}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_docker}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_io}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.view_network_io_combination}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu_times}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.view_cumulative_network}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_diskio}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesytem_freespace}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesystem}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_vm.help}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_network}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.diskio_iops}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_sensors}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_top_menu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_left_sidebar}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_amp}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_process_stats}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_irq}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_gpu}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_mean_gpu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_quick_look}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_short_processname}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_ports}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n\n </div>\n');
|
$templateCache.put('components/help/view.html',' <div class="container-fluid">\n <div class="row">\n <div class="col-sm-12 col-lg-24">{{vm.help.version}} {{vm.help.psutil_version}}</div>\n </div>\n <div class="row"> </div>\n <div class="row">\n <div class="col-sm-12 col-lg-24">{{vm.help.configuration_file}}</div>\n </div>\n <div class="row"> </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_auto}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_network}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_alert}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_mem}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.percpu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_user}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_ip}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_proc}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_docker}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_io}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.view_network_io_combination}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu_times}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.view_cumulative_network}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_diskio}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesytem_freespace}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesystem}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_vm.help}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_network}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.diskio_iops}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_sensors}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_top_menu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_left_sidebar}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_amp}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_process_stats}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.show_hide_irq}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_gpu}}</div>\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_mean_gpu}}</div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_quick_look}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_short_processname}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n <div class="row">\n <div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_ports}}</div>\n <div class="col-sm-12 col-lg-6"></div>\n </div>\n\n </div>\n');
|
||||||
$templateCache.put('components/plugin-alert/view.html','<section id="alerts">\n <span class="title" ng-if="!vm.hasAlerts()">No warning or critical alert detected</span>\n <span class="title" ng-if="vm.hasAlerts()">Warning or critical alerts (lasts {{vm.count()}} entries)</span>\n</section>\n<section id="alert" class="plugin">\n <div class="table">\n <div class="table-row" ng-repeat="alert in vm.getAlerts()">\n <div class="table-cell text-left">\n {{alert.begin | date : \'yyyy-MM-dd H:mm:ss\'}} ({{ alert.ongoing ? \'ongoing\' : alert.duration }}) - <span ng-hide="alert.ongoing">{{alert.level}} on</span> <span class="{{ alert.level | lowercase }}">{{alert.name}}</span> ({{alert.max}})\n </div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-alert/view.html','<section id="alerts">\n <span class="title" ng-if="!vm.hasAlerts()">No warning or critical alert detected</span>\n <span class="title" ng-if="vm.hasAlerts()">Warning or critical alerts (lasts {{vm.count()}} entries)</span>\n</section>\n<section id="alert" class="plugin">\n <div class="table">\n <div class="table-row" ng-repeat="alert in vm.getAlerts()">\n <div class="table-cell text-left">\n {{alert.begin | date : \'yyyy-MM-dd H:mm:ss\'}} ({{ alert.ongoing ? \'ongoing\' : alert.duration }}) - <span ng-hide="alert.ongoing">{{alert.level}} on</span> <span class="{{ alert.level | lowercase }}">{{alert.name}}</span> ({{alert.max}})\n </div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-cloud/view.html','<section id="cloud">\n <span class="title">{{ vm.provider }}</span> {{ vm.instance }}\n</section>\n');
|
$templateCache.put('components/plugin-cloud/view.html','<section id="cloud">\n <span class="title">{{ vm.provider }}</span> {{ vm.instance }}\n</section>\n');
|
||||||
$templateCache.put('components/plugin-cpu/view.html','<section id="cpu" class="plugin">\n <div class="row">\n <div class="col-sm-24 col-md-12 col-lg-8">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">CPU</div>\n <div class="table-cell">{{ vm.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'user\')">\n {{ vm.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'system\')">\n {{ vm.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell">{{ vm.idle }}%</div>\n </div>\n </div>\n </div>\n <div class="hidden-xs hidden-sm col-md-12 col-lg-8">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">nice:</div>\n <div class="table-cell">\n {{ vm.nice }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.irq != undefined">\n <div class="table-cell text-left">irq:</div>\n <div class="table-cell">\n {{ vm.irq }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.iowait != undefined">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'iowait\')">\n {{ vm.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.steal != undefined">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'steal\')">\n {{ vm.steal }}%\n </div>\n </div>\n </div>\n </div>\n <div class="hidden-xs hidden-sm hidden-md col-lg-8">\n <div class="table">\n <div class="table-row" ng-if="vm.ctx_switches">\n <div class="table-cell text-left">ctx_sw:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'ctx_switches\')">\n {{ vm.ctx_switches }}\n </div>\n </div>\n <div class="table-row" ng-if="vm.interrupts">\n <div class="table-cell text-left">inter:</div>\n <div class="table-cell">\n {{ vm.interrupts }}\n </div>\n </div>\n <div class="table-row" ng-if="vm.soft_interrupts">\n <div class="table-cell text-left">sw_int:</div>\n <div class="table-cell">\n {{ vm.soft_interrupts }}\n </div>\n </div>\n <div class="table-row" ng-if="!statsSystem.isLinux() && vm.syscalls">\n <div class="table-cell text-left">syscal:</div>\n <div class="table-cell">\n {{ vm.syscalls }}\n </div>\n </div>\n </div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-cpu/view.html','<section id="cpu" class="plugin">\n <div class="row">\n <div class="col-sm-24 col-md-12 col-lg-8">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">CPU</div>\n <div class="table-cell">{{ vm.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'user\')">\n {{ vm.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'system\')">\n {{ vm.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell">{{ vm.idle }}%</div>\n </div>\n </div>\n </div>\n <div class="hidden-xs hidden-sm col-md-12 col-lg-8">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">nice:</div>\n <div class="table-cell">\n {{ vm.nice }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.irq != undefined">\n <div class="table-cell text-left">irq:</div>\n <div class="table-cell">\n {{ vm.irq }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.iowait != undefined">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'iowait\')">\n {{ vm.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.steal != undefined">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'steal\')">\n {{ vm.steal }}%\n </div>\n </div>\n </div>\n </div>\n <div class="hidden-xs hidden-sm hidden-md col-lg-8">\n <div class="table">\n <div class="table-row" ng-if="vm.ctx_switches">\n <div class="table-cell text-left">ctx_sw:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'ctx_switches\')">\n {{ vm.ctx_switches }}\n </div>\n </div>\n <div class="table-row" ng-if="vm.interrupts">\n <div class="table-cell text-left">inter:</div>\n <div class="table-cell">\n {{ vm.interrupts }}\n </div>\n </div>\n <div class="table-row" ng-if="vm.soft_interrupts">\n <div class="table-cell text-left">sw_int:</div>\n <div class="table-cell">\n {{ vm.soft_interrupts }}\n </div>\n </div>\n <div class="table-row" ng-if="!statsSystem.isLinux() && vm.syscalls">\n <div class="table-cell text-left">syscal:</div>\n <div class="table-cell">\n {{ vm.syscalls }}\n </div>\n </div>\n </div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-diskio/view.html','<div class="table-row" ng-show="vm.disks.length > 0">\n <div class="table-cell text-left title">DISK I/O</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">R/s</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">W/s</div>\n\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">IOR/s</div>\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">IOW/s</div>\n</div>\n<div class="table-row" ng-repeat="disk in vm.disks track by name">\n <div class="table-cell text-left">{{(disk.alias ? disk.alias : disk.name) | min_size}}</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">{{disk.bitrate.txps }}</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">{{disk.bitrate.rxps }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">{{disk.count.txps }}</div>\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">{{disk.count.rxps }}</div>\n</div>\n');
|
$templateCache.put('components/plugin-diskio/view.html','<div class="table-row" ng-show="vm.disks.length > 0">\n <div class="table-cell text-left title">DISK I/O</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">R/s</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">W/s</div>\n\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">IOR/s</div>\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">IOW/s</div>\n</div>\n<div class="table-row" ng-repeat="disk in vm.disks track by name">\n <div class="table-cell text-left">{{(disk.alias ? disk.alias : disk.name) | min_size}}</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">{{disk.bitrate.txps }}</div>\n <div class="table-cell" ng-show="!vm.arguments.diskio_iops">{{disk.bitrate.rxps }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">{{disk.count.txps }}</div>\n <div class="table-cell" ng-show="vm.arguments.diskio_iops">{{disk.count.rxps }}</div>\n</div>\n');
|
||||||
$templateCache.put('components/plugin-fs/view.html','<div class="table-row">\n <div class="table-cell text-left title">FILE SYS</div>\n <div class="table-cell">\n <span ng-show="!vm.arguments.fs_free_space">Used</span>\n <span ng-show="vm.arguments.fs_free_space">Free</span>\n </div>\n <div class="table-cell">Total</div>\n</div>\n<div class="table-row" ng-repeat="fs in vm.fileSystems">\n <div class="table-cell text-left">{{ fs.shortMountPoint }} <span class="visible-lg-inline" ng-show="fs.name.length <= 20">({{ fs.name }})<span></div>\n <div class="table-cell" ng-class="vm.getDecoration(fs.mountPoint, \'used\')">\n <span ng-show="!vm.arguments.fs_free_space">{{ fs.used | bytes }}</span>\n <span ng-show="vm.arguments.fs_free_space">{{ fs.free | bytes }}</span>\n </div>\n <div class="table-cell">{{ fs.size | bytes }}</div>\n</div>\n');
|
$templateCache.put('components/plugin-fs/view.html','<div class="table-row">\n <div class="table-cell text-left title">FILE SYS</div>\n <div class="table-cell">\n <span ng-show="!vm.arguments.fs_free_space">Used</span>\n <span ng-show="vm.arguments.fs_free_space">Free</span>\n </div>\n <div class="table-cell">Total</div>\n</div>\n<div class="table-row" ng-repeat="fs in vm.fileSystems">\n <div class="table-cell text-left">{{ fs.shortMountPoint }} <span class="visible-lg-inline" ng-show="fs.name.length <= 20">({{ fs.name }})<span></div>\n <div class="table-cell" ng-class="vm.getDecoration(fs.mountPoint, \'used\')">\n <span ng-show="!vm.arguments.fs_free_space">{{ fs.used | bytes }}</span>\n <span ng-show="vm.arguments.fs_free_space">{{ fs.free | bytes }}</span>\n </div>\n <div class="table-cell">{{ fs.size | bytes }}</div>\n</div>\n');
|
||||||
|
$templateCache.put('components/plugin-ip/view.html','<section id="ip" ng-if="vm.address != undefined && !vm.arguments.disable_ip">\n - <span class="title">IP</span> <span>{{ vm.address }}/{{ vm.maskCidr }}</span> <span ng-if="vm.publicAddress" class="title">Pub</span> <span>{{ vm.publicAddress }}</span>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-load/view.html','<section id="load" class="plugin" ng-if="vm.cpucore != undefined">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">LOAD</div>\n <div class="table-cell">{{ vm.cpucore }}-core</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">1 min:</div>\n <div class="table-cell">\n {{ vm.min1 | number : 2}}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">5 min:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'min5\')">\n {{ vm.min5 | number : 2}}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">15 min:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'min15\')">\n {{ vm.min15 | number : 2}}\n </div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-load/view.html','<section id="load" class="plugin" ng-if="vm.cpucore != undefined">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">LOAD</div>\n <div class="table-cell">{{ vm.cpucore }}-core</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">1 min:</div>\n <div class="table-cell">\n {{ vm.min1 | number : 2}}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">5 min:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'min5\')">\n {{ vm.min5 | number : 2}}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">15 min:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'min15\')">\n {{ vm.min15 | number : 2}}\n </div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-mem/view.html','<section id="mem" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">MEM</div>\n <div class="table-cell">{{ vm.percent }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">total:</div>\n <div class="table-cell">{{ vm.total | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">used:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'used\')">\n {{ vm.used | bytes:2 }}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">free:</div>\n <div class="table-cell">{{ vm.free | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-mem/view.html','<section id="mem" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">MEM</div>\n <div class="table-cell">{{ vm.percent }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">total:</div>\n <div class="table-cell">{{ vm.total | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">used:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'used\')">\n {{ vm.used | bytes:2 }}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">free:</div>\n <div class="table-cell">{{ vm.free | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-ip/view.html','<section id="ip" ng-if="vm.address != undefined && !vm.arguments.disable_ip">\n - <span class="title">IP</span> <span>{{ vm.address }}/{{ vm.maskCidr }}</span> <span ng-if="vm.publicAddress" class="title">Pub</span> <span>{{ vm.publicAddress }}</span>\n</section>\n');
|
|
||||||
$templateCache.put('components/plugin-mem-more/view.html','<section id="mem-more" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">active:</div>\n <div class="table-cell">{{ vm.active | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">inactive:</div>\n <div class="table-cell">{{ vm.inactive | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.buffers != undefined">\n <div class="table-cell text-left">buffers:</div>\n <div class="table-cell">{{ vm.buffers | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.cached != undefined">\n <div class="table-cell text-left">cached:</div>\n <div class="table-cell">{{ vm.cached | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-mem-more/view.html','<section id="mem-more" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">active:</div>\n <div class="table-cell">{{ vm.active | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">inactive:</div>\n <div class="table-cell">{{ vm.inactive | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.buffers != undefined">\n <div class="table-cell text-left">buffers:</div>\n <div class="table-cell">{{ vm.buffers | bytes }}</div>\n </div>\n <div class="table-row" ng-show="vm.cached != undefined">\n <div class="table-cell text-left">cached:</div>\n <div class="table-cell">{{ vm.cached | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
||||||
|
$templateCache.put('components/plugin-memswap/view.html','<section id="memswap" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">SWAP</div>\n <div class="table-cell">{{ vm.percent }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">total:</div>\n <div class="table-cell">{{ vm.total | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">used:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'used\')">\n {{ vm.used | bytes }}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">free:</div>\n <div class="table-cell">{{ vm.free | bytes }}</div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-network/view.html','<div class="table-row">\n <div class="table-cell text-left title">NETWORK</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Rx/s</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Tx/s</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx/s</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Rx</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Tx</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx</div>\n</div>\n<div class="table-row" ng-repeat="network in vm.networks track by network.interfaceName">\n <div class="table-cell text-left">{{ network.interfaceName | min_size }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.tx / network.time_since_update | bytes) : (network.tx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cx / network.time_since_update | bytes) : (network.cx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeRx | bytes) : (network.cumulativeRx | bits) }}</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeTx | bytes) : (network.cumulativeTx | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeCx | bytes) : (network.cumulativeCx | bits) }}</div>\n</div>\n');
|
$templateCache.put('components/plugin-network/view.html','<div class="table-row">\n <div class="table-cell text-left title">NETWORK</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Rx/s</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">Tx/s</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx/s</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Rx</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">Tx</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">Rx+Tx</div>\n</div>\n<div class="table-row" ng-repeat="network in vm.networks track by network.interfaceName">\n <div class="table-cell text-left">{{ network.interfaceName | min_size }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.rx / network.time_since_update | bytes) : (network.rx / network.time_since_update | bits) }}</div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.tx / network.time_since_update | bytes) : (network.tx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="!vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cx / network.time_since_update | bytes) : (network.cx / network.time_since_update | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeRx | bytes) : (network.cumulativeRx | bits) }}</div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && !vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeTx | bytes) : (network.cumulativeTx | bits) }}</div>\n\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum"></div>\n <div class="table-cell" ng-show="vm.arguments.network_cumul && vm.arguments.network_sum">{{ vm.arguments.byte ? (network.cumulativeCx | bytes) : (network.cumulativeCx | bits) }}</div>\n</div>\n');
|
||||||
$templateCache.put('components/plugin-percpu/view.html','<section id="percpu" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">PER CPU</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getUserAlert(percpu)">\n {{ percpu.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.idle }}%</div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].iowait">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].steal">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.steal }}%\n </div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-percpu/view.html','<section id="percpu" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">PER CPU</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.total }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">user:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getUserAlert(percpu)">\n {{ percpu.user }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">system:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.system }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">idle:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus">{{ percpu.idle }}%</div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].iowait">\n <div class="table-cell text-left">iowait:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.iowait }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.cpus[0].steal">\n <div class="table-cell text-left">steal:</div>\n <div class="table-cell" ng-repeat="percpu in vm.cpus" ng-class="vm.getSystemAlert(percpu)">\n {{ percpu.steal }}%\n </div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-ports/view.html','<div class="table-row" ng-repeat="port in vm.ports">\n <div class="table-cell text-left">{{(port.description ? port.description : port.host + \' \' + port.port) | min_size: 20}}</div>\n <div class="table-cell"></div>\n <div ng-switch="port.status" ng-class="vm.getDecoration(port)" class="table-cell">\n <span ng-switch-when="null">Scanning</span>\n <span ng-switch-when="false">Timeout</span>\n <span ng-switch-when="true">Open</span>\n <span ng-switch-default>{{port.status * 1000.0 | number:0}}ms</span>\n </div>\n</div>');
|
$templateCache.put('components/plugin-ports/view.html','<div class="table-row" ng-repeat="port in vm.ports">\n <div class="table-cell text-left">{{(port.description ? port.description : port.host + \' \' + port.port) | min_size: 20}}</div>\n <div class="table-cell"></div>\n <div ng-switch="port.status" ng-class="vm.getDecoration(port)" class="table-cell">\n <span ng-switch-when="null">Scanning</span>\n <span ng-switch-when="false">Timeout</span>\n <span ng-switch-when="true">Open</span>\n <span ng-switch-default>{{port.status * 1000.0 | number:0}}ms</span>\n </div>\n</div>');
|
||||||
$templateCache.put('components/plugin-process/view.html','<div ng-show="!vm.arguments.disable_process">\n <glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>\n <glances-plugin-amps arguments="vm.arguments" ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>\n <glances-plugin-processlist arguments="vm.arguments" sorter="vm.sorter"></glances-plugin-processlist>\n</div>\n<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press \'z\' to display)</div>\n');
|
$templateCache.put('components/plugin-process/view.html','<div ng-show="!vm.arguments.disable_process">\n <glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>\n <glances-plugin-amps ng-if="!vm.arguments.disable_amps"></glances-plugin-amps>\n <glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>\n</div>\n<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press \'z\' to display)</div>\n');
|
||||||
$templateCache.put('components/plugin-processcount/view.html','<section id="processcount" class="plugin">\n <span class="title">TASKS</span>\n <span>{{ vm.total }} ({{ vm.thread }} thr),</span>\n <span>{{ vm.running }} run,</span>\n <span>{{ vm.sleeping }} slp,</span>\n <span>{{ vm.stopped }} oth</span>\n <span> sorted {{ vm.sorter.auto ? \'automatically\' : \'\' }} by {{ vm.sorter.getColumnLabel(vm.sorter.column) }}, flat view</span>\n</section>');
|
$templateCache.put('components/plugin-processcount/view.html','<section id="processcount" class="plugin">\n <span class="title">TASKS</span>\n <span>{{ vm.total }} ({{ vm.thread }} thr),</span>\n <span>{{ vm.running }} run,</span>\n <span>{{ vm.sleeping }} slp,</span>\n <span>{{ vm.stopped }} oth</span>\n <span> sorted {{ vm.sorter.auto ? \'automatically\' : \'\' }} by {{ vm.sorter.getColumnLabel(vm.sorter.column) }}, flat view</span>\n</section>');
|
||||||
$templateCache.put('components/plugin-processlist/view.html','<section id="processlist-plugin" class="plugin">\n <div class="table">\n <div class="table-row">\n <div sortable-th sorter="vm.sorter" column="cpu_percent" class="table-cell">CPU%</div>\n <div sortable-th sorter="vm.sorter" column="memory_percent" class="table-cell">MEM%</div>\n <div class="table-cell hidden-xs hidden-sm">VIRT</div>\n <div class="table-cell hidden-xs hidden-sm">RES</div>\n <div class="table-cell">PID</div>\n <div sortable-th sorter="vm.sorter" column="username" class="table-cell text-left">USER</div>\n <div class="table-cell">NI</div>\n <div class="table-cell">S</div>\n <div sortable-th sorter="vm.sorter" column="timemillis" class="table-cell hidden-xs hidden-sm">TIME+</div>\n <div sortable-th sorter="vm.sorter" column="io_read" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOR/s</div>\n <div sortable-th sorter="vm.sorter" column="io_write" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOW/s</div>\n <div sortable-th sorter="vm.sorter" column="name" class="table-cell text-left">Command</div>\n </div>\n <div class="table-row" ng-repeat="process in vm.processes | orderBy:vm.sorter.column:vm.sorter.isReverseColumn(vm.sorter.column) | limitTo: vm.getLimit() track by process.pid">\n <div class="table-cell" ng-class="vm.getCpuPercentAlert(process)">{{process.cpu_percent | number:1}}</div>\n <div class="table-cell" ng-class="vm.getMemoryPercentAlert(process)">{{process.memory_percent | number:1}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memvirt | bytes}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memres | bytes}}</div>\n <div class="table-cell">{{process.pid}}</div>\n <div class="table-cell text-left">{{process.username}}</div>\n <div class="table-cell" ng-class="{nice: process.isNice}">{{process.nice | exclamation}}</div>\n <div class="table-cell" ng-class="{status: process.status == \'R\'}">{{process.status}}</div>\n <div class="table-cell hidden-xs hidden-sm">\n <span ng-show="process.timeplus.hours > 0" class="highlight">{{ process.timeplus.hours }}h</span>{{ process.timeplus.minutes | leftPad:2:\'0\' }}:{{ process.timeplus.seconds | leftPad:2:\'0\' }}<span ng-show="process.timeplus.hours <= 0">.{{ process.timeplus.milliseconds | leftPad:2:\'0\' }}</span>\n </div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioRead}}</div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioWrite}}</div>\n <div class="table-cell text-left" ng-show="vm.arguments.process_short_name">{{process.name}}</div>\n <div class="table-cell text-left" ng-show="!vm.arguments.process_short_name">{{process.cmdline}}</div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-processlist/view.html','<section id="processlist-plugin" class="plugin">\n <div class="table">\n <div class="table-row">\n <div sortable-th sorter="vm.sorter" column="cpu_percent" class="table-cell">CPU%</div>\n <div sortable-th sorter="vm.sorter" column="memory_percent" class="table-cell">MEM%</div>\n <div class="table-cell hidden-xs hidden-sm">VIRT</div>\n <div class="table-cell hidden-xs hidden-sm">RES</div>\n <div class="table-cell">PID</div>\n <div sortable-th sorter="vm.sorter" column="username" class="table-cell text-left">USER</div>\n <div class="table-cell">NI</div>\n <div class="table-cell">S</div>\n <div sortable-th sorter="vm.sorter" column="timemillis" class="table-cell hidden-xs hidden-sm">TIME+</div>\n <div sortable-th sorter="vm.sorter" column="io_read" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOR/s</div>\n <div sortable-th sorter="vm.sorter" column="io_write" class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">IOW/s</div>\n <div sortable-th sorter="vm.sorter" column="name" class="table-cell text-left">Command</div>\n </div>\n <div class="table-row" ng-repeat="process in vm.processes | orderBy:vm.sorter.column:vm.sorter.isReverseColumn(vm.sorter.column) | limitTo: vm.getLimit() track by process.pid">\n <div class="table-cell" ng-class="vm.getCpuPercentAlert(process)">{{process.cpu_percent | number:1}}</div>\n <div class="table-cell" ng-class="vm.getMemoryPercentAlert(process)">{{process.memory_percent | number:1}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memvirt | bytes}}</div>\n <div class="table-cell hidden-xs hidden-sm">{{process.memres | bytes}}</div>\n <div class="table-cell">{{process.pid}}</div>\n <div class="table-cell text-left">{{process.username}}</div>\n <div class="table-cell" ng-class="{nice: process.isNice}">{{process.nice | exclamation}}</div>\n <div class="table-cell" ng-class="{status: process.status == \'R\'}">{{process.status}}</div>\n <div class="table-cell hidden-xs hidden-sm">\n <span ng-show="process.timeplus.hours > 0" class="highlight">{{ process.timeplus.hours }}h</span>{{ process.timeplus.minutes | leftPad:2:\'0\' }}:{{ process.timeplus.seconds | leftPad:2:\'0\' }}<span ng-show="process.timeplus.hours <= 0">.{{ process.timeplus.milliseconds | leftPad:2:\'0\' }}</span>\n </div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioRead}}</div>\n <div class="table-cell hidden-xs hidden-sm" ng-show="vm.ioReadWritePresent">{{process.ioWrite}}</div>\n <div class="table-cell text-left" ng-show="vm.arguments.process_short_name">{{process.name}}</div>\n <div class="table-cell text-left" ng-show="!vm.arguments.process_short_name">{{process.cmdline}}</div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-quicklook/view.html','<section id="quicklook-plugin" class="plugin">\n <div class="cpu-name">\n {{ vm.cpu_name }}\n </div>\n <div class="table">\n <div class="table-row" ng-show="!vm.arguments.percpu">\n <div class="table-cell text-left">CPU</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ vm.cpu }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.cpu }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.cpu }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.arguments.percpu" ng-repeat="percpu in vm.percpus">\n <div class="table-cell text-left">CPU{{ percpu.number }}</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ percpu.total }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percpu.total }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ percpu.total }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">MEM</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'mem\') }}" role="progressbar" aria-valuenow="{{ vm.mem }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.mem }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.mem }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">SWAP</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'swap\') }}" role="progressbar" aria-valuenow="{{ vm.swap }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.swap }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.swap }}%\n </div>\n </div>\n </div>\n</section>\n');
|
$templateCache.put('components/plugin-quicklook/view.html','<section id="quicklook-plugin" class="plugin">\n <div class="cpu-name">\n {{ vm.cpu_name }}\n </div>\n <div class="table">\n <div class="table-row" ng-show="!vm.arguments.percpu">\n <div class="table-cell text-left">CPU</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ vm.cpu }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.cpu }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.cpu }}%\n </div>\n </div>\n <div class="table-row" ng-show="vm.arguments.percpu" ng-repeat="percpu in vm.percpus">\n <div class="table-cell text-left">CPU{{ percpu.number }}</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'cpu\') }}" role="progressbar" aria-valuenow="{{ percpu.total }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ percpu.total }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ percpu.total }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">MEM</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'mem\') }}" role="progressbar" aria-valuenow="{{ vm.mem }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.mem }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.mem }}%\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">SWAP</div>\n <div class="table-cell">\n <div class="progress">\n <div class="progress-bar progress-bar-{{ vm.getDecoration(\'swap\') }}" role="progressbar" aria-valuenow="{{ vm.swap }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ vm.swap }}%;">\n \n </div>\n </div>\n </div>\n <div class="table-cell">\n {{ vm.swap }}%\n </div>\n </div>\n </div>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-system/view.html','<section id="system">\n <span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>\n <span class="title">{{ vm.hostname }}</span>\n <span ng-show="vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-show="!vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>\n</section>\n');
|
$templateCache.put('components/plugin-system/view.html','<section id="system">\n <span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>\n <span class="title">{{ vm.hostname }}</span>\n <span ng-show="vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-show="!vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-wifi/view.html','<section id="wifi" class="plugin table-row-group" ng-if="vm.hotspots.length > 0">\n <div class="table-row">\n <div class="table-cell text-left title">WIFI</div>\n <div class="table-cell"></div>\n <div class="table-cell">dBm</div>\n </div>\n <div class="table-row" ng-repeat="hotspot in vm.hotspots track by ssid">\n <div class="table-cell text-left">{{ hotspot.ssid|limitTo:20 }} <span ng-if="hotspot.encrypted">{{ hotspot.encryption_type }}</span></div>\n <div class="table-cell"></div>\n <div class="table-cell" ng-class="vm.getDecoration(hotspot, \'signal\')">{{ hotspot.signal }}</div>\n </div>\n</section>\n');
|
|
||||||
$templateCache.put('components/plugin-uptime/view.html','<section id="uptime">\n <span>Uptime: {{ vm.value }}</span>\n</section>\n');
|
$templateCache.put('components/plugin-uptime/view.html','<section id="uptime">\n <span>Uptime: {{ vm.value }}</span>\n</section>\n');
|
||||||
$templateCache.put('components/plugin-memswap/view.html','<section id="memswap" class="plugin">\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left title">SWAP</div>\n <div class="table-cell">{{ vm.percent }}%</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">total:</div>\n <div class="table-cell">{{ vm.total | bytes }}</div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">used:</div>\n <div class="table-cell" ng-class="vm.getDecoration(\'used\')">\n {{ vm.used | bytes }}\n </div>\n </div>\n <div class="table-row">\n <div class="table-cell text-left">free:</div>\n <div class="table-cell">{{ vm.free | bytes }}</div>\n </div>\n </div>\n</section>\n');}]);
|
$templateCache.put('components/plugin-wifi/view.html','<section id="wifi" class="plugin table-row-group" ng-if="vm.hotspots.length > 0">\n <div class="table-row">\n <div class="table-cell text-left title">WIFI</div>\n <div class="table-cell"></div>\n <div class="table-cell">dBm</div>\n </div>\n <div class="table-row" ng-repeat="hotspot in vm.hotspots track by ssid">\n <div class="table-cell text-left">{{ hotspot.ssid|limitTo:20 }} <span ng-if="hotspot.encrypted">{{ hotspot.encryption_type }}</span></div>\n <div class="table-cell"></div>\n <div class="table-cell" ng-class="vm.getDecoration(hotspot, \'signal\')">{{ hotspot.signal }}</div>\n </div>\n</section>\n');}]);
|
@ -21,7 +21,7 @@
|
|||||||
<script type="text/javascript" src="js/templates.min.js"></script>
|
<script type="text/javascript" src="js/templates.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body ng-view="">
|
<body>
|
||||||
|
<glances></glances>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user