]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: add "drop all connections", fixes #4937 (original request only)
authorMark Clarkstone <hello@markclarkstone.co.uk>
Tue, 18 Dec 2018 14:52:20 +0000 (14:52 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Dec 2018 11:37:35 +0000 (12:37 +0100)
docs/markdown/inc/buttons.md
docs/markdown/introduction.md
src/webui/static/app/status.js
src/webui/static/img/doc/status/connections.png

index 3526cbc5eaf33ac0319bd3e29e0e6f1cf4d2635d..3b35da929f6c55d8fe0c584cada350b8577ea94d 100644 (file)
@@ -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**.
index 10c39e5729c845aa98a28beee3483734f7a237f7..4ceb48c3cf37f75f63d54772ffbc16a463f49180 100644 (file)
@@ -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**
index 39cac934042b329b0601e1f2b45009912a9b6fa4..efca006526c9cec62fab0a566b5467706577760e 100644 (file)
@@ -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',
index 897739db264a24186ff55c886445a7e0d7e3cf9f..6e7bc6384e0cb10f87bb4dc702881de5e816ae8e 100644 (file)
Binary files a/src/webui/static/img/doc/status/connections.png and b/src/webui/static/img/doc/status/connections.png differ