mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-28 19:54:14 +03:00
Merge pull request #668 from notFloran/webui-filesystem-free-space
[WebUI] filesystem free space
This commit is contained in:
commit
dd7911f0b0
@ -32,11 +32,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-lg-6">{{help.sort_cpu_times}}</div>
|
<div class="col-sm-12 col-lg-6">{{help.sort_cpu_times}}</div>
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_help}}</div>
|
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesytem_freespace}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_diskio}}</div>
|
<div class="col-sm-12 col-lg-6">{{help.show_hide_diskio}}</div>
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
<div class="col-sm-12 col-lg-6">{{help.show_hide_help}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesystem}}</div>
|
<div class="col-sm-12 col-lg-6">{{help.show_hide_filesystem}}</div>
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
<div class="table-row">
|
<div class="table-row">
|
||||||
<div class="table-cell text-left title">FILE SYS</div>
|
<div class="table-cell text-left title">FILE SYS</div>
|
||||||
<div class="table-cell">Used</div>
|
<div class="table-cell">
|
||||||
|
<span ng-show="!show.filesystem_free_space">Used</span>
|
||||||
|
<span ng-show="show.filesystem_free_space">Free</span>
|
||||||
|
</div>
|
||||||
<div class="table-cell">Total</div>
|
<div class="table-cell">Total</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row" ng-repeat="fs in statsFs.fileSystems | orderBy: 'mnt_point'">
|
<div class="table-row" ng-repeat="fs in statsFs.fileSystems | orderBy: 'mnt_point'">
|
||||||
<div class="table-cell text-left">{{ fs.mountPoint }} ({{ fs.name }})</div>
|
<div class="table-cell text-left">{{ fs.mountPoint }} ({{ fs.name }})</div>
|
||||||
<div class="table-cell" ng-class="statsFs.getDecoration(fs.mountPoint, 'used')">
|
<div class="table-cell" ng-class="statsFs.getDecoration(fs.mountPoint, 'used')">
|
||||||
{{ fs.used | bytes }}
|
<span ng-show="!show.filesystem_free_space">{{ fs.used | bytes }}</span>
|
||||||
|
<span ng-show="show.filesystem_free_space">{{ fs.free | bytes }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-cell">{{ fs.size | bytes }}</div>
|
<div class="table-cell">{{ fs.size | bytes }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +32,8 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
'network_io_combination': false,
|
'network_io_combination': false,
|
||||||
'network_io_cumulative': false,
|
'network_io_cumulative': false,
|
||||||
'filesystem_freespace': false,
|
'filesystem_freespace': false,
|
||||||
'network_by_bytes': false
|
'network_by_bytes': false,
|
||||||
|
'filesystem_free_space': false
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.init_refresh_time = function () {
|
$scope.init_refresh_time = function () {
|
||||||
@ -120,17 +121,17 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
$scope.onKeyDown = function ($event) {
|
$scope.onKeyDown = function ($event) {
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $event.keyCode == keycodes.a:
|
case !$event.shiftKey && $event.keyCode == keycodes.a:
|
||||||
// a => Sort processes automatically
|
// a => Sort processes automatically
|
||||||
$scope.sorter.column = "cpu_percent";
|
$scope.sorter.column = "cpu_percent";
|
||||||
$scope.sorter.auto = true;
|
$scope.sorter.auto = true;
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.c:
|
case !$event.shiftKey && $event.keyCode == keycodes.c:
|
||||||
// c => Sort processes by CPU%
|
// c => Sort processes by CPU%
|
||||||
$scope.sorter.column = "cpu_percent";
|
$scope.sorter.column = "cpu_percent";
|
||||||
$scope.sorter.auto = false;
|
$scope.sorter.auto = false;
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.m:
|
case !$event.shiftKey && $event.keyCode == keycodes.m:
|
||||||
// m => Sort processes by MEM%
|
// m => Sort processes by MEM%
|
||||||
$scope.sorter.column = "memory_percent";
|
$scope.sorter.column = "memory_percent";
|
||||||
$scope.sorter.auto = false;
|
$scope.sorter.auto = false;
|
||||||
@ -140,12 +141,12 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
$scope.sorter.column = "username";
|
$scope.sorter.column = "username";
|
||||||
$scope.sorter.auto = false;
|
$scope.sorter.auto = false;
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.p:
|
case !$event.shiftKey && $event.keyCode == keycodes.p:
|
||||||
// p => Sort processes by name
|
// p => Sort processes by name
|
||||||
$scope.sorter.column = "name";
|
$scope.sorter.column = "name";
|
||||||
$scope.sorter.auto = false;
|
$scope.sorter.auto = false;
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.i:
|
case !$event.shiftKey && $event.keyCode == keycodes.i:
|
||||||
// i => Sort processes by I/O rate
|
// i => Sort processes by I/O rate
|
||||||
$scope.sorter.column = ['io_read', 'io_write'];
|
$scope.sorter.column = ['io_read', 'io_write'];
|
||||||
$scope.sorter.auto = false;
|
$scope.sorter.auto = false;
|
||||||
@ -159,15 +160,15 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
// d => Show/hide disk I/O stats
|
// d => Show/hide disk I/O stats
|
||||||
$scope.show_hide('diskio');
|
$scope.show_hide('diskio');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.f:
|
case !$event.shiftKey && $event.keyCode == keycodes.f:
|
||||||
// f => Show/hide filesystem stats
|
// f => Show/hide filesystem stats
|
||||||
$scope.show_hide('fs');
|
$scope.show_hide('fs');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.n:
|
case !$event.shiftKey && $event.keyCode == keycodes.n:
|
||||||
// n => Show/hide network stats
|
// n => Show/hide network stats
|
||||||
$scope.show_hide('network');
|
$scope.show_hide('network');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.s:
|
case !$event.shiftKey && $event.keyCode == keycodes.s:
|
||||||
// s => Show/hide sensors stats
|
// s => Show/hide sensors stats
|
||||||
$scope.show_hide('sensors');
|
$scope.show_hide('sensors');
|
||||||
break;
|
break;
|
||||||
@ -175,7 +176,7 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
// 2 => Show/hide left sidebar
|
// 2 => Show/hide left sidebar
|
||||||
$scope.show_hide('sidebar');
|
$scope.show_hide('sidebar');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.z:
|
case !$event.shiftKey && $event.keyCode == keycodes.z:
|
||||||
// z => Enable/disable processes stats
|
// z => Enable/disable processes stats
|
||||||
$scope.show_hide('process_stats');
|
$scope.show_hide('process_stats');
|
||||||
break;
|
break;
|
||||||
@ -187,11 +188,11 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
// D => Enable/disable Docker stats
|
// D => Enable/disable Docker stats
|
||||||
$scope.show_hide('docker_stats');
|
$scope.show_hide('docker_stats');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.b:
|
case !$event.shiftKey && $event.keyCode == keycodes.b:
|
||||||
// b => Bytes or bits for network I/O
|
// b => Bytes or bits for network I/O
|
||||||
$scope.show_hide('network_by_bytes');
|
$scope.show_hide('network_by_bytes');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.l:
|
case !$event.shiftKey && $event.keyCode == keycodes.l:
|
||||||
// l => Show/hide alert logs
|
// l => Show/hide alert logs
|
||||||
$scope.show_hide('alert');
|
$scope.show_hide('alert');
|
||||||
break;
|
break;
|
||||||
@ -199,7 +200,7 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
// 1 => Global CPU or per-CPU stats
|
// 1 => Global CPU or per-CPU stats
|
||||||
$scope.show_hide('per_cpu');
|
$scope.show_hide('per_cpu');
|
||||||
break;
|
break;
|
||||||
case $event.keyCode == keycodes.h:
|
case !$event.shiftKey && $event.keyCode == keycodes.h:
|
||||||
// h => Show/hide this help screen
|
// h => Show/hide this help screen
|
||||||
$scope.show_hide('help');
|
$scope.show_hide('help');
|
||||||
break;
|
break;
|
||||||
@ -211,6 +212,10 @@ glancesApp.controller('statsController', function ($scope, $interval, $routePara
|
|||||||
// U => View cumulative network I/O
|
// U => View cumulative network I/O
|
||||||
$scope.show_hide('network_io_cumulative');
|
$scope.show_hide('network_io_cumulative');
|
||||||
break;
|
break;
|
||||||
|
case $event.shiftKey && $event.keyCode == keycodes.f:
|
||||||
|
// F => Show filesystem free space
|
||||||
|
$scope.show_hide('filesystem_free_space');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user