From: Mark Clarkstone Date: Tue, 18 Dec 2018 14:52:20 +0000 (+0000) Subject: webui: add "drop all connections", fixes #4937 (original request only) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc4873d75b906254b7c6255b9cced4e6ac13f533;p=thirdparty%2Ftvheadend.git webui: add "drop all connections", fixes #4937 (original request only) --- diff --git a/docs/markdown/inc/buttons.md b/docs/markdown/inc/buttons.md index 3526cbc5e..3b35da929 100644 --- a/docs/markdown/inc/buttons.md +++ b/docs/markdown/inc/buttons.md @@ -1,7 +1,8 @@ -Many of the buttons have tool-tips giving you a hint as to their -function. If you don't see any, you may need to enable them in -**Configuration -> General -> Base**. -Previous versions of this documentation had buttons tables -everywhere, to make the buttons - and their function/description - -easier to find, they've all been moved to a single table in the +Previous versions of this documentation had buttons tables +everywhere, to make the buttons - and their function/description - +easier to find, they've all been moved to a single table in the [Introduction](introduction) (*Using the Interface*). + +> Many of the buttons have tool-tips giving you a hint as to their +function. If you don't see any, you may need to enable them in +**Configuration -> General -> Base**. diff --git a/docs/markdown/introduction.md b/docs/markdown/introduction.md index 10c39e572..4ceb48c3c 100644 --- a/docs/markdown/introduction.md +++ b/docs/markdown/introduction.md @@ -274,6 +274,8 @@ Apply configuration (run time only) | Apply the entered debugging settings. | **Configuration -> Debugging -> Configuration only.** Clear all statistics | Reset all stream statistics, e.g. BER, PER etc.. | **Status -> Stream only.** +Drop (displayed) connections | Drop the currently-shown active connections. + | **Status -> Connections only.** View Level | Show/Hide more advanced options. Help | Display the help page. | **Icon-only buttons** diff --git a/src/webui/static/app/status.js b/src/webui/static/app/status.js index 39cac9340..efca00652 100644 --- a/src/webui/static/app/status.js +++ b/src/webui/static/app/status.js @@ -755,7 +755,28 @@ tvheadend.status_conns = function(panel, index) { }]); grid = new Ext.grid.GridPanel({ - tbar: ['->', { + tbar: [ + { + text: _('Drop all connections'), + tooltip: _('Drop (current) connections to Tvheadend.'), + iconCls: 'cancel', + handler: function() { + Ext.MessageBox.confirm(_('Drop Connections'), + _('Drop all current connections?'), + function(button) { + if (button === 'no') + return; + store.each(function(obj) { + Ext.Ajax.request({ + url: 'api/connections/cancel', + params: { id: obj.id } + }); + }); + } + ); + } + }, + '->', { text: _('Help'), tooltip: _('View help docs.'), iconCls: 'help', diff --git a/src/webui/static/img/doc/status/connections.png b/src/webui/static/img/doc/status/connections.png index 897739db2..6e7bc6384 100644 Binary files a/src/webui/static/img/doc/status/connections.png and b/src/webui/static/img/doc/status/connections.png differ