mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-22 08:41:32 +03:00
Re-implements missing plugins
This commit is contained in:
parent
17adb57ace
commit
db2534b25c
@ -9,6 +9,7 @@ function GlancesController($scope, $rootScope, $timeout, GlancesStats, REFRESH_T
|
||||
GlancesStats.getData().then(function (data) {
|
||||
$rootScope.title = data.stats.system.hostname + ' - Glances';
|
||||
$scope.$broadcast('data_refreshed', data);
|
||||
vm.hasGpu = data.stats.gpu.length > 0;
|
||||
vm.dataLoaded = true;
|
||||
|
||||
nextLoad();
|
||||
|
@ -40,14 +40,14 @@
|
||||
<div class="col-sm-12 col-md-8 col-lg-6" ng-if="!vm.arguments.disable_cpu && vm.arguments.percpu">
|
||||
<glances-plugin-percpu></glances-plugin-percpu>
|
||||
</div>
|
||||
<div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!vm.arguments.disable_gpu && statsGpu.gpus.length > 0">
|
||||
<div class="hidden-xs hidden-sm col-md-4 col-lg-3" ng-if="!vm.arguments.disable_gpu && vm.hasGpu">
|
||||
<glances-plugin-gpu></glances-plugin-gpu>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.argumentsdisable_mem">
|
||||
<glances-plugin-mem></glances-plugin-mem>
|
||||
</div>
|
||||
<div class="hidden-xs hidden-sm col-md-4 col-lg-3"
|
||||
ng-if="!vm.arguments.disable_mem && !(!vm.arguments.disable_gpu && statsGpu.gpus.length > 0)">
|
||||
ng-if="!vm.arguments.disable_mem && !(!vm.arguments.disable_gpu && vm.hasGpu)">
|
||||
<glances-plugin-mem-more></glances-plugin-mem-more>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4 col-lg-3" ng-if="!vm.arguments.disable_memswap">
|
||||
@ -65,10 +65,10 @@
|
||||
<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" ng-if="!vm.arguments.disable_diskio"></glances-plugin-diskio>
|
||||
<glances-plugin-fs id="plugin-fs" class="plugin table-row-group" ng-if="!vm.arguments.disable_fs"></glances-plugin-fs>
|
||||
<glances-plugin-irq ng-if="vm.arguments.enable_irq"></glances-plugin-irq>
|
||||
<glances-plugin-folders ng-if="!vm.arguments.disable_fs"></glances-plugin-folders>
|
||||
<glances-plugin-raid></glances-plugin-raid>
|
||||
<glances-plugin-sensors ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>
|
||||
<glances-plugin-irq id="plugin-irq" ng-if="vm.arguments.enable_irq"></glances-plugin-irq>
|
||||
<glances-plugin-folders id="plugin-folders" ng-if="!vm.arguments.disable_folders"></glances-plugin-folders>
|
||||
<glances-plugin-raid id="plugin-raid" ng-if="!vm.arguments.raid"></glances-plugin-raid>
|
||||
<glances-plugin-sensors id="plugin-sensors" ng-if="!vm.arguments.disable_sensors"></glances-plugin-sensors>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-18">
|
||||
|
@ -19,7 +19,7 @@ function GlancesPluginCpuController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['cpu'];
|
||||
_view = data.view['cpu'];
|
||||
_view = data.views['cpu'];
|
||||
|
||||
vm.total = stats.total;
|
||||
vm.user = stats.user;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="table-row" ng-show="vm.disks.length > 0">
|
||||
<div class="table-row" ng-if="vm.disks.length > 0">
|
||||
<div class="table-cell text-left title">DISK I/O</div>
|
||||
<div class="table-cell" ng-show="!vm.arguments.diskio_iops">R/s</div>
|
||||
<div class="table-cell" ng-show="!vm.arguments.diskio_iops">W/s</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<section id="containers" class="plugin" ng-show="vm.containers.length">
|
||||
<section id="containers" class="plugin" ng-if="vm.containers.length">
|
||||
<span class="title">CONTAINERS</span> {{ vm.containers.length }} (served by Docker {{ vm.version }})
|
||||
|
||||
<div class="table">
|
||||
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginFolders', {
|
||||
controller: GlancesPluginFsController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-folders/view.html'
|
||||
});
|
@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginFoldersController($scope) {
|
||||
var vm = this;
|
||||
vm.folders = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['folders'];
|
||||
vm.folders = [];
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var folderData = stats[i];
|
||||
|
||||
var folder = {
|
||||
'path': folderData['path'],
|
||||
'size': folderData['size'],
|
||||
'careful': folderData['careful'],
|
||||
'warning': folderData['warning'],
|
||||
'critical': folderData['critical']
|
||||
};
|
||||
|
||||
vm.folders.push(folder);
|
||||
}
|
||||
});
|
||||
|
||||
vm.getDecoration = function(folder) {
|
||||
|
||||
if (!Number.isInteger(folder.size)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (folder.critical !== null && folder.size > (folder.critical * 1000000)) {
|
||||
return 'critical';
|
||||
} else if (folder.warning !== null && folder.size > (folder.warning * 1000000)) {
|
||||
return 'warning';
|
||||
} else if (folder.careful !== null && folder.size > (folder.careful * 1000000)) {
|
||||
return 'careful';
|
||||
}
|
||||
|
||||
return 'ok';
|
||||
};
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<div class="table-row" ng-if="vm.folders.length > 0">
|
||||
<div class="table-cell text-left title">FOLDERS</div>
|
||||
<div class="table-cell">Size</div>
|
||||
</div>
|
||||
<div class="table-row" ng-repeat="folder in vm.folders">
|
||||
<div class="table-cell text-left">{{ folder.path }}</div>
|
||||
<div class="table-cell" ng-class="vm.getDecoration(folder)">{{ folder.size | bytes }}</div>
|
||||
</div>
|
@ -9,7 +9,7 @@ function GlancesPluginFsController($scope, $filter, ARGUMENTS) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['fs'];
|
||||
_view = data.view['fs'];
|
||||
_view = data.views['fs'];
|
||||
|
||||
vm.fileSystems = [];
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginGpu', {
|
||||
controller: GlancesPluginGpuController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-gpu/view.html'
|
||||
});
|
@ -0,0 +1,59 @@
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginGpuController($scope, ARGUMENTS) {
|
||||
var vm = this;
|
||||
vm.arguments = ARGUMENTS;
|
||||
var _view = {};
|
||||
vm.gpus = [];
|
||||
vm.name = "GPU";
|
||||
vm.mean = {};
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['gpu'];
|
||||
_view = data.views['gpu'];
|
||||
|
||||
if (stats.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
vm.gpus = [];
|
||||
vm.name = "GPU";
|
||||
vm.mean = {
|
||||
proc: null,
|
||||
mem: null
|
||||
};
|
||||
var sameName = true;
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var gpuData = stats[i];
|
||||
|
||||
var gpu = gpuData;
|
||||
|
||||
vm.mean.proc += gpu.proc;
|
||||
vm.mean.mem += gpu.mem;
|
||||
|
||||
vm.gpus.push(gpu);
|
||||
}
|
||||
|
||||
if (stats.length === 1 ) {
|
||||
vm.name = stats[0].name;
|
||||
} else if (sameName) {
|
||||
vm.name = stats.length + ' GPU ' + stats[0].name;
|
||||
}
|
||||
|
||||
vm.mean.proc = vm.mean.proc / stats.length;
|
||||
vm.mean.mem = vm.mean.mem / stats.length;
|
||||
});
|
||||
|
||||
vm.getDecoration = function(gpuId, value) {
|
||||
if(_view[gpuId][value] == undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
return _view[gpuId][value].decoration.toLowerCase();
|
||||
};
|
||||
|
||||
vm.getMeanDecoration = function(value) {
|
||||
return vm.getDecoration(0, value);
|
||||
};
|
||||
}
|
27
glances/outputs/static/js/components/plugin-gpu/view.html
Normal file
27
glances/outputs/static/js/components/plugin-gpu/view.html
Normal file
@ -0,0 +1,27 @@
|
||||
<section id="gpu" class="plugin">
|
||||
<div class="gpu-name title">
|
||||
{{ vm.name }}
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="table-row" ng-if="arguments.meangpu || vm.gpus.length === 1">
|
||||
<div class="table-cell text-left">proc:</div>
|
||||
<div class="table-cell" ng-class="vm.getMeanDecoration('proc')" ng-if="vm.mean.proc">{{ vm.mean.proc | number : 0 }}%</div>
|
||||
<div class="table-cell" ng-if="!vm.mean.proc">N/A</div>
|
||||
</div>
|
||||
<div class="table-row" ng-if="arguments.meangpu || vm.gpus.length === 1">
|
||||
<div class="table-cell text-left">mem:</div>
|
||||
<div class="table-cell" ng-class="vm.getMeanDecoration('mem')" ng-if="vm.mean.mem">{{ vm.mean.mem | number : 0 }}%</div>
|
||||
<div class="table-cell" ng-if="!vm.mean.mem">N/A</div>
|
||||
</div>
|
||||
<div class="table-row" ng-if="!arguments.meangpu && vm.gpus.length > 1" ng-repeat="gpu in vm.gpus">
|
||||
<div class="table-cell text-left">
|
||||
{{ gpu.gpu_id }}:
|
||||
<span ng-class="vm.getDecoration(gpu.gpu_id, 'proc')" ng-if="gpu.proc">{{ gpu.proc | number : 0 }}%</span>
|
||||
<span ng-if="!gpu.proc">N/A</span>
|
||||
mem:
|
||||
<span ng-class="vm.getDecoration(gpu.gpu_id, 'mem')" ng-if="gpu.mem">{{ gpu.mem | number : 0 }}%</span>
|
||||
<span ng-if="!gpu.mem">N/A</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginIrq', {
|
||||
controller: GlancesPluginIrqController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-irq/view.html'
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginIrqController($scope) {
|
||||
var vm = this;
|
||||
vm.irqs = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['irq'];
|
||||
vm.irqs = [];
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var IrqData = stats[i];
|
||||
|
||||
var irq = {
|
||||
'irq_line': IrqData['irq_line'],
|
||||
'irq_rate': IrqData['irq_rate']
|
||||
};
|
||||
|
||||
vm.irqs.push(irq);
|
||||
}
|
||||
});
|
||||
}
|
10
glances/outputs/static/js/components/plugin-irq/view.html
Normal file
10
glances/outputs/static/js/components/plugin-irq/view.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div class="table-row" ng-if="vm.irqs.length > 0">
|
||||
<div class="table-cell text-left title">IRQ</div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell">Rate/s</div>
|
||||
</div>
|
||||
<div class="table-row" ng-repeat="irq in vm.irqs">
|
||||
<div class="table-cell text-left">{{irq.irq_line}}</div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell"><span>{{irq.irq_rate}}</span></div>
|
||||
</div>
|
@ -11,7 +11,7 @@ function GlancesPluginLoadController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['load'];
|
||||
_view = data.view['load'];
|
||||
_view = data.views['load'];
|
||||
|
||||
vm.cpucore = stats['cpucore'];
|
||||
vm.min1 = stats['min1'];
|
||||
|
@ -11,7 +11,7 @@ function GlancesPluginMemController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['mem'];
|
||||
_view = data.view['mem'];
|
||||
_view = data.views['mem'];
|
||||
|
||||
vm.percent = stats['percent'];
|
||||
vm.total = stats['total'];
|
||||
|
@ -11,7 +11,7 @@ function GlancesPluginMemswapController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['memswap'];
|
||||
_view = data.view['memswap'];
|
||||
_view = data.views['memswap'];
|
||||
|
||||
vm.percent = stats['percent'];
|
||||
vm.total = stats['total'];
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div ng-show="!vm.arguments.disable_process">
|
||||
<div ng-if="!vm.arguments.disable_process">
|
||||
<glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>
|
||||
<div class="row" ng-if="!vm.arguments.disable_amps">
|
||||
<div class="col-lg-18">
|
||||
@ -7,4 +7,4 @@
|
||||
</div>
|
||||
<glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>
|
||||
</div>
|
||||
<div ng-show="vm.arguments.disable_process">PROCESSES DISABLED (press 'z' to display)</div>
|
||||
<div ng-if="vm.arguments.disable_process">PROCESSES DISABLED (press 'z' to display)</div>
|
||||
|
@ -15,7 +15,7 @@ function GlancesPluginQuicklookController($scope, ARGUMENTS) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['quicklook'];
|
||||
_view = data.view['quicklook'];
|
||||
_view = data.views['quicklook'];
|
||||
|
||||
vm.mem = stats.mem;
|
||||
vm.cpu = stats.cpu;
|
||||
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginRaid', {
|
||||
controller: GlancesPluginRaidController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-raid/view.html'
|
||||
});
|
@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginRaidController($scope) {
|
||||
var vm = this;
|
||||
vm.disks = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var disks = [];
|
||||
var stats = data.stats['raid'];
|
||||
|
||||
_.forIn(stats, function(diskData, diskKey) {
|
||||
var disk = {
|
||||
'name': diskKey,
|
||||
'type': diskData.type == null ? 'UNKNOWN' : diskData.type,
|
||||
'used': diskData.used,
|
||||
'available': diskData.available,
|
||||
'status': diskData.status,
|
||||
'degraded': diskData.used < diskData.available,
|
||||
'config': diskData.config == null ? '' : diskData.config.replace('_', 'A'),
|
||||
'inactive': diskData.status == 'inactive',
|
||||
'components': []
|
||||
};
|
||||
|
||||
_.forEach(diskData.components, function(number, name) {
|
||||
disk.components.push({
|
||||
'number': number,
|
||||
'name': name
|
||||
});
|
||||
});
|
||||
|
||||
disks.push(disk);
|
||||
});
|
||||
|
||||
vm.disks = disks;
|
||||
});
|
||||
|
||||
vm.hasDisks = function() {
|
||||
return this.disks.length > 0;
|
||||
}
|
||||
|
||||
vm.getAlert = function(disk) {
|
||||
if (disk.inactive) {
|
||||
return 'critical';
|
||||
}
|
||||
|
||||
if (disk.degraded) {
|
||||
return 'warning';
|
||||
}
|
||||
|
||||
return 'ok'
|
||||
}
|
||||
}
|
19
glances/outputs/static/js/components/plugin-raid/view.html
Normal file
19
glances/outputs/static/js/components/plugin-raid/view.html
Normal file
@ -0,0 +1,19 @@
|
||||
<div class="table-row" ng-if="vm.hasDisks()">
|
||||
<div class="table-cell text-left title">RAID disks</div>
|
||||
<div class="table-cell">Used</div>
|
||||
<div class="table-cell">Total</div>
|
||||
</div>
|
||||
<div class="table-row" ng-repeat="disk in vm.disks | orderBy: 'name'">
|
||||
<div class="table-cell text-left">
|
||||
{{ disk.type | uppercase }} {{ disk.name }}
|
||||
<div class="warning" ng-show="disk.degraded">└─ Degraded mode</div>
|
||||
<div ng-show="disk.degraded"> └─ {{ disk.config }}</div>
|
||||
|
||||
<div class="critical" ng-show="disk.inactive">└─ Status {{ disk.status }}</div>
|
||||
<div ng-show="disk.inactive" ng-repeat="component in disk.components | orderBy: 'number'">
|
||||
{{ $last ? '└─' : '├─' }} disk {{ component.number }}: {{ component.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-cell" ng-show="!disk.inactive" ng-class="vm.getAlert(disk)">{{ disk.used }}</div>
|
||||
<div class="table-cell" ng-show="!disk.inactive" ng-class="vm.getAlert(disk)">{{ disk.available }}</div>
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginSensors', {
|
||||
controller: GlancesPluginSensorsController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-sensors/view.html'
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginSensorsController($scope, GlancesPluginHelper) {
|
||||
var vm = this;
|
||||
vm.sensors = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['sensors'];
|
||||
|
||||
_.remove(stats, function(sensor) {
|
||||
return (_.isArray(sensor.value) && _.isEmpty(sensor.value)) || sensor.value === 0;
|
||||
});
|
||||
|
||||
vm.sensors = data;
|
||||
});
|
||||
|
||||
this.getAlert = function(sensor) {
|
||||
var current = sensor.type == 'battery' ? 100 - sensor.value : sensor.value;
|
||||
|
||||
return GlancesPluginHelper.getAlert('sensors', 'sensors_' + sensor.type + '_', current);
|
||||
};
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<div class="table-row" ng-if="vm.sensors.length > 0">
|
||||
<div class="table-cell text-left title">SENSORS</div>
|
||||
</div>
|
||||
|
||||
<div class="table-row" ng-repeat="sensor in vm.sensors">
|
||||
<div class="table-cell text-left">{{ sensor.label }}</div>
|
||||
<div class="table-cell">{{ sensor.unit }}</div>
|
||||
<div class="table-cell" ng-class="vm.getAlert(sensor)">{{ sensor.value }}</div>
|
||||
</div>
|
@ -8,7 +8,7 @@ function GlancesPluginWifiController($scope, $filter) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['wifi'];
|
||||
_view = data.view['wifi'];
|
||||
_view = data.views['wifi'];
|
||||
|
||||
vm.hotspots = [];
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
|
@ -7,7 +7,7 @@ glancesApp.service('GlancesStats', function($http, $q, GlancesPluginHelper, CONF
|
||||
]).then(function(results) {
|
||||
return {
|
||||
'stats': results[0],
|
||||
'view': results[1],
|
||||
'views': results[1],
|
||||
'isBsd': results[0]['system']['os_name'] === 'FreeBSD',
|
||||
'isLinux': results[0]['system']['os_name'] === 'Linux',
|
||||
'isMac': results[0]['system']['os_name'] === 'Darwin',
|
||||
|
259
glances/outputs/static/public/js/main.min.js
vendored
259
glances/outputs/static/public/js/main.min.js
vendored
@ -229,7 +229,7 @@ glancesApp.service('GlancesStats', ["$http", "$q", "GlancesPluginHelper", "CONFI
|
||||
]).then(function(results) {
|
||||
return {
|
||||
'stats': results[0],
|
||||
'view': results[1],
|
||||
'views': results[1],
|
||||
'isBsd': results[0]['system']['os_name'] === 'FreeBSD',
|
||||
'isLinux': results[0]['system']['os_name'] === 'Linux',
|
||||
'isMac': results[0]['system']['os_name'] === 'Darwin',
|
||||
@ -288,6 +288,7 @@ function GlancesController($scope, $rootScope, $timeout, GlancesStats, REFRESH_T
|
||||
GlancesStats.getData().then(function (data) {
|
||||
$rootScope.title = data.stats.system.hostname + ' - Glances';
|
||||
$scope.$broadcast('data_refreshed', data);
|
||||
vm.hasGpu = data.stats.gpu.length > 0;
|
||||
vm.dataLoaded = true;
|
||||
|
||||
nextLoad();
|
||||
@ -707,7 +708,7 @@ function GlancesPluginCpuController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['cpu'];
|
||||
_view = data.view['cpu'];
|
||||
_view = data.views['cpu'];
|
||||
|
||||
vm.total = stats.total;
|
||||
vm.user = stats.user;
|
||||
@ -836,6 +837,57 @@ function GlancesPluginDockerController($scope) {
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginFolders', {
|
||||
controller: GlancesPluginFsController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-folders/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginFoldersController($scope) {
|
||||
var vm = this;
|
||||
vm.folders = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['folders'];
|
||||
vm.folders = [];
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var folderData = stats[i];
|
||||
|
||||
var folder = {
|
||||
'path': folderData['path'],
|
||||
'size': folderData['size'],
|
||||
'careful': folderData['careful'],
|
||||
'warning': folderData['warning'],
|
||||
'critical': folderData['critical']
|
||||
};
|
||||
|
||||
vm.folders.push(folder);
|
||||
}
|
||||
});
|
||||
|
||||
vm.getDecoration = function(folder) {
|
||||
|
||||
if (!Number.isInteger(folder.size)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (folder.critical !== null && folder.size > (folder.critical * 1000000)) {
|
||||
return 'critical';
|
||||
} else if (folder.warning !== null && folder.size > (folder.warning * 1000000)) {
|
||||
return 'warning';
|
||||
} else if (folder.careful !== null && folder.size > (folder.careful * 1000000)) {
|
||||
return 'careful';
|
||||
}
|
||||
|
||||
return 'ok';
|
||||
};
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginFs', {
|
||||
controller: GlancesPluginFsController,
|
||||
controllerAs: 'vm',
|
||||
@ -853,7 +905,7 @@ function GlancesPluginFsController($scope, $filter, ARGUMENTS) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['fs'];
|
||||
_view = data.view['fs'];
|
||||
_view = data.views['fs'];
|
||||
|
||||
vm.fileSystems = [];
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
@ -889,6 +941,74 @@ function GlancesPluginFsController($scope, $filter, ARGUMENTS) {
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginGpu', {
|
||||
controller: GlancesPluginGpuController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-gpu/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginGpuController($scope, ARGUMENTS) {
|
||||
var vm = this;
|
||||
vm.arguments = ARGUMENTS;
|
||||
var _view = {};
|
||||
vm.gpus = [];
|
||||
vm.name = "GPU";
|
||||
vm.mean = {};
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['gpu'];
|
||||
_view = data.views['gpu'];
|
||||
|
||||
if (stats.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
vm.gpus = [];
|
||||
vm.name = "GPU";
|
||||
vm.mean = {
|
||||
proc: null,
|
||||
mem: null
|
||||
};
|
||||
var sameName = true;
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var gpuData = stats[i];
|
||||
|
||||
var gpu = gpuData;
|
||||
|
||||
vm.mean.proc += gpu.proc;
|
||||
vm.mean.mem += gpu.mem;
|
||||
|
||||
vm.gpus.push(gpu);
|
||||
}
|
||||
|
||||
if (stats.length === 1 ) {
|
||||
vm.name = stats[0].name;
|
||||
} else if (sameName) {
|
||||
vm.name = stats.length + ' GPU ' + stats[0].name;
|
||||
}
|
||||
|
||||
vm.mean.proc = vm.mean.proc / stats.length;
|
||||
vm.mean.mem = vm.mean.mem / stats.length;
|
||||
});
|
||||
|
||||
vm.getDecoration = function(gpuId, value) {
|
||||
if(_view[gpuId][value] == undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
return _view[gpuId][value].decoration.toLowerCase();
|
||||
};
|
||||
|
||||
vm.getMeanDecoration = function(value) {
|
||||
return vm.getDecoration(0, value);
|
||||
};
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginIp', {
|
||||
controller: GlancesPluginIpController,
|
||||
controllerAs: 'vm',
|
||||
@ -920,6 +1040,37 @@ function GlancesPluginIpController($scope, ARGUMENTS) {
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginIrq', {
|
||||
controller: GlancesPluginIrqController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-irq/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginIrqController($scope) {
|
||||
var vm = this;
|
||||
vm.irqs = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['irq'];
|
||||
vm.irqs = [];
|
||||
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
var IrqData = stats[i];
|
||||
|
||||
var irq = {
|
||||
'irq_line': IrqData['irq_line'],
|
||||
'irq_rate': IrqData['irq_rate']
|
||||
};
|
||||
|
||||
vm.irqs.push(irq);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginLoad', {
|
||||
controller: GlancesPluginLoadController,
|
||||
controllerAs: 'vm',
|
||||
@ -939,7 +1090,7 @@ function GlancesPluginLoadController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['load'];
|
||||
_view = data.view['load'];
|
||||
_view = data.views['load'];
|
||||
|
||||
vm.cpucore = stats['cpucore'];
|
||||
vm.min1 = stats['min1'];
|
||||
@ -977,7 +1128,7 @@ function GlancesPluginMemController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['mem'];
|
||||
_view = data.view['mem'];
|
||||
_view = data.views['mem'];
|
||||
|
||||
vm.percent = stats['percent'];
|
||||
vm.total = stats['total'];
|
||||
@ -1043,7 +1194,7 @@ function GlancesPluginMemswapController($scope) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['memswap'];
|
||||
_view = data.view['memswap'];
|
||||
_view = data.views['memswap'];
|
||||
|
||||
vm.percent = stats['percent'];
|
||||
vm.total = stats['total'];
|
||||
@ -1415,7 +1566,7 @@ function GlancesPluginQuicklookController($scope, ARGUMENTS) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['quicklook'];
|
||||
_view = data.view['quicklook'];
|
||||
_view = data.views['quicklook'];
|
||||
|
||||
vm.mem = stats.mem;
|
||||
vm.cpu = stats.cpu;
|
||||
@ -1444,6 +1595,98 @@ function GlancesPluginQuicklookController($scope, ARGUMENTS) {
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginRaid', {
|
||||
controller: GlancesPluginRaidController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-raid/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginRaidController($scope) {
|
||||
var vm = this;
|
||||
vm.disks = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var disks = [];
|
||||
var stats = data.stats['raid'];
|
||||
|
||||
_.forIn(stats, function(diskData, diskKey) {
|
||||
var disk = {
|
||||
'name': diskKey,
|
||||
'type': diskData.type == null ? 'UNKNOWN' : diskData.type,
|
||||
'used': diskData.used,
|
||||
'available': diskData.available,
|
||||
'status': diskData.status,
|
||||
'degraded': diskData.used < diskData.available,
|
||||
'config': diskData.config == null ? '' : diskData.config.replace('_', 'A'),
|
||||
'inactive': diskData.status == 'inactive',
|
||||
'components': []
|
||||
};
|
||||
|
||||
_.forEach(diskData.components, function(number, name) {
|
||||
disk.components.push({
|
||||
'number': number,
|
||||
'name': name
|
||||
});
|
||||
});
|
||||
|
||||
disks.push(disk);
|
||||
});
|
||||
|
||||
vm.disks = disks;
|
||||
});
|
||||
|
||||
vm.hasDisks = function() {
|
||||
return this.disks.length > 0;
|
||||
}
|
||||
|
||||
vm.getAlert = function(disk) {
|
||||
if (disk.inactive) {
|
||||
return 'critical';
|
||||
}
|
||||
|
||||
if (disk.degraded) {
|
||||
return 'warning';
|
||||
}
|
||||
|
||||
return 'ok'
|
||||
}
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginSensors', {
|
||||
controller: GlancesPluginSensorsController,
|
||||
controllerAs: 'vm',
|
||||
templateUrl: 'components/plugin-sensors/view.html'
|
||||
});
|
||||
|
||||
'use strict';
|
||||
|
||||
function GlancesPluginSensorsController($scope, GlancesPluginHelper) {
|
||||
var vm = this;
|
||||
vm.sensors = [];
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['sensors'];
|
||||
|
||||
_.remove(stats, function(sensor) {
|
||||
return (_.isArray(sensor.value) && _.isEmpty(sensor.value)) || sensor.value === 0;
|
||||
});
|
||||
|
||||
vm.sensors = data;
|
||||
});
|
||||
|
||||
this.getAlert = function(sensor) {
|
||||
var current = sensor.type == 'battery' ? 100 - sensor.value : sensor.value;
|
||||
|
||||
return GlancesPluginHelper.getAlert('sensors', 'sensors_' + sensor.type + '_', current);
|
||||
};
|
||||
}
|
||||
|
||||
'use strict';
|
||||
|
||||
glancesApp.component('glancesPluginSystem', {
|
||||
controller: GlancesPluginSystemController,
|
||||
controllerAs: 'vm',
|
||||
@ -1516,7 +1759,7 @@ function GlancesPluginWifiController($scope, $filter) {
|
||||
|
||||
$scope.$on('data_refreshed', function(event, data) {
|
||||
var stats = data.stats['wifi'];
|
||||
_view = data.view['wifi'];
|
||||
_view = data.views['wifi'];
|
||||
|
||||
vm.hotspots = [];
|
||||
for (var i = 0; i < stats.length; i++) {
|
||||
|
@ -1,13 +1,16 @@
|
||||
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');
|
||||
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 && vm.hasGpu">\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 && vm.hasGpu)">\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 id="plugin-irq" ng-if="vm.arguments.enable_irq"></glances-plugin-irq>\n <glances-plugin-folders id="plugin-folders" ng-if="!vm.arguments.disable_folders"></glances-plugin-folders>\n <glances-plugin-raid id="plugin-raid" ng-if="!vm.arguments.raid"></glances-plugin-raid>\n <glances-plugin-sensors id="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/plugin-alert/view.html','<section id="amps" class="plugin">\n <div class="table">\n <div class="table-row" ng-repeat="process in vm.processes">\n <div class="table-cell text-left" ng-class="vm.getDescriptionDecoration(process)">{{ process.name }}</div>\n <div class="table-cell text-left">{{ process.count }}</div>\n <div class="table-cell text-left process-result">{{ process.result }}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-amps/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-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" ng-show="vm.nice != undefined">\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-docker/view.html','<section id="containers" class="plugin" ng-show="vm.containers.length">\n <span class="title">CONTAINERS</span> {{ vm.containers.length }} (served by Docker {{ vm.version }})\n\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">Name</div>\n <div class="table-cell">Status</div>\n <div class="table-cell">CPU%</div>\n <div class="table-cell">MEM</div>\n <div class="table-cell">IOR/s</div>\n <div class="table-cell">IOW/s</div>\n <div class="table-cell">RX/s</div>\n <div class="table-cell">TX/s</div>\n <div class="table-cell text-left">Command</div>\n </div>\n <div class="table-row" ng-repeat="container in vm.containers">\n <div class="table-cell text-left">{{ container.name }}</div>\n <div class="table-cell" ng-class="container.status == \'Paused\' ? \'careful\' : \'ok\'">{{ container.status }}</div>\n <div class="table-cell">{{ container.cpu | number:1 }}</div>\n <div class="table-cell">{{ container.memory | bytes }}</div>\n <div class="table-cell">{{ container.ior / container.io_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.iow / container.io_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.rx / container.net_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.tx / container.net_time_since_update | bits }}</div>\n <div class="table-cell text-left">{{ container.command }}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-diskio/view.html','<div class="table-row" ng-if="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-docker/view.html','<section id="containers" class="plugin" ng-if="vm.containers.length">\n <span class="title">CONTAINERS</span> {{ vm.containers.length }} (served by Docker {{ vm.version }})\n\n <div class="table">\n <div class="table-row">\n <div class="table-cell text-left">Name</div>\n <div class="table-cell">Status</div>\n <div class="table-cell">CPU%</div>\n <div class="table-cell">MEM</div>\n <div class="table-cell">IOR/s</div>\n <div class="table-cell">IOW/s</div>\n <div class="table-cell">RX/s</div>\n <div class="table-cell">TX/s</div>\n <div class="table-cell text-left">Command</div>\n </div>\n <div class="table-row" ng-repeat="container in vm.containers">\n <div class="table-cell text-left">{{ container.name }}</div>\n <div class="table-cell" ng-class="container.status == \'Paused\' ? \'careful\' : \'ok\'">{{ container.status }}</div>\n <div class="table-cell">{{ container.cpu | number:1 }}</div>\n <div class="table-cell">{{ container.memory | bytes }}</div>\n <div class="table-cell">{{ container.ior / container.io_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.iow / container.io_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.rx / container.net_time_since_update | bits }}</div>\n <div class="table-cell">{{ container.tx / container.net_time_since_update | bits }}</div>\n <div class="table-cell text-left">{{ container.command }}</div>\n </div>\n </div>\n</section>\n');
|
||||
$templateCache.put('components/plugin-folders/view.html','<div class="table-row" ng-if="vm.folders.length > 0">\n <div class="table-cell text-left title">FOLDERS</div>\n <div class="table-cell">Size</div>\n</div>\n<div class="table-row" ng-repeat="folder in vm.folders">\n <div class="table-cell text-left">{{ folder.path }}</div>\n <div class="table-cell" ng-class="vm.getDecoration(folder)">{{ folder.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-gpu/view.html','<section id="gpu" class="plugin">\n <div class="gpu-name title">\n {{ vm.name }}\n </div>\n <div class="table">\n <div class="table-row" ng-if="arguments.meangpu || vm.gpus.length === 1">\n <div class="table-cell text-left">proc:</div>\n <div class="table-cell" ng-class="vm.getMeanDecoration(\'proc\')" ng-if="vm.mean.proc">{{ vm.mean.proc | number : 0 }}%</div>\n <div class="table-cell" ng-if="!vm.mean.proc">N/A</div>\n </div>\n <div class="table-row" ng-if="arguments.meangpu || vm.gpus.length === 1">\n <div class="table-cell text-left">mem:</div>\n <div class="table-cell" ng-class="vm.getMeanDecoration(\'mem\')" ng-if="vm.mean.mem">{{ vm.mean.mem | number : 0 }}%</div>\n <div class="table-cell" ng-if="!vm.mean.mem">N/A</div>\n </div>\n <div class="table-row" ng-if="!arguments.meangpu && vm.gpus.length > 1" ng-repeat="gpu in vm.gpus">\n <div class="table-cell text-left">\n {{ gpu.gpu_id }}:\n <span ng-class="vm.getDecoration(gpu.gpu_id, \'proc\')" ng-if="gpu.proc">{{ gpu.proc | number : 0 }}%</span>\n <span ng-if="!gpu.proc">N/A</span>\n mem:\n <span ng-class="vm.getDecoration(gpu.gpu_id, \'mem\')" ng-if="gpu.mem">{{ gpu.mem | number : 0 }}%</span>\n <span ng-if="!gpu.mem">N/A</span>\n </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-irq/view.html','<div class="table-row" ng-if="vm.irqs.length > 0">\n <div class="table-cell text-left title">IRQ</div>\n <div class="table-cell"></div>\n <div class="table-cell">Rate/s</div>\n</div>\n<div class="table-row" ng-repeat="irq in vm.irqs">\n <div class="table-cell text-left">{{irq.irq_line}}</div>\n <div class="table-cell"></div>\n <div class="table-cell"><span>{{irq.irq_rate}}</span></div>\n</div>\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-more/view.html','<section id="mem-more" class="plugin">\n <div class="table">\n <div class="table-row" ng-show="vm.active != undefined">\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" ng-show="vm.inactive != undefined">\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');
|
||||
@ -15,10 +18,12 @@ $templateCache.put('components/plugin-memswap/view.html','<section id="memswap"
|
||||
$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-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 <div class="row" ng-if="!vm.arguments.disable_amps">\n <div class="col-lg-18">\n <glances-plugin-amps></glances-plugin-amps>\n </div>\n </div>\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-process/view.html','<div ng-if="!vm.arguments.disable_process">\n <glances-plugin-processcount sorter="vm.sorter"></glances-plugin-processcount>\n <div class="row" ng-if="!vm.arguments.disable_amps">\n <div class="col-lg-18">\n <glances-plugin-amps></glances-plugin-amps>\n </div>\n </div>\n <glances-plugin-processlist sorter="vm.sorter"></glances-plugin-processlist>\n</div>\n<div ng-if="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-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-raid/view.html','<div class="table-row" ng-if="vm.hasDisks()">\n <div class="table-cell text-left title">RAID disks</div>\n <div class="table-cell">Used</div>\n <div class="table-cell">Total</div>\n</div>\n<div class="table-row" ng-repeat="disk in vm.disks | orderBy: \'name\'">\n <div class="table-cell text-left">\n {{ disk.type | uppercase }} {{ disk.name }}\n <div class="warning" ng-show="disk.degraded">\u2514\u2500 Degraded mode</div>\n <div ng-show="disk.degraded"> \u2514\u2500 {{ disk.config }}</div>\n\n <div class="critical" ng-show="disk.inactive">\u2514\u2500 Status {{ disk.status }}</div>\n <div ng-show="disk.inactive" ng-repeat="component in disk.components | orderBy: \'number\'">\n {{ $last ? \'\u2514\u2500\' : \'\u251C\u2500\' }} disk {{ component.number }}: {{ component.name }}\n </div>\n </div>\n <div class="table-cell" ng-show="!disk.inactive" ng-class="vm.getAlert(disk)">{{ disk.used }}</div>\n <div class="table-cell" ng-show="!disk.inactive" ng-class="vm.getAlert(disk)">{{ disk.available }}</div>\n</div>\n');
|
||||
$templateCache.put('components/plugin-sensors/view.html','<div class="table-row" ng-if="vm.sensors.length > 0">\n <div class="table-cell text-left title">SENSORS</div>\n</div>\n\n<div class="table-row" ng-repeat="sensor in vm.sensors">\n <div class="table-cell text-left">{{ sensor.label }}</div>\n <div class="table-cell">{{ sensor.unit }}</div>\n <div class="table-cell" ng-class="vm.getAlert(sensor)">{{ sensor.value }}</div>\n</div>\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-uptime/view.html','<section id="uptime">\n <span>Uptime: {{ vm.value }}</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');}]);
|
Loading…
Reference in New Issue
Block a user