luci-app-firewall: drop usage of getOffloadSupport()
authorJo-Philipp Wich <jo@mein.io>
Wed, 14 Aug 2019 15:00:04 +0000 (17:00 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Aug 2019 20:58:15 +0000 (22:58 +0200)
Rely on the more generic L.hasSystemFeature() from now on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js

index 4d13752b3a2e17485b0effecff3ddce52b1a4dce..22f1683fe441bd589c99e07cc4be1a7f770172bd 100644 (file)
@@ -7,12 +7,6 @@
 'require tools.widgets as widgets';
 
 return L.view.extend({
-       callOffloadSupport: rpc.declare({
-               object: 'luci',
-               method: 'offload_support',
-               expect: { offload_support: false }
-       }),
-
        callConntrackHelpers: rpc.declare({
                object: 'luci',
                method: 'conntrack_helpers',
@@ -21,14 +15,12 @@ return L.view.extend({
 
        load: function() {
                return Promise.all([
-                       this.callOffloadSupport(),
                        this.callConntrackHelpers()
                ]);
        },
 
        render: function(data) {
-               var hasOffloading = data[0],
-                   ctHelpers = data[1],
+               var ctHelpers = data[0],
                    m, s, o, inp, out;
 
                m = new form.Map('firewall', _('Firewall - Zone Settings'),
@@ -55,7 +47,7 @@ return L.view.extend({
 
                /* Netfilter flow offload support */
 
-               if (hasOffloading) {
+               if (L.hasSystemFeature('offloading')) {
                        s = m.section(form.TypedSection, 'defaults', _('Routing/NAT Offloading'),
                                _('Experimental feature. Not fully compatible with QoS/SQM.'));