-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/glances/outputs/static/js/components/help/component.js b/glances/outputs/static/js/components/help/component.js
new file mode 100644
index 00000000..c91fcd7c
--- /dev/null
+++ b/glances/outputs/static/js/components/help/component.js
@@ -0,0 +1,10 @@
+'use strict';
+
+glancesApp.component('glancesHelp', {
+ controller: GlancesHelpController,
+ controllerAs: 'vm',
+ bindings: {
+ help: '<',
+ },
+ templateUrl: 'components/help/view.html'
+});
diff --git a/glances/outputs/static/js/components/help/controller.js b/glances/outputs/static/js/components/help/controller.js
new file mode 100644
index 00000000..ff346a82
--- /dev/null
+++ b/glances/outputs/static/js/components/help/controller.js
@@ -0,0 +1,5 @@
+'use strict';
+
+function GlancesHelpController() {
+ var vm = this;
+}
diff --git a/glances/outputs/static/js/components/help/view.html b/glances/outputs/static/js/components/help/view.html
new file mode 100644
index 00000000..618935a2
--- /dev/null
+++ b/glances/outputs/static/js/components/help/view.html
@@ -0,0 +1,79 @@
+
+
+
{{vm.help.version}} {{vm.help.psutil_version}}
+
+
+
+
{{vm.help.configuration_file}}
+
+
+
+
{{vm.help.sort_auto}}
+
{{vm.help.sort_network}}
+
+
+
{{vm.help.sort_cpu}}
+
{{vm.help.show_hide_alert}}
+
+
+
{{vm.help.sort_mem}}
+
{{vm.help.percpu}}
+
+
+
{{vm.help.sort_user}}
+
{{vm.help.show_hide_ip}}
+
+
+
{{vm.help.sort_proc}}
+
{{vm.help.enable_disable_docker}}
+
+
+
{{vm.help.sort_io}}
+
{{vm.help.view_network_io_combination}}
+
+
+
{{vm.help.sort_cpu_times}}
+
{{vm.help.view_cumulative_network}}
+
+
+
{{vm.help.show_hide_diskio}}
+
{{vm.help.show_hide_filesytem_freespace}}
+
+
+
{{vm.help.show_hide_filesystem}}
+
{{vm.help.show_hide_vm.help}}
+
+
+
{{vm.help.show_hide_network}}
+
{{vm.help.diskio_iops}}
+
+
+
{{vm.help.show_hide_sensors}}
+
{{vm.help.show_hide_top_menu}}
+
+
+
{{vm.help.show_hide_left_sidebar}}
+
{{vm.help.show_hide_amp}}
+
+
+
{{vm.help.enable_disable_process_stats}}
+
{{vm.help.show_hide_irq}}
+
+
+
{{vm.help.enable_disable_gpu}}
+
{{vm.help.enable_disable_mean_gpu}}
+
+
+
{{vm.help.enable_disable_quick_look}}
+
+
+
+
{{vm.help.enable_disable_short_processname}}
+
+
+
+
{{vm.help.enable_disable_ports}}
+
+
+
+
diff --git a/glances/outputs/static/js/components/plugin-cloud/component.js b/glances/outputs/static/js/components/plugin-cloud/component.js
new file mode 100644
index 00000000..307b1b91
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cloud/component.js
@@ -0,0 +1,10 @@
+'use strict';
+
+glancesApp.component('glancesPluginCloud', {
+ controller: GlancesPluginCloudController,
+ controllerAs: 'vm',
+ bindings: {
+ stats: '<'
+ },
+ templateUrl: 'components/plugin-cloud/view.html'
+});
diff --git a/glances/outputs/static/js/components/plugin-cloud/controller.js b/glances/outputs/static/js/components/plugin-cloud/controller.js
new file mode 100644
index 00000000..5518eb12
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cloud/controller.js
@@ -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'] + ')';
+ }
+ };
+}
diff --git a/glances/outputs/static/js/components/plugin-cloud/view.html b/glances/outputs/static/js/components/plugin-cloud/view.html
new file mode 100644
index 00000000..4a09ef91
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cloud/view.html
@@ -0,0 +1,3 @@
+
+ {{ vm.provider }} {{ vm.instance }}
+
diff --git a/glances/outputs/static/js/components/plugin-cpu/component.js b/glances/outputs/static/js/components/plugin-cpu/component.js
new file mode 100644
index 00000000..b372d413
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cpu/component.js
@@ -0,0 +1,10 @@
+'use strict';
+
+glancesApp.component('glancesPluginCpu', {
+ controller: GlancesPluginCpuController,
+ controllerAs: 'vm',
+ bindings: {
+ stats: '<'
+ },
+ templateUrl: 'components/plugin-cpu/view.html'
+});
diff --git a/glances/outputs/static/js/components/plugin-cpu/controller.js b/glances/outputs/static/js/components/plugin-cpu/controller.js
new file mode 100644
index 00000000..d066a65e
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cpu/controller.js
@@ -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();
+ };
+}
diff --git a/glances/outputs/static/js/components/plugin-cpu/view.html b/glances/outputs/static/js/components/plugin-cpu/view.html
new file mode 100644
index 00000000..750ddbd4
--- /dev/null
+++ b/glances/outputs/static/js/components/plugin-cpu/view.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
CPU
+
{{ vm.total }}%
+
+
+
user:
+
+ {{ vm.user }}%
+
+
+
+
system:
+
+ {{ vm.system }}%
+
+
+
+
idle:
+
{{ vm.idle }}%
+
+
+
+
+
+
+
nice:
+
+ {{ vm.nice }}%
+
+
+
+
irq:
+
+ {{ vm.irq }}%
+
+
+
+
iowait:
+
+ {{ vm.iowait }}%
+
+
+
+
steal:
+
+ {{ vm.steal }}%
+
+
+
+
+
+
+
+
ctx_sw:
+
+ {{ vm.ctx_switches }}
+
+
+
+
inter:
+
+ {{ vm.interrupts }}
+
+
+
+
sw_int:
+
+ {{ vm.soft_interrupts }}
+
+
+
+
syscal:
+
+ {{ vm.syscalls }}
+
+
+
+
+
+
diff --git a/glances/outputs/static/js/components/plugin-ip/component.js b/glances/outputs/static/js/components/plugin-ip/component.js
index 7cc0684f..cb70a6c0 100644
--- a/glances/outputs/static/js/components/plugin-ip/component.js
+++ b/glances/outputs/static/js/components/plugin-ip/component.js
@@ -4,7 +4,7 @@ glancesApp.component('glancesPluginIp', {
controller: GlancesPluginIpController,
controllerAs: 'vm',
bindings: {
- stats: '<',
+ stats: '<'
},
templateUrl: 'components/plugin-ip/view.html'
});
diff --git a/glances/outputs/static/js/components/plugin-load/component.js b/glances/outputs/static/js/components/plugin-load/component.js
index 744b4f36..268bde0c 100644
--- a/glances/outputs/static/js/components/plugin-load/component.js
+++ b/glances/outputs/static/js/components/plugin-load/component.js
@@ -4,7 +4,7 @@ glancesApp.component('glancesPluginLoad', {
controller: GlancesPluginLoadController,
controllerAs: 'vm',
bindings: {
- stats: '<',
+ stats: '<'
},
templateUrl: 'components/plugin-load/view.html'
});
diff --git a/glances/outputs/static/js/components/plugin-load/controller.js b/glances/outputs/static/js/components/plugin-load/controller.js
index 2d8c91cc..4ac09903 100644
--- a/glances/outputs/static/js/components/plugin-load/controller.js
+++ b/glances/outputs/static/js/components/plugin-load/controller.js
@@ -4,10 +4,10 @@ function GlancesPluginLoadController() {
var vm = this;
var _view = {};
- this.cpucore = null;
- this.min1 = null;
- this.min5 = null;
- this.min15 = null;
+ vm.cpucore = null;
+ vm.min1 = null;
+ vm.min5 = null;
+ vm.min15 = null;
vm.$onChanges = function (changes) {
var stats = changes.stats.currentValue;
@@ -25,7 +25,7 @@ function GlancesPluginLoadController() {
};
this.getDecoration = function(value) {
- if(_view[value] == undefined) {
+ if(_view[value] === undefined) {
return;
}
diff --git a/glances/outputs/static/js/components/plugin-system/component.js b/glances/outputs/static/js/components/plugin-system/component.js
index 1826ce8b..6c81d762 100644
--- a/glances/outputs/static/js/components/plugin-system/component.js
+++ b/glances/outputs/static/js/components/plugin-system/component.js
@@ -4,8 +4,8 @@ glancesApp.component('glancesPluginSystem', {
controller: GlancesPluginSystemController,
controllerAs: 'vm',
bindings: {
- stats: '<',
- isDisconnected: '<'
+ stats: '<',
+ isDisconnected: '<'
},
templateUrl: 'components/plugin-system/view.html'
});
diff --git a/glances/outputs/static/js/components/plugin-system/controller.js b/glances/outputs/static/js/components/plugin-system/controller.js
index 2567a02a..1d0bb457 100644
--- a/glances/outputs/static/js/components/plugin-system/controller.js
+++ b/glances/outputs/static/js/components/plugin-system/controller.js
@@ -2,7 +2,6 @@
function GlancesPluginSystemController() {
var vm = this;
- var _pluginName = "system";
vm.hostname = null;
vm.platform = null;
@@ -18,7 +17,7 @@ function GlancesPluginSystemController() {
return;
}
- var data = stats.stats[_pluginName];
+ var data = stats.stats['system'];
vm.hostname = data['hostname'];
vm.platform = data['platform'];
@@ -26,20 +25,4 @@ function GlancesPluginSystemController() {
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';
- };
}
diff --git a/glances/outputs/static/js/components/plugin-system/view.html b/glances/outputs/static/js/components/plugin-system/view.html
index f1866ae6..33f65139 100644
--- a/glances/outputs/static/js/components/plugin-system/view.html
+++ b/glances/outputs/static/js/components/plugin-system/view.html
@@ -1,6 +1,6 @@
Disconnected from
{{ vm.hostname }}
- ({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})
- ({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})
+ ({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})
+ ({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})
diff --git a/glances/outputs/static/js/components/plugin-uptime/component.js b/glances/outputs/static/js/components/plugin-uptime/component.js
index 3859054b..801a90d1 100644
--- a/glances/outputs/static/js/components/plugin-uptime/component.js
+++ b/glances/outputs/static/js/components/plugin-uptime/component.js
@@ -4,7 +4,7 @@ glancesApp.component('glancesPluginUptime', {
controller: GlancesPluginUptimeController,
controllerAs: 'vm',
bindings: {
- stats: '<',
+ stats: '<'
},
templateUrl: 'components/plugin-uptime/view.html'
});
diff --git a/glances/outputs/static/public/help.html b/glances/outputs/static/public/help.html
deleted file mode 100644
index f42a36ed..00000000
--- a/glances/outputs/static/public/help.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
{{help.version}} {{help.psutil_version}}
-
-
-
-
{{help.configuration_file}}
-
-
-
-
{{help.sort_auto}}
-
{{help.sort_network}}
-
-
-
{{help.sort_cpu}}
-
{{help.show_hide_alert}}
-
-
-
{{help.sort_mem}}
-
{{help.percpu}}
-
-
-
{{help.sort_user}}
-
{{help.show_hide_ip}}
-
-
-
{{help.sort_proc}}
-
{{help.enable_disable_docker}}
-
-
-
{{help.sort_io}}
-
{{help.view_network_io_combination}}
-
-
-
{{help.sort_cpu_times}}
-
{{help.view_cumulative_network}}
-
-
-
{{help.show_hide_diskio}}
-
{{help.show_hide_filesytem_freespace}}
-
-
-
{{help.show_hide_filesystem}}
-
{{help.show_hide_help}}
-
-
-
{{help.show_hide_network}}
-
{{help.diskio_iops}}
-
-
-
{{help.show_hide_sensors}}
-
{{help.show_hide_top_menu}}
-
-
-
{{help.show_hide_left_sidebar}}
-
{{help.show_hide_amp}}
-
-
-
{{help.enable_disable_process_stats}}
-
{{help.show_hide_irq}}
-
-
-
{{help.enable_disable_gpu}}
-
{{help.enable_disable_mean_gpu}}
-
-
-
{{help.enable_disable_quick_look}}
-
-
-
-
{{help.enable_disable_short_processname}}
-
-
-
-
{{help.enable_disable_ports}}
-
-
diff --git a/glances/outputs/static/public/index.html b/glances/outputs/static/public/index.html
index eec4fb70..d8bb08a0 100644
--- a/glances/outputs/static/public/index.html
+++ b/glances/outputs/static/public/index.html
@@ -17,7 +17,7 @@
-
+
diff --git a/glances/outputs/static/public/js/main.min.js b/glances/outputs/static/public/js/main.min.js
index c3c0bd1b..81a3f487 100644
--- a/glances/outputs/static/public/js/main.min.js
+++ b/glances/outputs/static/public/js/main.min.js
@@ -300,148 +300,6 @@ var keycodes = {
'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', {
controller: GlancesController,
bindings: {
@@ -455,7 +313,7 @@ glancesApp.component('glances', {
'use strict';
-function GlancesController($interval, GlancesStats, favicoService) {
+function GlancesController($interval, GlancesStats) {
var vm = this;
vm.sorter = {
@@ -477,6 +335,12 @@ function GlancesController($interval, GlancesStats, favicoService) {
vm.stats = {};
vm.refreshData = function () {
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.is_disconnected = false;
vm.dataLoaded = true;
@@ -492,7 +356,6 @@ function GlancesController($interval, GlancesStats, favicoService) {
}, refreshTime * 1000); // in milliseconds
vm.onKeyDown = function ($event) {
-
switch (true) {
case !$event.shiftKey && $event.keyCode == keycodes.a:
// a => Sort processes automatically
@@ -639,11 +502,261 @@ function GlancesController($interval, GlancesStats, favicoService) {
'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', {
controller: GlancesPluginUptimeController,
controllerAs: 'vm',
bindings: {
- stats: '<',
+ stats: '<'
},
templateUrl: 'components/plugin-uptime/view.html'
});
diff --git a/glances/outputs/static/public/js/templates.min.js b/glances/outputs/static/public/js/templates.min.js
index a3748583..a1b2abf3 100644
--- a/glances/outputs/static/public/js/templates.min.js
+++ b/glances/outputs/static/public/js/templates.min.js
@@ -1,5 +1,8 @@
-angular.module('glancesApp').run(['$templateCache', function($templateCache) {$templateCache.put('components/plugin-ip/view.html','
\n - IP {{ vm.address }}/{{ vm.maskCidr }} Pub {{ vm.publicAddress }}\n\n');
+angular.module('glancesApp').run(['$templateCache', function($templateCache) {$templateCache.put('components/glances/view.html','
\n
\n\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n');
+$templateCache.put('components/plugin-cloud/view.html','
\n {{ vm.provider }} {{ vm.instance }}\n\n');
+$templateCache.put('components/help/view.html','
\n
\n
{{vm.help.version}} {{vm.help.psutil_version}}
\n
\n
\n
\n
{{vm.help.configuration_file}}
\n
\n
\n
\n
{{vm.help.sort_auto}}
\n
{{vm.help.sort_network}}
\n
\n
\n
{{vm.help.sort_cpu}}
\n
{{vm.help.show_hide_alert}}
\n
\n
\n
{{vm.help.sort_mem}}
\n
{{vm.help.percpu}}
\n
\n
\n
{{vm.help.sort_user}}
\n
{{vm.help.show_hide_ip}}
\n
\n
\n
{{vm.help.sort_proc}}
\n
{{vm.help.enable_disable_docker}}
\n
\n
\n
{{vm.help.sort_io}}
\n
{{vm.help.view_network_io_combination}}
\n
\n
\n
{{vm.help.sort_cpu_times}}
\n
{{vm.help.view_cumulative_network}}
\n
\n
\n
{{vm.help.show_hide_diskio}}
\n
{{vm.help.show_hide_filesytem_freespace}}
\n
\n
\n
{{vm.help.show_hide_filesystem}}
\n
{{vm.help.show_hide_vm.help}}
\n
\n
\n
{{vm.help.show_hide_network}}
\n
{{vm.help.diskio_iops}}
\n
\n
\n
{{vm.help.show_hide_sensors}}
\n
{{vm.help.show_hide_top_menu}}
\n
\n
\n
{{vm.help.show_hide_left_sidebar}}
\n
{{vm.help.show_hide_amp}}
\n
\n
\n
{{vm.help.enable_disable_process_stats}}
\n
{{vm.help.show_hide_irq}}
\n
\n
\n
{{vm.help.enable_disable_gpu}}
\n
{{vm.help.enable_disable_mean_gpu}}
\n
\n
\n
{{vm.help.enable_disable_quick_look}}
\n
\n
\n
\n
{{vm.help.enable_disable_short_processname}}
\n
\n
\n
\n
{{vm.help.enable_disable_ports}}
\n
\n
\n\n
\n');
+$templateCache.put('components/plugin-cpu/view.html','
\n \n
\n
\n
\n
CPU
\n
{{ vm.total }}%
\n
\n
\n
user:
\n
\n {{ vm.user }}%\n
\n
\n
\n
system:
\n
\n {{ vm.system }}%\n
\n
\n
\n
idle:
\n
{{ vm.idle }}%
\n
\n
\n
\n
\n
\n
\n
nice:
\n
\n {{ vm.nice }}%\n
\n
\n
\n
irq:
\n
\n {{ vm.irq }}%\n
\n
\n
\n
iowait:
\n
\n {{ vm.iowait }}%\n
\n
\n
\n
steal:
\n
\n {{ vm.steal }}%\n
\n
\n
\n
\n
\n
\n
\n
ctx_sw:
\n
\n {{ vm.ctx_switches }}\n
\n
\n
\n
inter:
\n
\n {{ vm.interrupts }}\n
\n
\n
\n
sw_int:
\n
\n {{ vm.soft_interrupts }}\n
\n
\n
\n
syscal:
\n
\n {{ vm.syscalls }}\n
\n
\n
\n
\n
\n\n');
$templateCache.put('components/plugin-load/view.html','
\n \n
\n
LOAD
\n
{{ vm.cpucore }}-core
\n
\n
\n
1 min:
\n
\n {{ vm.min1 | number : 2}}\n
\n
\n
\n
5 min:
\n
\n {{ vm.min5 | number : 2}}\n
\n
\n
\n
15 min:
\n
\n {{ vm.min15 | number : 2}}\n
\n
\n
\n\n');
-$templateCache.put('components/plugin-system/view.html','
\n Disconnected from\n {{ vm.hostname }}\n ({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})\n ({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})\n\n');
-$templateCache.put('components/glances/view.html','
\n\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n');
+$templateCache.put('components/plugin-system/view.html','
\n Disconnected from\n {{ vm.hostname }}\n ({{ vm.humanReadableName }} / {{ vm.os.name }} {{ vm.os.version }})\n ({{ vm.os.name }} {{ vm.os.version }} {{ vm.platform }})\n\n');
+$templateCache.put('components/plugin-ip/view.html','
\n - IP {{ vm.address }}/{{ vm.maskCidr }} Pub {{ vm.publicAddress }}\n\n');
$templateCache.put('components/plugin-uptime/view.html','
\n Uptime: {{ vm.value }}\n\n');}]);
\ No newline at end of file