summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-upnp/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorSelf-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>2024-11-29 00:00:00 +0000
committerPaul Donald <newtwen+github@gmail.com>2024-11-30 05:12:16 +0100
commit4024dfa3020868638869316f43968e62697868e1 (patch)
treedcdb75ba797f59aa937a4d89ab6604498d300850 /applications/luci-app-upnp/htdocs/luci-static/resources
parenta30ae19006cad444e18b10a5e42a35436a59133e (diff)
luci-app-upnp: Finalise changes for OpenWrt 24.10 release
Closes #7407 Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing> Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'applications/luci-app-upnp/htdocs/luci-static/resources')
-rw-r--r--applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js16
-rw-r--r--applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js157
2 files changed, 93 insertions, 80 deletions
diff --git a/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js b/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js
index 1fbb440b4c..3173fb35bc 100644
--- a/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js
+++ b/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js
@@ -28,7 +28,7 @@ handleDelRule = function(num, ev) {
};
return baseclass.extend({
- title: _('Active Port Forwards'),
+ title: _('Active UPnP IGD & PCP/NAT-PMP Port Maps'),
load: function() {
return Promise.all([
@@ -40,11 +40,11 @@ return baseclass.extend({
var table = E('table', { 'class': 'table', 'id': 'upnp_status_table' }, [
E('tr', { 'class': 'tr table-titles' }, [
- E('th', { 'class': 'th' }, _('Protocol')),
- E('th', { 'class': 'th' }, _('External Port')),
+ E('th', { 'class': 'th' }, _('Client Name')),
E('th', { 'class': 'th' }, _('Client Address')),
- E('th', { 'class': 'th' }, _('Host')),
E('th', { 'class': 'th' }, _('Client Port')),
+ E('th', { 'class': 'th' }, _('External Port')),
+ E('th', { 'class': 'th' }, _('Protocol')),
E('th', { 'class': 'th' }, _('Description')),
E('th', { 'class': 'th cbi-section-actions' }, '')
])
@@ -54,11 +54,11 @@ return baseclass.extend({
var rows = rules.map(function(rule) {
return [
- rule.proto,
- rule.extport,
- rule.intaddr,
rule.host_hint || _('Unknown'),
+ rule.intaddr,
rule.intport,
+ rule.extport,
+ rule.proto,
rule.descr,
E('button', {
'class': 'btn cbi-button-remove',
@@ -67,7 +67,7 @@ return baseclass.extend({
];
});
- cbi_update_table(table, rows, E('em', _('There are no active port forwards.')));
+ cbi_update_table(table, rows, E('em', _('There are no active port maps.')));
return table;
}
diff --git a/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js b/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js
index b457951286..6bd7bf3a6d 100644
--- a/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js
+++ b/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js
@@ -50,11 +50,11 @@ return view.extend({
var rows = rules.map(function(rule) {
return [
- rule.proto,
- rule.extport,
- rule.intaddr,
rule.host_hint || _('Unknown'),
+ rule.intaddr,
rule.intport,
+ rule.extport,
+ rule.proto,
rule.descr,
E('button', {
'class': 'btn cbi-button-remove',
@@ -63,7 +63,7 @@ return view.extend({
];
});
- cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active port forwards.')));
+ cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active port maps.')));
return;
},
@@ -73,18 +73,18 @@ return view.extend({
var m, s, o;
m = new form.Map('upnpd', [_('UPnP IGD & PCP/NAT-PMP Service')],
- _('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.'));
+ _('The %s protocols allow clients on the local network to configure port maps/forwards on the router autonomously.', 'The %s (%s = UPnP IGD & PCP/NAT-PMP) protocols allow clients on the local network to configure port maps/forwards on the router autonomously.').format('%s & %s/%s').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>'));
s = m.section(form.GridSection, '_active_rules');
s.render = L.bind(function(view, section_id) {
var table = E('table', { 'class': 'table cbi-section-table', 'id': 'upnp_status_table' }, [
E('tr', { 'class': 'tr table-titles' }, [
- E('th', { 'class': 'th' }, _('Protocol')),
- E('th', { 'class': 'th' }, _('External Port')),
+ E('th', { 'class': 'th' }, _('Client Name')),
E('th', { 'class': 'th' }, _('Client Address')),
- E('th', { 'class': 'th' }, _('Host')),
E('th', { 'class': 'th' }, _('Client Port')),
+ E('th', { 'class': 'th' }, _('External Port')),
+ E('th', { 'class': 'th' }, _('Protocol')),
E('th', { 'class': 'th' }, _('Description')),
E('th', { 'class': 'th cbi-section-actions' }, '')
])
@@ -94,11 +94,11 @@ return view.extend({
var rows = rules.map(function(rule) {
return [
- rule.proto,
- rule.extport,
- rule.intaddr,
rule.host_hint || _('Unknown'),
+ rule.intaddr,
rule.intport,
+ rule.extport,
+ rule.proto,
rule.descr,
E('button', {
'class': 'btn cbi-button-remove',
@@ -107,99 +107,112 @@ return view.extend({
];
});
- cbi_update_table(table, rows, E('em', _('There are no active port forwards.')));
+ cbi_update_table(table, rows, E('em', _('There are no active port maps.')));
return E('div', { 'class': 'cbi-section cbi-tblsection' }, [
- E('h3', _('Active Port Forwards')), table ]);
+ E('h3', _('Active Service Port Maps')), table ]);
}, o, this);
s = m.section(form.NamedSection, 'config', 'upnpd', _('Service Settings'));
s.addremove = false;
- s.tab('general', _('General Settings'));
+ s.tab('setup', _('Service Setup'));
s.tab('advanced', _('Advanced Settings'));
- o = s.taboption('general', form.Flag, 'enabled', _('Start service'));
- o.rmempty = false;
+ o = s.taboption('setup', form.Flag, 'enabled', _('Start service'),
+ _('Start autonomous port mapping service'));
+ o.rmempty = false;
- s.taboption('general', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1'
- s.taboption('general', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocol')).default = '1'
+ s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1';
- s.taboption('general', form.Flag, 'secure_mode', _('Enable secure mode'),
- _('Allow adding port forwards only to requesting IP addresses')).default = '1'
+ s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols')).default = '1';
- s.taboption('general', form.Flag, 'igdv1', _('Enable UPnP IGDv1 mode'),
- _('Advertise as UPnP IGDv1 device (no IPv6) instead of IGDv2')).default = '0'
+ o = s.taboption('setup', form.Flag, 'igdv1', _('UPnP IGDv1 compatibility mode'),
+ _('Advertise as IGDv1 (IPv4 only) device instead of IGDv2'));
+ o.default = '1';
+ o.rmempty = false;
+ o.depends('enable_upnp', '1');
- s.taboption('general', form.Flag, 'log_output', _('Enable additional logging'),
- _('Puts extra debugging information into the system log'))
+ o = s.taboption('setup', form.Value, 'download', _('Download speed'),
+ _('Report maximum download speed in kByte/s'));
+ o.depends('enable_upnp', '1');
- s.taboption('general', form.Value, 'download', _('Download speed'),
- _('Value in KByte/s, informational only')).rmempty = true
+ o = s.taboption('setup', form.Value, 'upload', _('Upload speed'),
+ _('Report maximum upload speed in kByte/s'));
+ o.depends('enable_upnp', '1');
- s.taboption('general', form.Value, 'upload', _('Upload speed'),
- _('Value in KByte/s, informational only')).rmempty = true
+ s.taboption('advanced', form.Flag, 'use_stun', _('Use %s', 'Use %s (%s = STUN)').format('<a href="https://en.wikipedia.org/wiki/STUN" target="_blank" rel="noreferrer"><abbr title="Session Traversal Utilities for NAT">STUN</abbr></a>'),
+ _('To detect the public IPv4 address for unrestricted full-cone/one-to-one NATs'));
- o = s.taboption('general', form.Value, 'port', _('Port'))
- o.datatype = 'port'
- o.default = 5000
+ o = s.taboption('advanced', form.Value, 'stun_host', _('STUN Host'));
+ o.depends('use_stun', '1');
+ o.datatype = 'host';
- s.taboption('advanced', form.Flag, 'system_uptime', _('Report system instead of service uptime')).default = '1'
+ o = s.taboption('advanced', form.Value, 'stun_port', _('STUN Port'));
+ o.depends('use_stun', '1');
+ o.datatype = 'port';
+ o.placeholder = '3478';
- s.taboption('advanced', form.Value, 'uuid', _('Device UUID'))
- s.taboption('advanced', form.Value, 'serial_number', _('Announced serial number'))
- s.taboption('advanced', form.Value, 'model_number', _('Announced model number'))
+ o = s.taboption('advanced', form.Flag, 'secure_mode', _('Enable secure mode'),
+ _('Allow adding port maps for requesting IP addresses only'));
+ o.default = '1';
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'notify_interval', _('Notify interval'))
- o.datatype = 'uinteger'
- o.placeholder = 30
+ 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>'));
+ o.datatype = 'uinteger';
+ o.placeholder = '900';
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'clean_ruleset_threshold', _('Clean rules threshold'))
- o.datatype = 'uinteger'
- o.placeholder = 20
+ o = s.taboption('advanced', form.Value, 'port', _('SOAP/HTTP port'));
+ o.datatype = 'port';
+ o.placeholder = '5000';
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'clean_ruleset_interval', _('Clean rules interval'))
- o.datatype = 'uinteger'
- o.placeholder = 600
+ o = s.taboption('advanced', form.Value, 'presentation_url', _('Presentation URL'),
+ _('Report custom router web interface (presentation) URL'));
+ o.placeholder = 'http://192.168.1.1/';
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'presentation_url', _('Presentation URL'))
- o.placeholder = 'http://192.168.1.1/'
+ o = s.taboption('advanced', form.Value, 'uuid', _('Device UUID'));
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('Service lease file'))
- o.placeholder = '/var/run/miniupnpd.leases'
+ o = s.taboption('advanced', form.Value, 'model_number', _('Announced model number'));
+ o.depends('enable_upnp', '1');
- s.taboption('advanced', form.Flag, 'use_stun', _('Use STUN'))
+ o = s.taboption('advanced', form.Value, 'serial_number', _('Announced serial number'));
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'stun_host', _('STUN Host'))
- o.depends('use_stun', '1');
- o.datatype = 'host'
+ o = s.taboption('advanced', form.Flag, 'system_uptime', _('Report system instead of service uptime'));
+ o.default = '1';
+ o.depends('enable_upnp', '1');
- o = s.taboption('advanced', form.Value, 'stun_port', _('STUN Port'))
- o.depends('use_stun', '1');
- o.datatype = 'port'
- o.placeholder = '0-65535'
+ s.taboption('advanced', form.Flag, 'log_output', _('Enable additional logging'),
+ _('Puts extra debugging information into the system log'));
- s = m.section(form.GridSection, 'perm_rule', _('Service ACLs'),
- _('ACLs specify which external ports can be forwarded to which client addresses and ports, IPv6 always allowed.'))
+ o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('Service lease file'));
+ o.placeholder = '/var/run/miniupnpd.leases';
- s.sortable = true
- s.anonymous = true
- s.addremove = true
+ s = m.section(form.GridSection, 'perm_rule', _('Service Access Control List'),
+ _('ACL specify which client addresses and ports can be mapped, IPv6 always allowed.'));
+ s.sortable = true;
+ s.anonymous = true;
+ s.addremove = true;
- s.option(form.Value, 'comment', _('Comment'))
+ s.option(form.Value, 'comment', _('Comment'));
- o = s.option(form.Value, 'ext_ports', _('External Port'))
- o.datatype = 'portrange'
- o.placeholder = '0-65535'
+ o = s.option(form.Value, 'int_addr', _('Client Address'));
+ o.datatype = 'ip4addr';
+ o.placeholder = '0.0.0.0/0';
- o = s.option(form.Value, 'int_addr', _('Client Address'))
- o.datatype = 'ip4addr'
- o.placeholder = '0.0.0.0/0'
+ o = s.option(form.Value, 'int_ports', _('Client Port'));
+ o.datatype = 'portrange';
+ o.placeholder = '1-65535';
- o = s.option(form.Value, 'int_ports', _('Client Port'))
- o.datatype = 'portrange'
- o.placeholder = '0-65535'
+ o = s.option(form.Value, 'ext_ports', _('External Port'));
+ o.datatype = 'portrange';
+ o.placeholder = '1-65535';
- o = s.option(form.ListValue, 'action', _('Action'))
+ o = s.option(form.ListValue, 'action', _('Action'));
o.value('allow', _('Allow'));
o.value('deny', _('Deny'));