mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-30 21:49:37 +03:00
Merge pull request #899 from nclsHart/ports-shortcut
Ports plugin keyboard shortcut
This commit is contained in:
commit
1a777d7ec3
@ -66,3 +66,7 @@
|
|||||||
<div class="col-sm-12 col-lg-6">{{help.enable_disable_short_processname}}</div>
|
<div class="col-sm-12 col-lg-6">{{help.enable_disable_short_processname}}</div>
|
||||||
<div class="col-sm-12 col-lg-6"></div>
|
<div class="col-sm-12 col-lg-6"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-lg-6">{{help.enable_disable_ports}}</div>
|
||||||
|
<div class="col-sm-12 col-lg-6"></div>
|
||||||
|
</div>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">
|
<div class="col-sm-6 sidebar" ng-show="!arguments.disable_left_sidebar">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<section id="network" class="plugin table-row-group" ng-show="!arguments.disable_network" ng-include src="'plugins/network.html'"></section>
|
<section id="network" class="plugin table-row-group" ng-show="!arguments.disable_network" ng-include src="'plugins/network.html'"></section>
|
||||||
<section id="ports" class="plugin table-row-group" ng-include src="'plugins/ports.html'"></section>
|
<section id="ports" class="plugin table-row-group" ng-show="!arguments.disable_ports" ng-include src="'plugins/ports.html'"></section>
|
||||||
<section id="diskio" class="plugin table-row-group" ng-show="!arguments.disable_diskio && statsDiskio.disks.length > 0" ng-include src="'plugins/diskio.html'"></section>
|
<section id="diskio" class="plugin table-row-group" ng-show="!arguments.disable_diskio && statsDiskio.disks.length > 0" ng-include src="'plugins/diskio.html'"></section>
|
||||||
<section id="fs" class="plugin table-row-group" ng-show="!arguments.disable_fs" ng-include src="'plugins/fs.html'"></section>
|
<section id="fs" class="plugin table-row-group" ng-show="!arguments.disable_fs" ng-include src="'plugins/fs.html'"></section>
|
||||||
<section id="folders" class="plugin table-row-group" ng-show="!arguments.disable_fs && statsFolders.folders.length > 0" ng-include src="'plugins/folders.html'"></section>
|
<section id="folders" class="plugin table-row-group" ng-show="!arguments.disable_fs && statsFolders.folders.length > 0" ng-include src="'plugins/folders.html'"></section>
|
||||||
|
@ -178,6 +178,10 @@ glancesApp.controller('statsController', function ($scope, $rootScope, $interval
|
|||||||
// I => Show/hide IP module
|
// I => Show/hide IP module
|
||||||
$scope.arguments.disable_ip = !$scope.arguments.disable_ip;
|
$scope.arguments.disable_ip = !$scope.arguments.disable_ip;
|
||||||
break;
|
break;
|
||||||
|
case $event.shiftKey && $event.keyCode == keycodes.p:
|
||||||
|
// I => Enable/disable ports module
|
||||||
|
$scope.arguments.disable_ports = !$scope.arguments.disable_ports;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -94,6 +94,7 @@ class Plugin(GlancesPlugin):
|
|||||||
self.view_data['diskio_iops'] = msg_col2.format('B', 'Count/rate for Disk I/O')
|
self.view_data['diskio_iops'] = msg_col2.format('B', 'Count/rate for Disk I/O')
|
||||||
self.view_data['show_hide_top_menu'] = msg_col2.format('5', 'Show/hide top menu (QL, CPU, MEM, SWAP and LOAD)')
|
self.view_data['show_hide_top_menu'] = msg_col2.format('5', 'Show/hide top menu (QL, CPU, MEM, SWAP and LOAD)')
|
||||||
self.view_data['show_hide_amp'] = msg_col2.format('A', 'Show/hide AMP plugin')
|
self.view_data['show_hide_amp'] = msg_col2.format('A', 'Show/hide AMP plugin')
|
||||||
|
self.view_data['enable_disable_ports'] = msg_col.format('P', 'Enable/disable ports plugin')
|
||||||
self.view_data['edit_pattern_filter'] = 'ENTER: Edit the process filter pattern'
|
self.view_data['edit_pattern_filter'] = 'ENTER: Edit the process filter pattern'
|
||||||
|
|
||||||
def get_view_data(self, args=None):
|
def get_view_data(self, args=None):
|
||||||
@ -170,6 +171,8 @@ class Plugin(GlancesPlugin):
|
|||||||
ret.append(self.curse_add_line(self.view_data['enable_disable_irix']))
|
ret.append(self.curse_add_line(self.view_data['enable_disable_irix']))
|
||||||
ret.append(self.curse_add_line(self.view_data['quit']))
|
ret.append(self.curse_add_line(self.view_data['quit']))
|
||||||
ret.append(self.curse_new_line())
|
ret.append(self.curse_new_line())
|
||||||
|
ret.append(self.curse_add_line(self.view_data['enable_disable_ports']))
|
||||||
|
ret.append(self.curse_new_line())
|
||||||
|
|
||||||
ret.append(self.curse_new_line())
|
ret.append(self.curse_new_line())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user