luci-app-travelmate: sync with travelmate 2.1.0 5941/head
authorDirk Brenken <dev@brenken.org>
Sat, 20 Aug 2022 16:56:02 +0000 (18:56 +0200)
committerDirk Brenken <dev@brenken.org>
Sat, 20 Aug 2022 17:21:26 +0000 (19:21 +0200)
* expose new options to LuCI
* cosmetics

Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-travelmate/Makefile
applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js
applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js

index 08ad6c4a5b356216215253974aad8668da975271..28b9ba06032dfcc3d1a8c3e3a09961fdd8e8fa39 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2017-2020 Dirk Brenken (dev@brenken.org)
+# Copyright 2017-2022 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the Apache License, Version 2.0
 
 include $(TOPDIR)/rules.mk
index 5b8f58e2982f6e33d4f1eaf14f04a9439e1ccb0d..88a0aadf5e14bf467a9ef3e9015a1e719a9eff0e 100644 (file)
@@ -185,9 +185,9 @@ return view.extend({
                                                        if (station_mac && info) {
                                                                station_mac.textContent = info.data.station_mac || '-';
                                                        }
-                                                       var station_interface = document.getElementById('station_interface');
-                                                       if (station_interface && info) {
-                                                               station_interface.textContent = info.data.station_interface || '-';
+                                                       var station_interfaces = document.getElementById('station_interfaces');
+                                                       if (station_interfaces && info) {
+                                                               station_interfaces.textContent = info.data.station_interfaces || '-';
                                                        }
                                                        var wpa_flags = document.getElementById('wpa_flags');
                                                        if (wpa_flags && info) {
@@ -236,8 +236,8 @@ return view.extend({
                                        E('div', { 'class': 'cbi-value-field', 'id': 'station_mac', 'style': 'color:#37c' }, '-')
                                ]),
                                E('div', { 'class': 'cbi-value' }, [
-                                       E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('Station Interface')),
-                                       E('div', { 'class': 'cbi-value-field', 'id': 'station_interface', 'style': 'color:#37c' }, '-')
+                                       E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('Station Interfaces')),
+                                       E('div', { 'class': 'cbi-value-field', 'id': 'station_interfaces', 'style': 'color:#37c' }, '-')
                                ]),
                                E('div', { 'class': 'cbi-value' }, [
                                        E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('WPA Flags')),
@@ -316,6 +316,17 @@ return view.extend({
                o.default = 1;
                o.rmempty = false;
 
+               o = s.taboption('general', form.Flag, 'trm_vpn', _('VPN processing'), _('VPN connections will be managed by travelmate.'));
+               o.default = 1;
+               o.rmempty = false;
+
+               o = s.taboption('general', widgets.NetworkSelect, 'trm_vpnifacelist', _('Limit VPN processing'), _('Limit VPN processing to certain interfaces.'));
+               o.depends('trm_vpn', '1');
+               o.unspecified = true;
+               o.multiple = true;
+               o.nocreate = true;
+               o.rmempty = true;
+
                o = s.taboption('general', form.Flag, 'trm_netcheck', _('Net Error Check'), _('Treat missing internet availability as an error.'));
                o.depends('trm_captive', '1');
                o.default = 0;
index 20443f97998ae122e9cc7e403329966121290ba3..fcd98fa37f976a061c3fba5f372f0d41f3cbac11 100644 (file)
@@ -698,7 +698,7 @@ return view.extend({
                        return handleSectionsVal('set', section_id, 'vpnservice', value);
                }
 
-               o = s.taboption('vpn', widgets.NetworkSelect, '_vpniface', _('VPN Interface'), _('The logical vpn network interface, e.g. \'wg0\' or \'tun0\'.'));
+               o = s.taboption('vpn', widgets.NetworkSelect, '_vpniface', _('VPN Interface'), _('The logical vpn network interface like \'wg0\'.'));
                o.unspecified = false;
                o.nocreate = true;
                o.optional = true;