diff --git a/CHANGELOG b/CHANGELOG index 8032720..e6d18a4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ ---- v0.4.0 [Not released] --- +--- v0.4.0 [2014-07-24] --- * [NEW] Added a environment variables sub-page to the process view. @@ -12,6 +12,10 @@ * [NEW] Added Travis CI setup and test coverage. +* [NEW] Added filters to system-wide connections table + +* [NEW] Some rather large refactorings in general due to added tests. + --- v0.3.0 [2014-04-15] --- * [NEW] Added a PSDASH_URL_PREFIX configuration setting to allow psdash to be served from a sub-url rather than always on root. diff --git a/README.md b/README.md index 926f236..5c1e3cd 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Available command-line arguments: ``` usage: psdash [-h] [-l path] [-b host] [-p port] [-d] -psdash 0.3.0 - system information web dashboard +psdash 0.4.0 - system information web dashboard optional arguments: -h, --help show this help message and exit diff --git a/psdash/__init__.py b/psdash/__init__.py index f2b3589..49c37a8 100644 --- a/psdash/__init__.py +++ b/psdash/__init__.py @@ -1 +1 @@ -__version__ = "0.3.0" \ No newline at end of file +__version__ = "0.4.0" \ No newline at end of file diff --git a/psdash/run.py b/psdash/run.py index b0e1c57..0ff45e8 100644 --- a/psdash/run.py +++ b/psdash/run.py @@ -152,7 +152,7 @@ def update_net_io_counters(self): return self.app.psdash.net_io_counters.update() def run(self): - logger.info('Starting psdash v0.3.0') + logger.info('Starting psdash v0.4.0') self._setup_locale() self._setup_timers() diff --git a/psdash/static/js/psdash.js b/psdash/static/js/psdash.js index 4749fe0..331d3e1 100644 --- a/psdash/static/js/psdash.js +++ b/psdash/static/js/psdash.js @@ -108,8 +108,12 @@ function init_log() { scroll_down($el); } +var skip_updates = false; + function init_updater() { function update() { + if (skip_updates) return; + $.ajax({ url: location.href, cache: false, @@ -123,7 +127,22 @@ function init_updater() { setInterval(update, 3000); } +function init_connections_filter() { + var $content = $("#content"); + $content.on("change", "#connections-form select", function () { + $content.find("#connections-form").submit(); + }); + $content.on("focus", "#connections-form select", function () { + skip_updates = true; + }); + $content.on("blur", "#connections-form select", function () { + skip_updates = false; + }); +} + $(document).ready(function() { + init_connections_filter(); + if($("#log").length == 0) { init_updater(); } else { diff --git a/psdash/templates/network.html b/psdash/templates/network.html index 69adc27..f966d98 100644 --- a/psdash/templates/network.html +++ b/psdash/templates/network.html @@ -40,52 +40,108 @@
FD | -PID | -Family | -Type | -Local address | -Remote address | -Status | -
---|---|---|---|---|---|---|
- {{ c.fd if c.fd > 0 else "-" }} - | -- {% if c.pid %} - {{ c.pid }} - {% else %} - - - {% endif %} - | -{{ socket_families[c.family] }} | -{{ socket_types[c.type] }} | -- {% if c.laddr[0] and c.laddr[1] %} - {{ c.laddr[0] }}:{{ c.laddr[1] }} - {% else %} - - - {% endif %} - | -- {% if c.raddr[0] and c.raddr[1] %} - {{ c.raddr[0] }}:{{ c.raddr[1] }} - {% else %} - - - {% endif %} - | -{{ c.status }} | -