mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-05 08:39:15 +03:00
WebUi : Create components for help / cpu and cloud
This commit is contained in:
parent
014a653417
commit
e4324eb84c
@ -1,76 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-24">{{help.version}} {{help.psutil_version}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-24">{{help.configuration_file}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_auto}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_network}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_cpu}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_alert}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_mem}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.percpu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_user}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_ip}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_proc}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_docker}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_io}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.view_network_io_combination}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_cpu_times}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.view_cumulative_network}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_diskio}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesytem_freespace}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesystem}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_help}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_network}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.diskio_iops}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_sensors}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_top_menu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_left_sidebar}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_amp}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_process_stats}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_irq}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_gpu}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_mean_gpu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_quick_look}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_short_processname}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_ports}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
@ -17,7 +17,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="" ng-keydown="onKeyDown($event)">
|
<body ng-view="">
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesController($interval, GlancesStats, favicoService) {
|
function GlancesController($interval, GlancesStats) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.sorter = {
|
vm.sorter = {
|
||||||
@ -22,6 +22,12 @@ function GlancesController($interval, GlancesStats, favicoService) {
|
|||||||
vm.stats = {};
|
vm.stats = {};
|
||||||
vm.refreshData = function () {
|
vm.refreshData = function () {
|
||||||
GlancesStats.getData().then(function (data) {
|
GlancesStats.getData().then(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';
|
||||||
|
|
||||||
vm.stats = data;
|
vm.stats = data;
|
||||||
vm.is_disconnected = false;
|
vm.is_disconnected = false;
|
||||||
vm.dataLoaded = true;
|
vm.dataLoaded = true;
|
||||||
@ -37,7 +43,6 @@ function GlancesController($interval, GlancesStats, favicoService) {
|
|||||||
}, refreshTime * 1000); // in milliseconds
|
}, refreshTime * 1000); // in milliseconds
|
||||||
|
|
||||||
vm.onKeyDown = function ($event) {
|
vm.onKeyDown = function ($event) {
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case !$event.shiftKey && $event.keyCode == keycodes.a:
|
case !$event.shiftKey && $event.keyCode == keycodes.a:
|
||||||
// a => Sort processes automatically
|
// a => Sort processes automatically
|
||||||
|
@ -1,66 +1,72 @@
|
|||||||
<div ng-show="!vm.dataLoaded" class="container-fluid" id="loading-page">
|
<div ng-keydown="vm.onKeyDown($event)" tabindex="0">
|
||||||
<div class="glances-logo"></div>
|
<div ng-show="!vm.dataLoaded" class="container-fluid" id="loading-page">
|
||||||
<div class="loader">Loading...</div>
|
<div class="glances-logo"></div>
|
||||||
</div>
|
<div class="loader">Loading...</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div ng-show="vm.arguments.help_tag" class="container-fluid" ng-include src="'help.html'"></div>
|
<glances-help help="vm.help" ng-show="vm.arguments.help_tag"></glances-help>
|
||||||
|
|
||||||
|
<div ng-show="vm.dataLoaded && !vm.arguments.help_tag" class="container-fluid">
|
||||||
|
<div class="top-plugin">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-24">
|
||||||
|
<div class="pull-left">
|
||||||
|
<glances-plugin-system stats="vm.stats"></glances-plugin-system>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left">
|
||||||
|
<glances-plugin-ip stats="vm.stats" arguments="vm.arguments"></glances-plugin-ip>
|
||||||
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
<glances-plugin-uptime stats="vm.stats"></glances-plugin-uptime>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-24">
|
||||||
|
<div class="pull-left">
|
||||||
|
<glances-plugin-cloud stats="vm.stats"></glances-plugin-cloud>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div ng-show="vm.dataLoaded && !vm.arguments.help_tag" class="container-fluid">
|
|
||||||
<div class="top-plugin">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-24">
|
<div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!arguments.disable_quicklook">
|
||||||
<div class="pull-left">
|
<glances-plugin-quicklook></glances-plugin-quicklook>
|
||||||
<glances-plugin-system stats="vm.stats"></glances-plugin-system>
|
</div>
|
||||||
</div>
|
<div class="col-sm-6 col-md-8 col-lg-6" ng-if="!arguments.disable_cpu && !arguments.percpu">
|
||||||
<div class="pull-left">
|
<glances-plugin-cpu stats="vm.stats"></glances-plugin-cpu>
|
||||||
<glances-plugin-ip stats="vm.stats" arguments="vm.arguments"></glances-plugin-ip>
|
</div>
|
||||||
</div>
|
<div class="col-sm-12 col-md-8 col-lg-6" ng-if="!arguments.disable_cpu && arguments.percpu">
|
||||||
<div class="pull-right">
|
<glances-plugin-per-cpu></glances-plugin-per-cpu>
|
||||||
<glances-plugin-uptime stats="vm.stats"></glances-plugin-uptime>
|
</div>
|
||||||
|
<div class="hidden-xs hidden-sm col-md-4 col-lg-3"
|
||||||
|
ng-if="!arguments.disable_gpu && statsGpu.gpus.length > 0">
|
||||||
|
<glances-plugin-gpu></glances-plugin-gpu>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_mem">
|
||||||
|
<glances-plugin-mem></glances-plugin-mem>
|
||||||
|
</div>
|
||||||
|
<div class="hidden-xs hidden-sm col-md-4 col-lg-3"
|
||||||
|
ng-if="!arguments.disable_mem && !(!arguments.disable_gpu && statsGpu.gpus.length > 0)">
|
||||||
|
<glances-plugin-mem-more></glances-plugin-mem-more>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_memswap">
|
||||||
|
<glances-plugin-memswap></glances-plugin-memswap>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_load">
|
||||||
|
<glances-plugin-load stats="vm.stats"></glances-plugin-load>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" ng-if="statsCloud.getProvider()">
|
<div class="row">
|
||||||
<div class="col-sm-24">
|
<div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">
|
||||||
<div class="pull-left">
|
<div class="table">
|
||||||
<glances-plugin-cloud></glances-plugin-cloud>
|
<glances-plugin-network></glances-plugin-network ng-show="!arguments.disable_network">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-sm-18">
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!arguments.disable_quicklook">
|
|
||||||
<glances-plugin-quicklook></glances-plugin-quicklook>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-md-8 col-lg-6" ng-if="!arguments.disable_cpu && !arguments.percpu">
|
|
||||||
<glances-plugin-cpu></glances-plugin-cpu>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-8 col-lg-6" ng-if="!arguments.disable_cpu && arguments.percpu">
|
|
||||||
<glances-plugin-per-cpu></glances-plugin-per-cpu>
|
|
||||||
</div>
|
|
||||||
<div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!arguments.disable_gpu && statsGpu.gpus.length > 0">
|
|
||||||
<glances-plugin-gpu></glances-plugin-gpu>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_mem">
|
|
||||||
<glances-plugin-mem></glances-plugin-mem>
|
|
||||||
</div>
|
|
||||||
<div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!arguments.disable_mem && !(!arguments.disable_gpu && statsGpu.gpus.length > 0)">
|
|
||||||
<glances-plugin-mem-more></glances-plugin-mem-more>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_memswap">
|
|
||||||
<glances-plugin-memswap></glances-plugin-memswap>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!arguments.disable_load">
|
|
||||||
<glances-plugin-load stats="vm.stats"></glances-plugin-load>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">
|
|
||||||
<div class="table">
|
|
||||||
<glances-plugin-network></glances-plugin-network ng-show="!arguments.disable_network">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-18">
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
10
glances/outputs/static/js/components/help/component.js
Normal file
10
glances/outputs/static/js/components/help/component.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesHelp', {
|
||||||
|
controller: GlancesHelpController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
help: '<',
|
||||||
|
},
|
||||||
|
templateUrl: 'components/help/view.html'
|
||||||
|
});
|
5
glances/outputs/static/js/components/help/controller.js
Normal file
5
glances/outputs/static/js/components/help/controller.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesHelpController() {
|
||||||
|
var vm = this;
|
||||||
|
}
|
79
glances/outputs/static/js/components/help/view.html
Normal file
79
glances/outputs/static/js/components/help/view.html
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-24">{{vm.help.version}} {{vm.help.psutil_version}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row"> </div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-24">{{vm.help.configuration_file}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row"> </div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_auto}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_network}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_alert}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_mem}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.percpu}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_user}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_ip}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_proc}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_docker}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_io}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.view_network_io_combination}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.sort_cpu_times}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.view_cumulative_network}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_diskio}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesytem_freespace}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_filesystem}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_vm.help}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_network}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.diskio_iops}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_sensors}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_top_menu}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_left_sidebar}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_amp}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_process_stats}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.show_hide_irq}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_gpu}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_mean_gpu}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_quick_look}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_short_processname}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6"></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{vm.help.enable_disable_ports}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
@ -0,0 +1,10 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginCloud', {
|
||||||
|
controller: GlancesPluginCloudController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-cloud/view.html'
|
||||||
|
});
|
@ -0,0 +1,22 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginCloudController() {
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
vm.provider = null;
|
||||||
|
vm.instance = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['cloud'];
|
||||||
|
|
||||||
|
if (data['ami-id'] !== undefined) {
|
||||||
|
vm.provider = 'AWS EC2';
|
||||||
|
vm.instance = data['instance-type'] + ' instance ' + data['instance-id'] + ' (' + data['region'] + ')';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<section id="cloud">
|
||||||
|
<span class="title">{{ vm.provider }}</span> {{ vm.instance }}
|
||||||
|
</section>
|
10
glances/outputs/static/js/components/plugin-cpu/component.js
Normal file
10
glances/outputs/static/js/components/plugin-cpu/component.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginCpu', {
|
||||||
|
controller: GlancesPluginCpuController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-cpu/view.html'
|
||||||
|
});
|
@ -0,0 +1,62 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginCpuController() {
|
||||||
|
var vm = this;
|
||||||
|
var _view = {};
|
||||||
|
|
||||||
|
vm.total = null;
|
||||||
|
vm.user = null;
|
||||||
|
vm.system = null;
|
||||||
|
vm.idle = null;
|
||||||
|
vm.nice = null;
|
||||||
|
vm.irq = null;
|
||||||
|
vm.iowait = null;
|
||||||
|
vm.steal = null;
|
||||||
|
vm.ctx_switches = null;
|
||||||
|
vm.interrupts = null;
|
||||||
|
vm.soft_interrupts = null;
|
||||||
|
vm.syscalls = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['cpu'];
|
||||||
|
_view = stats.view['cpu'];
|
||||||
|
|
||||||
|
vm.total = data.total;
|
||||||
|
vm.user = data.user;
|
||||||
|
vm.system = data.system;
|
||||||
|
vm.idle = data.idle;
|
||||||
|
vm.nice = data.nice;
|
||||||
|
vm.irq = data.irq;
|
||||||
|
vm.iowait = data.iowait;
|
||||||
|
vm.steal = data.steal;
|
||||||
|
|
||||||
|
if (data.ctx_switches) {
|
||||||
|
vm.ctx_switches = Math.floor(data.ctx_switches / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.interrupts) {
|
||||||
|
vm.interrupts = Math.floor(data.interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.soft_interrupts) {
|
||||||
|
vm.soft_interrupts = Math.floor(data.soft_interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.syscalls) {
|
||||||
|
vm.syscalls = Math.floor(data.syscalls / data.time_since_update);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getDecoration = function (value) {
|
||||||
|
if (_view[value] === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _view[value].decoration.toLowerCase();
|
||||||
|
};
|
||||||
|
}
|
84
glances/outputs/static/js/components/plugin-cpu/view.html
Normal file
84
glances/outputs/static/js/components/plugin-cpu/view.html
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<section id="cpu" class="plugin">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-24 col-md-12 col-lg-8">
|
||||||
|
<div class="table">
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-cell text-left title">CPU</div>
|
||||||
|
<div class="table-cell">{{ vm.total }}%</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-cell text-left">user:</div>
|
||||||
|
<div class="table-cell" ng-class="vm.getDecoration('user')">
|
||||||
|
{{ vm.user }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-cell text-left">system:</div>
|
||||||
|
<div class="table-cell" ng-class="vm.getDecoration('system')">
|
||||||
|
{{ vm.system }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-cell text-left">idle:</div>
|
||||||
|
<div class="table-cell">{{ vm.idle }}%</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hidden-xs hidden-sm col-md-12 col-lg-8">
|
||||||
|
<div class="table">
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-cell text-left">nice:</div>
|
||||||
|
<div class="table-cell">
|
||||||
|
{{ vm.nice }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-show="vm.irq != undefined">
|
||||||
|
<div class="table-cell text-left">irq:</div>
|
||||||
|
<div class="table-cell">
|
||||||
|
{{ vm.irq }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-show="vm.iowait != undefined">
|
||||||
|
<div class="table-cell text-left">iowait:</div>
|
||||||
|
<div class="table-cell" ng-class="vm.getDecoration('iowait')">
|
||||||
|
{{ vm.iowait }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-show="vm.steal != undefined">
|
||||||
|
<div class="table-cell text-left">steal:</div>
|
||||||
|
<div class="table-cell" ng-class="vm.getDecoration('steal')">
|
||||||
|
{{ vm.steal }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hidden-xs hidden-sm hidden-md col-lg-8">
|
||||||
|
<div class="table">
|
||||||
|
<div class="table-row" ng-if="vm.ctx_switches">
|
||||||
|
<div class="table-cell text-left">ctx_sw:</div>
|
||||||
|
<div class="table-cell" ng-class="vm.getDecoration('ctx_switches')">
|
||||||
|
{{ vm.ctx_switches }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-if="vm.interrupts">
|
||||||
|
<div class="table-cell text-left">inter:</div>
|
||||||
|
<div class="table-cell">
|
||||||
|
{{ vm.interrupts }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-if="vm.soft_interrupts">
|
||||||
|
<div class="table-cell text-left">sw_int:</div>
|
||||||
|
<div class="table-cell">
|
||||||
|
{{ vm.soft_interrupts }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-row" ng-if="!statsSystem.isLinux() && vm.syscalls">
|
||||||
|
<div class="table-cell text-left">syscal:</div>
|
||||||
|
<div class="table-cell">
|
||||||
|
{{ vm.syscalls }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -4,7 +4,7 @@ glancesApp.component('glancesPluginIp', {
|
|||||||
controller: GlancesPluginIpController,
|
controller: GlancesPluginIpController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
stats: '<',
|
stats: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-ip/view.html'
|
templateUrl: 'components/plugin-ip/view.html'
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,7 @@ glancesApp.component('glancesPluginLoad', {
|
|||||||
controller: GlancesPluginLoadController,
|
controller: GlancesPluginLoadController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
stats: '<',
|
stats: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-load/view.html'
|
templateUrl: 'components/plugin-load/view.html'
|
||||||
});
|
});
|
||||||
|
@ -4,10 +4,10 @@ function GlancesPluginLoadController() {
|
|||||||
var vm = this;
|
var vm = this;
|
||||||
var _view = {};
|
var _view = {};
|
||||||
|
|
||||||
this.cpucore = null;
|
vm.cpucore = null;
|
||||||
this.min1 = null;
|
vm.min1 = null;
|
||||||
this.min5 = null;
|
vm.min5 = null;
|
||||||
this.min15 = null;
|
vm.min15 = null;
|
||||||
|
|
||||||
vm.$onChanges = function (changes) {
|
vm.$onChanges = function (changes) {
|
||||||
var stats = changes.stats.currentValue;
|
var stats = changes.stats.currentValue;
|
||||||
@ -25,7 +25,7 @@ function GlancesPluginLoadController() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.getDecoration = function(value) {
|
this.getDecoration = function(value) {
|
||||||
if(_view[value] == undefined) {
|
if(_view[value] === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ glancesApp.component('glancesPluginSystem', {
|
|||||||
controller: GlancesPluginSystemController,
|
controller: GlancesPluginSystemController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
stats: '<',
|
stats: '<',
|
||||||
isDisconnected: '<'
|
isDisconnected: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-system/view.html'
|
templateUrl: 'components/plugin-system/view.html'
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
function GlancesPluginSystemController() {
|
function GlancesPluginSystemController() {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
var _pluginName = "system";
|
|
||||||
|
|
||||||
vm.hostname = null;
|
vm.hostname = null;
|
||||||
vm.platform = null;
|
vm.platform = null;
|
||||||
@ -18,7 +17,7 @@ function GlancesPluginSystemController() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = stats.stats[_pluginName];
|
var data = stats.stats['system'];
|
||||||
|
|
||||||
vm.hostname = data['hostname'];
|
vm.hostname = data['hostname'];
|
||||||
vm.platform = data['platform'];
|
vm.platform = data['platform'];
|
||||||
@ -26,20 +25,4 @@ function GlancesPluginSystemController() {
|
|||||||
vm.os.version = data['os_version'];
|
vm.os.version = data['os_version'];
|
||||||
vm.humanReadableName = data['hr_name'];
|
vm.humanReadableName = data['hr_name'];
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.isBsd = function() {
|
|
||||||
return this.os.name === 'FreeBSD';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isLinux = function() {
|
|
||||||
return this.os.name === 'Linux';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isMac = function() {
|
|
||||||
return this.os.name === 'Darwin';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isWindows = function() {
|
|
||||||
return this.os.name === 'Windows';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<section id="system">
|
<section id="system">
|
||||||
<span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>
|
<span ng-if="vm.isDisconnected" class="critical">Disconnected from</span>
|
||||||
<span class="title">{{ vm.hostname }}</span>
|
<span class="title">{{ vm.hostname }}</span>
|
||||||
<span ng-show="vm.isLinux()" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>
|
<span ng-show="vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>
|
||||||
<span ng-show="!vm.isLinux()" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>
|
<span ng-show="!vm.stats.isLinux" class="hidden-xs hidden-sm">({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})</span>
|
||||||
</section>
|
</section>
|
||||||
|
@ -4,7 +4,7 @@ glancesApp.component('glancesPluginUptime', {
|
|||||||
controller: GlancesPluginUptimeController,
|
controller: GlancesPluginUptimeController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
stats: '<',
|
stats: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-uptime/view.html'
|
templateUrl: 'components/plugin-uptime/view.html'
|
||||||
});
|
});
|
||||||
|
76
glances/outputs/static/public/help.html
vendored
76
glances/outputs/static/public/help.html
vendored
@ -1,76 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-24">{{help.version}} {{help.psutil_version}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-24">{{help.configuration_file}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_auto}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_network}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_cpu}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_alert}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_mem}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.percpu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_user}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_ip}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_proc}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_docker}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_io}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.view_network_io_combination}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_cpu_times}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.view_cumulative_network}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_diskio}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesytem_freespace}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesystem}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_help}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_network}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.diskio_iops}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_sensors}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_top_menu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_left_sidebar}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_amp}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_process_stats}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_irq}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_gpu}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_mean_gpu}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_quick_look}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_short_processname}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_ports}}</div>
|
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
|
||||||
</div>
|
|
2
glances/outputs/static/public/index.html
vendored
2
glances/outputs/static/public/index.html
vendored
@ -17,7 +17,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="" ng-keydown="onKeyDown($event)">
|
<body ng-view="">
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
403
glances/outputs/static/public/js/main.min.js
vendored
403
glances/outputs/static/public/js/main.min.js
vendored
@ -300,148 +300,6 @@ var keycodes = {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginIp', {
|
|
||||||
controller: GlancesPluginIpController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindings: {
|
|
||||||
stats: '<',
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-ip/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginIpController() {
|
|
||||||
var vm = this;
|
|
||||||
|
|
||||||
this.address = null;
|
|
||||||
this.gateway = null;
|
|
||||||
this.mask = null;
|
|
||||||
this.maskCidr = null;
|
|
||||||
this.publicAddress = null;
|
|
||||||
|
|
||||||
vm.$onChanges = function (changes) {
|
|
||||||
var stats = changes.stats.currentValue;
|
|
||||||
if (stats === undefined || stats.stats === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = stats.stats['ip'];
|
|
||||||
|
|
||||||
vm.address = data.address;
|
|
||||||
vm.gateway = data.gateway;
|
|
||||||
vm.mask = data.mask;
|
|
||||||
vm.maskCidr = data.mask_cidr;
|
|
||||||
vm.publicAddress = data.public_address
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glancesPluginLoad', {
|
|
||||||
controller: GlancesPluginLoadController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindings: {
|
|
||||||
stats: '<',
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-load/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginLoadController() {
|
|
||||||
var vm = this;
|
|
||||||
var _view = {};
|
|
||||||
|
|
||||||
this.cpucore = null;
|
|
||||||
this.min1 = null;
|
|
||||||
this.min5 = null;
|
|
||||||
this.min15 = null;
|
|
||||||
|
|
||||||
vm.$onChanges = function (changes) {
|
|
||||||
var stats = changes.stats.currentValue;
|
|
||||||
if (stats === undefined || stats.stats === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = stats.stats['load'];
|
|
||||||
_view = stats.view['load'];
|
|
||||||
|
|
||||||
vm.cpucore = data['cpucore'];
|
|
||||||
vm.min1 = data['min1'];
|
|
||||||
vm.min5 = data['min5'];
|
|
||||||
vm.min15 = data['min15'];
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getDecoration = function(value) {
|
|
||||||
if(_view[value] == undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _view[value].decoration.toLowerCase();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glancesPluginSystem', {
|
|
||||||
controller: GlancesPluginSystemController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindings: {
|
|
||||||
stats: '<',
|
|
||||||
isDisconnected: '<'
|
|
||||||
},
|
|
||||||
templateUrl: 'components/plugin-system/view.html'
|
|
||||||
});
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function GlancesPluginSystemController() {
|
|
||||||
var vm = this;
|
|
||||||
var _pluginName = "system";
|
|
||||||
|
|
||||||
vm.hostname = null;
|
|
||||||
vm.platform = null;
|
|
||||||
vm.humanReadableName = null;
|
|
||||||
vm.os = {
|
|
||||||
'name': null,
|
|
||||||
'version': null
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.$onChanges = function (changes) {
|
|
||||||
var stats = changes.stats.currentValue;
|
|
||||||
if (stats === undefined || stats.stats === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = stats.stats[_pluginName];
|
|
||||||
|
|
||||||
vm.hostname = data['hostname'];
|
|
||||||
vm.platform = data['platform'];
|
|
||||||
vm.os.name = data['os_name'];
|
|
||||||
vm.os.version = data['os_version'];
|
|
||||||
vm.humanReadableName = data['hr_name'];
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isBsd = function() {
|
|
||||||
return this.os.name === 'FreeBSD';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isLinux = function() {
|
|
||||||
return this.os.name === 'Linux';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isMac = function() {
|
|
||||||
return this.os.name === 'Darwin';
|
|
||||||
};
|
|
||||||
|
|
||||||
vm.isWindows = function() {
|
|
||||||
return this.os.name === 'Windows';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
glancesApp.component('glances', {
|
glancesApp.component('glances', {
|
||||||
controller: GlancesController,
|
controller: GlancesController,
|
||||||
bindings: {
|
bindings: {
|
||||||
@ -455,7 +313,7 @@ glancesApp.component('glances', {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function GlancesController($interval, GlancesStats, favicoService) {
|
function GlancesController($interval, GlancesStats) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.sorter = {
|
vm.sorter = {
|
||||||
@ -477,6 +335,12 @@ function GlancesController($interval, GlancesStats, favicoService) {
|
|||||||
vm.stats = {};
|
vm.stats = {};
|
||||||
vm.refreshData = function () {
|
vm.refreshData = function () {
|
||||||
GlancesStats.getData().then(function (data) {
|
GlancesStats.getData().then(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';
|
||||||
|
|
||||||
vm.stats = data;
|
vm.stats = data;
|
||||||
vm.is_disconnected = false;
|
vm.is_disconnected = false;
|
||||||
vm.dataLoaded = true;
|
vm.dataLoaded = true;
|
||||||
@ -492,7 +356,6 @@ function GlancesController($interval, GlancesStats, favicoService) {
|
|||||||
}, refreshTime * 1000); // in milliseconds
|
}, refreshTime * 1000); // in milliseconds
|
||||||
|
|
||||||
vm.onKeyDown = function ($event) {
|
vm.onKeyDown = function ($event) {
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case !$event.shiftKey && $event.keyCode == keycodes.a:
|
case !$event.shiftKey && $event.keyCode == keycodes.a:
|
||||||
// a => Sort processes automatically
|
// a => Sort processes automatically
|
||||||
@ -639,11 +502,261 @@ function GlancesController($interval, GlancesStats, favicoService) {
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginCloud', {
|
||||||
|
controller: GlancesPluginCloudController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-cloud/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginCloudController() {
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
vm.provider = null;
|
||||||
|
vm.instance = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['cloud'];
|
||||||
|
|
||||||
|
if (data['ami-id'] !== undefined) {
|
||||||
|
vm.provider = 'AWS EC2';
|
||||||
|
vm.instance = data['instance-type'] + ' instance ' + data['instance-id'] + ' (' + data['region'] + ')';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesHelp', {
|
||||||
|
controller: GlancesHelpController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
help: '<',
|
||||||
|
},
|
||||||
|
templateUrl: 'components/help/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesHelpController() {
|
||||||
|
var vm = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginCpu', {
|
||||||
|
controller: GlancesPluginCpuController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-cpu/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginCpuController() {
|
||||||
|
var vm = this;
|
||||||
|
var _view = {};
|
||||||
|
|
||||||
|
vm.total = null;
|
||||||
|
vm.user = null;
|
||||||
|
vm.system = null;
|
||||||
|
vm.idle = null;
|
||||||
|
vm.nice = null;
|
||||||
|
vm.irq = null;
|
||||||
|
vm.iowait = null;
|
||||||
|
vm.steal = null;
|
||||||
|
vm.ctx_switches = null;
|
||||||
|
vm.interrupts = null;
|
||||||
|
vm.soft_interrupts = null;
|
||||||
|
vm.syscalls = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['cpu'];
|
||||||
|
_view = stats.view['cpu'];
|
||||||
|
|
||||||
|
vm.total = data.total;
|
||||||
|
vm.user = data.user;
|
||||||
|
vm.system = data.system;
|
||||||
|
vm.idle = data.idle;
|
||||||
|
vm.nice = data.nice;
|
||||||
|
vm.irq = data.irq;
|
||||||
|
vm.iowait = data.iowait;
|
||||||
|
vm.steal = data.steal;
|
||||||
|
|
||||||
|
if (data.ctx_switches) {
|
||||||
|
vm.ctx_switches = Math.floor(data.ctx_switches / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.interrupts) {
|
||||||
|
vm.interrupts = Math.floor(data.interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.soft_interrupts) {
|
||||||
|
vm.soft_interrupts = Math.floor(data.soft_interrupts / data.time_since_update);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.syscalls) {
|
||||||
|
vm.syscalls = Math.floor(data.syscalls / data.time_since_update);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getDecoration = function (value) {
|
||||||
|
if (_view[value] === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _view[value].decoration.toLowerCase();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginLoad', {
|
||||||
|
controller: GlancesPluginLoadController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-load/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginLoadController() {
|
||||||
|
var vm = this;
|
||||||
|
var _view = {};
|
||||||
|
|
||||||
|
vm.cpucore = null;
|
||||||
|
vm.min1 = null;
|
||||||
|
vm.min5 = null;
|
||||||
|
vm.min15 = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['load'];
|
||||||
|
_view = stats.view['load'];
|
||||||
|
|
||||||
|
vm.cpucore = data['cpucore'];
|
||||||
|
vm.min1 = data['min1'];
|
||||||
|
vm.min5 = data['min5'];
|
||||||
|
vm.min15 = data['min15'];
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getDecoration = function(value) {
|
||||||
|
if(_view[value] === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _view[value].decoration.toLowerCase();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginSystem', {
|
||||||
|
controller: GlancesPluginSystemController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<',
|
||||||
|
isDisconnected: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-system/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginSystemController() {
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
vm.hostname = null;
|
||||||
|
vm.platform = null;
|
||||||
|
vm.humanReadableName = null;
|
||||||
|
vm.os = {
|
||||||
|
'name': null,
|
||||||
|
'version': null
|
||||||
|
};
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['system'];
|
||||||
|
|
||||||
|
vm.hostname = data['hostname'];
|
||||||
|
vm.platform = data['platform'];
|
||||||
|
vm.os.name = data['os_name'];
|
||||||
|
vm.os.version = data['os_version'];
|
||||||
|
vm.humanReadableName = data['hr_name'];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
glancesApp.component('glancesPluginIp', {
|
||||||
|
controller: GlancesPluginIpController,
|
||||||
|
controllerAs: 'vm',
|
||||||
|
bindings: {
|
||||||
|
stats: '<'
|
||||||
|
},
|
||||||
|
templateUrl: 'components/plugin-ip/view.html'
|
||||||
|
});
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function GlancesPluginIpController() {
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
this.address = null;
|
||||||
|
this.gateway = null;
|
||||||
|
this.mask = null;
|
||||||
|
this.maskCidr = null;
|
||||||
|
this.publicAddress = null;
|
||||||
|
|
||||||
|
vm.$onChanges = function (changes) {
|
||||||
|
var stats = changes.stats.currentValue;
|
||||||
|
if (stats === undefined || stats.stats === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = stats.stats['ip'];
|
||||||
|
|
||||||
|
vm.address = data.address;
|
||||||
|
vm.gateway = data.gateway;
|
||||||
|
vm.mask = data.mask;
|
||||||
|
vm.maskCidr = data.mask_cidr;
|
||||||
|
vm.publicAddress = data.public_address
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
glancesApp.component('glancesPluginUptime', {
|
glancesApp.component('glancesPluginUptime', {
|
||||||
controller: GlancesPluginUptimeController,
|
controller: GlancesPluginUptimeController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
stats: '<',
|
stats: '<'
|
||||||
},
|
},
|
||||||
templateUrl: 'components/plugin-uptime/view.html'
|
templateUrl: 'components/plugin-uptime/view.html'
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
angular.module('glancesApp').run(['$templateCache', function($templateCache) {$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');
|
angular.module('glancesApp').run(['$templateCache', function($templateCache) {$templateCache.put('components/glances/view.html','<div ng-keydown="vm.onKeyDown($event)" tabindex="0">\n <div ng-show="!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 help="vm.help" ng-show="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 stats="vm.stats"></glances-plugin-system>\n </div>\n <div class="pull-left">\n <glances-plugin-ip stats="vm.stats" arguments="vm.arguments"></glances-plugin-ip>\n </div>\n <div class="pull-right">\n <glances-plugin-uptime stats="vm.stats"></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 stats="vm.stats"></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="!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="!arguments.disable_cpu && !arguments.percpu">\n <glances-plugin-cpu stats="vm.stats"></glances-plugin-cpu>\n </div>\n <div class="col-sm-12 col-md-8 col-lg-6" ng-if="!arguments.disable_cpu && arguments.percpu">\n <glances-plugin-per-cpu></glances-plugin-per-cpu>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3"\n ng-if="!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="!arguments.disable_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="!arguments.disable_mem && !(!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="!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="!arguments.disable_load">\n <glances-plugin-load stats="vm.stats"></glances-plugin-load>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">\n <div class="table">\n <glances-plugin-network></glances-plugin-network ng-show="!arguments.disable_network">\n </div>\n </div>\n <div class="col-sm-18">\n\n </div>\n </div>\n </div>\n</div>\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/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-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-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-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.isLinux()" class="hidden-xs hidden-sm">({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})</span>\n <span ng-show="!vm.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/glances/view.html','<div ng-show="!vm.dataLoaded" class="container-fluid" id="loading-page">\n <div class="glances-logo"></div>\n <div class="loader">Loading...</div>\n</div>\n\n<div ng-show="vm.arguments.help_tag" class="container-fluid" ng-include src="\'help.html\'"></div>\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 stats="vm.stats"></glances-plugin-system>\n </div>\n <div class="pull-left">\n <glances-plugin-ip stats="vm.stats" arguments="vm.arguments"></glances-plugin-ip>\n </div>\n <div class="pull-right">\n <glances-plugin-uptime stats="vm.stats"></glances-plugin-uptime>\n </div>\n </div>\n <div class="row" ng-if="statsCloud.getProvider()">\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 class="row">\n <div class="hidden-xs hidden-sm hidden-md col-lg-6" ng-if="!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="!arguments.disable_cpu && !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="!arguments.disable_cpu && arguments.percpu">\n <glances-plugin-per-cpu></glances-plugin-per-cpu>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!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="!arguments.disable_mem">\n <glances-plugin-mem></glances-plugin-mem>\n </div>\n <div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!arguments.disable_mem && !(!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="!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="!arguments.disable_load">\n <glances-plugin-load stats="vm.stats"></glances-plugin-load>\n </div>\n </div>\n <div class="row">\n <div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">\n <div class="table">\n <glances-plugin-network></glances-plugin-network ng-show="!arguments.disable_network">\n </div>\n </div>\n <div class="col-sm-18">\n\n </div>\n </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-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');}]);
|
Loading…
Reference in New Issue
Block a user