Skip to content

Commit 2bca7f0

Browse files
luci-app-upnp: Complete plugin wording/UI revision
Signed-off-by: Self-Hosting-Group <[email protected]>
1 parent 975b5d3 commit 2bca7f0

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

applications/luci-app-upnp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
include $(TOPDIR)/rules.mk
88

9-
LUCI_TITLE:=Universal Plug and Play (UPnP IGD) & PCP/NAT-PMP configuration module
9+
LUCI_TITLE:=UPnP IGD & PCP/NAT-PMP configuration module | Universal Plug and Play
1010
LUCI_DEPENDS:=+luci-base +miniupnpd +rpcd-mod-ucode
1111

1212
PKG_LICENSE:=Apache-2.0

applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ handleDelRule = function(num, ev) {
2828
};
2929

3030
return baseclass.extend({
31-
title: _('Active Port Forwards'),
31+
title: _('Active UPnP IGD & PCP/NAT-PMP Port Forwards'),
3232

3333
load: function() {
3434
return Promise.all([
@@ -40,11 +40,11 @@ return baseclass.extend({
4040

4141
var table = E('table', { 'class': 'table', 'id': 'upnp_status_table' }, [
4242
E('tr', { 'class': 'tr table-titles' }, [
43-
E('th', { 'class': 'th' }, _('Protocol')),
4443
E('th', { 'class': 'th' }, _('External Port')),
4544
E('th', { 'class': 'th' }, _('Client Address')),
4645
E('th', { 'class': 'th' }, _('Host')),
4746
E('th', { 'class': 'th' }, _('Client Port')),
47+
E('th', { 'class': 'th' }, _('Protocol')),
4848
E('th', { 'class': 'th' }, _('Description')),
4949
E('th', { 'class': 'th cbi-section-actions' }, '')
5050
])
@@ -54,11 +54,11 @@ return baseclass.extend({
5454

5555
var rows = rules.map(function(rule) {
5656
return [
57-
rule.proto,
5857
rule.extport,
5958
rule.intaddr,
6059
rule.host_hint || _('Unknown'),
6160
rule.intport,
61+
rule.proto,
6262
rule.descr,
6363
E('button', {
6464
'class': 'btn cbi-button-remove',

applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ return view.extend({
5050

5151
var rows = rules.map(function(rule) {
5252
return [
53-
rule.proto,
5453
rule.extport,
5554
rule.intaddr,
5655
rule.host_hint || _('Unknown'),
5756
rule.intport,
57+
rule.proto,
5858
rule.descr,
5959
E('button', {
6060
'class': 'btn cbi-button-remove',
@@ -73,18 +73,18 @@ return view.extend({
7373
var m, s, o;
7474

7575
m = new form.Map('upnpd', [_('UPnP IGD & PCP/NAT-PMP Service')],
76-
_('UPnP IGD & PCP/NAT-PMP allows clients on the local network to automatically configure port forwards on the router. Also called Universal Plug and Play.'));
76+
_('The %s & %s/%s protocols allow clients on the local network to configure port forwards on the router autonomously.', 'The %s (%s = UPnP IGD) & %s (%s = PCP)/%s (%s = NAT-PMP) protocols allow clients on the local network to configure port forwards on the router autonomously.').format('<a href="https://en.wikipedia.org/wiki/Internet_Gateway_Device_Protocol" target="_blank" rel="noreferrer"><abbr title="UPnP Internet Gateway Device (Control Protocol)">UPnP IGD</abbr></a>', '<a href="https://en.wikipedia.org/wiki/Port_Control_Protocol" target="_blank" rel="noreferrer"><abbr title="Port Control Protocol">PCP</abbr></a>', '<a href="https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol" target="_blank" rel="noreferrer"><abbr title="NAT Port Mapping Protocol">NAT-PMP</abbr></a>'));
7777

7878
s = m.section(form.GridSection, '_active_rules');
7979

8080
s.render = L.bind(function(view, section_id) {
8181
var table = E('table', { 'class': 'table cbi-section-table', 'id': 'upnp_status_table' }, [
8282
E('tr', { 'class': 'tr table-titles' }, [
83-
E('th', { 'class': 'th' }, _('Protocol')),
8483
E('th', { 'class': 'th' }, _('External Port')),
8584
E('th', { 'class': 'th' }, _('Client Address')),
8685
E('th', { 'class': 'th' }, _('Host')),
8786
E('th', { 'class': 'th' }, _('Client Port')),
87+
E('th', { 'class': 'th' }, _('Protocol')),
8888
E('th', { 'class': 'th' }, _('Description')),
8989
E('th', { 'class': 'th cbi-section-actions' }, '')
9090
])
@@ -94,11 +94,11 @@ return view.extend({
9494

9595
var rows = rules.map(function(rule) {
9696
return [
97-
rule.proto,
9897
rule.extport,
9998
rule.intaddr,
10099
rule.host_hint || _('Unknown'),
101100
rule.intport,
101+
rule.proto,
102102
rule.descr,
103103
E('button', {
104104
'class': 'btn cbi-button-remove',
@@ -110,25 +110,25 @@ return view.extend({
110110
cbi_update_table(table, rows, E('em', _('There are no active port forwards.')));
111111

112112
return E('div', { 'class': 'cbi-section cbi-tblsection' }, [
113-
E('h3', _('Active Port Forwards')), table ]);
113+
E('h3', _('Active Service Port Forwards')), table ]);
114114
}, o, this);
115115

116116
s = m.section(form.NamedSection, 'config', 'upnpd', _('Service Settings'));
117117
s.addremove = false;
118118
s.tab('general', _('General Settings'));
119119
s.tab('advanced', _('Advanced Settings'));
120120

121-
o = s.taboption('general', form.Flag, 'enabled', _('Start service'));
121+
o = s.taboption('general', form.Flag, 'enabled', _('Start service'), _('Start autonomous port forwarding service'));
122122
o.rmempty = false;
123123

124124
s.taboption('general', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1'
125-
s.taboption('general', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocol')).default = '1'
125+
s.taboption('general', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols')).default = '1'
126126

127127
s.taboption('general', form.Flag, 'secure_mode', _('Enable secure mode'),
128128
_('Allow adding port forwards only to requesting IP addresses')).default = '1'
129129

130130
s.taboption('general', form.Flag, 'igdv1', _('Enable UPnP IGDv1 mode'),
131-
_('Advertise as UPnP IGDv1 device (no IPv6) instead of IGDv2')).default = '0'
131+
_('Advertise as UPnP IGDv1 device (no IPv6) instead of IGDv2')).default = '1'
132132

133133
s.taboption('general', form.Flag, 'log_output', _('Enable additional logging'),
134134
_('Puts extra debugging information into the system log'))
@@ -149,17 +149,17 @@ return view.extend({
149149
s.taboption('advanced', form.Value, 'serial_number', _('Announced serial number'))
150150
s.taboption('advanced', form.Value, 'model_number', _('Announced model number'))
151151

152-
o = s.taboption('advanced', form.Value, 'notify_interval', _('Notify interval'))
152+
o = s.taboption('advanced', form.Value, 'notify_interval', _('Notify interval'), _('A 900s interval will result in %s notifications with the minimum max-age of 1800s', 'A 900s interval will result in %s (%s = SSDP) notifications with the minimum max-age of 1800s').format('<abbr title="Simple Service Discovery Protocol">SSDP</abbr>'))
153153
o.datatype = 'uinteger'
154-
o.placeholder = 30
154+
o.placeholder = 900
155155

156-
o = s.taboption('advanced', form.Value, 'clean_ruleset_threshold', _('Clean rules threshold'))
156+
o = s.taboption('advanced', form.Value, 'clean_ruleset_interval', _('Clean interval'), _('Interval that defines how often unexpired port forwards with no traffic are removed, expired always removed'))
157157
o.datatype = 'uinteger'
158-
o.placeholder = 20
158+
o.placeholder = '0 (disabled)'
159159

160-
o = s.taboption('advanced', form.Value, 'clean_ruleset_interval', _('Clean rules interval'))
160+
o = s.taboption('advanced', form.Value, 'clean_ruleset_threshold', _('Clean threshold'), _('Threshold of ??? port forwards ???'))
161161
o.datatype = 'uinteger'
162-
o.placeholder = 600
162+
o.placeholder = 20
163163

164164
o = s.taboption('advanced', form.Value, 'presentation_url', _('Presentation URL'))
165165
o.placeholder = 'http://192.168.1.1/'
@@ -176,7 +176,7 @@ return view.extend({
176176
o = s.taboption('advanced', form.Value, 'stun_port', _('STUN Port'))
177177
o.depends('use_stun', '1');
178178
o.datatype = 'port'
179-
o.placeholder = '0-65535'
179+
o.placeholder = '3478'
180180

181181
s = m.section(form.GridSection, 'perm_rule', _('Service ACLs'),
182182
_('ACLs specify which external ports can be forwarded to which client addresses and ports, IPv6 always allowed.'))
@@ -189,15 +189,15 @@ return view.extend({
189189

190190
o = s.option(form.Value, 'ext_ports', _('External Port'))
191191
o.datatype = 'portrange'
192-
o.placeholder = '0-65535'
192+
o.placeholder = '1-65535'
193193

194194
o = s.option(form.Value, 'int_addr', _('Client Address'))
195195
o.datatype = 'ip4addr'
196196
o.placeholder = '0.0.0.0/0'
197197

198198
o = s.option(form.Value, 'int_ports', _('Client Port'))
199199
o.datatype = 'portrange'
200-
o.placeholder = '0-65535'
200+
o.placeholder = '1-65535'
201201

202202
o = s.option(form.ListValue, 'action', _('Action'))
203203
o.value('allow', _('Allow'));

applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"admin/services/upnp": {
3-
"title": "UPnP IGD & PCP/NAT-PMP",
3+
"title": "UPnP IGD & PCP",
44
"action": {
55
"type": "view",
66
"path": "upnp/upnp"

0 commit comments

Comments
 (0)