Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ return baseclass.extend({
},

render: function(data) {

var table = E('table', { 'class': 'table', 'id': 'upnp_status_table' }, [
E('tr', { 'class': 'tr table-titles' }, [
E('th', { 'class': 'th' }, _('Client Name')),
Expand All @@ -50,6 +51,7 @@ return baseclass.extend({
]);

var rules = Array.isArray(data[0].rules) ? data[0].rules : [];

var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
Expand All @@ -64,7 +66,9 @@ return baseclass.extend({
}, [ _('Delete') ])
];
});

cbi_update_table(table, rows, E('em', _('There are no active port maps.')));

return table;
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ return view.extend({
},

poll_status: function(nodes, data) {

var rules = Array.isArray(data[0].rules) ? data[0].rules : [];

var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
Expand All @@ -60,21 +62,18 @@ return view.extend({
}, [ _('Delete') ])
];
});

cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active port maps.')));

return;
},

render: function(data) {

var m, s, o;

var protocols = '%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>');
m = new form.Map('upnpd', [_('UPnP IGD & PCP/NAT-PMP Service')],
_('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(protocols)
);
_('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');

Expand All @@ -92,6 +91,7 @@ return view.extend({
]);

var rules = Array.isArray(data[0].rules) ? data[0].rules : [];

var rows = rules.map(function(rule) {
return [
rule.host_hint || _('Unknown'),
Expand All @@ -106,7 +106,9 @@ return view.extend({
}, [ _('Delete') ])
];
});

cbi_update_table(table, rows, E('em', _('There are no active port maps.')));

return E('div', { 'class': 'cbi-section cbi-tblsection' }, [
E('h3', _('Active Service Port Maps')), table ]);
}, o, this);
Expand All @@ -120,11 +122,9 @@ return view.extend({
_('Start autonomous port mapping service'));
o.rmempty = false;

s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol'))
s.default = '1';
s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1';

s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols'))
s.default = '1';
s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols')).default = '1';

o = s.taboption('setup', form.Flag, 'igdv1', _('UPnP IGDv1 compatibility mode'),
_('Advertise as IGDv1 (IPv4 only) device instead of IGDv2'));
Expand All @@ -140,15 +140,14 @@ return view.extend({
_('Report maximum upload speed in kByte/s'));
o.depends('enable_upnp', '1');

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>'),
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('advanced', form.Value, 'stun_host', _('STUN Host'));
o = s.taboption('advanced', form.Value, 'stun_host', _('STUN host'));
o.depends('use_stun', '1');
o.datatype = 'host';

o = s.taboption('advanced', form.Value, 'stun_port', _('STUN Port'));
o = s.taboption('advanced', form.Value, 'stun_port', _('STUN port'));
o.depends('use_stun', '1');
o.datatype = 'port';
o.placeholder = '3478';
Expand All @@ -159,8 +158,7 @@ return view.extend({
o.depends('enable_upnp', '1');

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>'));
_('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');
Expand Down
7 changes: 2 additions & 5 deletions applications/luci-app-upnp/po/ar/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ msgid "SOAP/HTTP port"
msgstr "المنفذ"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down Expand Up @@ -251,6 +251,3 @@ msgstr ""
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr ""

#~ msgid "Host"
#~ msgstr "ضيف"
7 changes: 2 additions & 5 deletions applications/luci-app-upnp/po/bg/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ msgid "SOAP/HTTP port"
msgstr "Порт"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down Expand Up @@ -250,6 +250,3 @@ msgstr ""
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr ""

#~ msgid "Host"
#~ msgstr "Хост"
4 changes: 2 additions & 2 deletions applications/luci-app-upnp/po/bn_BD/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ msgid "SOAP/HTTP port"
msgstr "পোর্ট"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down
18 changes: 3 additions & 15 deletions applications/luci-app-upnp/po/ca/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ msgid ""
"allowed."
msgstr ""
"Els ACL especifiquen quins ports externs es poden redirigir a quines "
"adreces i ports interns"
"adreces i ports interns, IPv6 always allowed."

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:215
msgid "Action"
Expand Down Expand Up @@ -177,11 +177,11 @@ msgid "SOAP/HTTP port"
msgstr "SOAP/HTTP port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down Expand Up @@ -256,15 +256,3 @@ msgstr "Enllaç de pujada"
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr ""

#~ msgid "Clean rules interval"
#~ msgstr "Interval de neteja de regles"

#~ msgid "Clean rules threshold"
#~ msgstr "Llindar de neteja de regles"

#~ msgid "Host"
#~ msgstr "Amfitrió"

#~ msgid "Value in KByte/s, informational only"
#~ msgstr "Valor en KByte/s, només per informació"
22 changes: 5 additions & 17 deletions applications/luci-app-upnp/po/cs/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ msgid ""
"allowed."
msgstr ""
"ACL stanovují, které vnější porty by měly být přesměrovány na které "
"vnitřní adresy a porty"
"vnitřní adresy a porty, IPv6 always allowed."


#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:215
Expand Down Expand Up @@ -56,7 +56,7 @@ msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:156
msgid "Allow adding port maps for requesting IP addresses only"
msgstr "Povolit přesměrování pouze na dotazující ip adresy"
msgstr "Povolit přesměrování pouze na dotazující IP adresy"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:179
msgid "Announced model number"
Expand Down Expand Up @@ -174,12 +174,12 @@ msgid "SOAP/HTTP port"
msgstr "SOAP/HTTP port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr "STUN Hostitel"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgstr "STUN Port"
msgid "STUN port"
msgstr "STUN port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
msgid "Service Access Control List"
Expand Down Expand Up @@ -252,15 +252,3 @@ msgstr "Upload speed"
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr "Použít %s"

#~ msgid "Clean rules interval"
#~ msgstr "Interval čištění pravidel"

#~ msgid "Clean rules threshold"
#~ msgstr "Práh čištění pravidel"

#~ msgid "Host"
#~ msgstr "Hostitel"

#~ msgid "Value in KByte/s, informational only"
#~ msgstr "Pouze informační hodnoty (v KByte/s)"
22 changes: 5 additions & 17 deletions applications/luci-app-upnp/po/da/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ msgid ""
"allowed."
msgstr ""
"ACL'er angiver, hvilke eksterne porte der kan omdirigeres til hvilke "
"interne adresser og porte"
"interne adresser og porte, IPv6 always allowed."

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:215
msgid "Action"
Expand Down Expand Up @@ -57,7 +57,7 @@ msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:156
msgid "Allow adding port maps for requesting IP addresses only"
msgstr "Tillad kun at tilføje viderestillinger til ip-adresser, der anmoder om"
msgstr "Tillad kun at tilføje viderestillinger til IP-adresser, der anmoder om"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:179
msgid "Announced model number"
Expand Down Expand Up @@ -175,12 +175,12 @@ msgid "SOAP/HTTP port"
msgstr "SOAP/HTTP port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr "STUN vært"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgstr "STUN Port"
msgid "STUN port"
msgstr "STUN port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
msgid "Service Access Control List"
Expand Down Expand Up @@ -254,15 +254,3 @@ msgstr "Upload speed"
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr "Brug %s"

#~ msgid "Clean rules interval"
#~ msgstr "Interval for rene regler"

#~ msgid "Clean rules threshold"
#~ msgstr "Tærskel for rene regler"

#~ msgid "Host"
#~ msgstr "Vært"

#~ msgid "Value in KByte/s, informational only"
#~ msgstr "Værdi i KByte/s, kun til information"
20 changes: 4 additions & 16 deletions applications/luci-app-upnp/po/de/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ msgid ""
"ACL specify which client addresses and ports can be mapped, IPv6 always "
"allowed."
msgstr ""
"ACLs definieren, welche externen Ports zu welchen internen Adressen und "
"Ports weitergeleitet werden dürfen"
"ACL definieren, welche externen Ports zu welchen internen Adressen und "
"Ports weitergeleitet werden dürfen, IPv6 always allowed."

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:215
msgid "Action"
Expand Down Expand Up @@ -175,11 +175,11 @@ msgid "SOAP/HTTP port"
msgstr "SOAP/HTTP port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr "STUN-Host"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr "STUN-Port"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down Expand Up @@ -254,15 +254,3 @@ msgstr "Upload speed"
msgctxt "Use %s (%s = STUN)"
msgid "Use %s"
msgstr "%s verwenden"

#~ msgid "Clean rules interval"
#~ msgstr "Aufräumintervall für Weiterleitungen"

#~ msgid "Clean rules threshold"
#~ msgstr "Aufräumschwellenwert für Weiterleitungen"

#~ msgid "Host"
#~ msgstr "Host"

#~ msgid "Value in KByte/s, informational only"
#~ msgstr "Wert in Kilobyte/s, nur informativ"
4 changes: 2 additions & 2 deletions applications/luci-app-upnp/po/el/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ msgid "SOAP/HTTP port"
msgstr "Θύρα"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "STUN Host"
msgid "STUN host"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "STUN Port"
msgid "STUN port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:195
Expand Down
Loading