5 return L
.Class
.extend({
6 title
: _('Dynamic DNS'),
8 callDDnsGetServicesStatus
: rpc
.declare({
10 method
: 'get_services_status',
16 this.callDDnsGetServicesStatus(),
21 render: function(data
) {
22 var services
= data
[0];
24 var table
= E('div', { 'class': 'table' }, [
25 E('div', { 'class': 'tr table-titles' }, [
26 E('div', { 'class': 'th' }, _('Configuration')),
27 E('div', { 'class': 'th' }, _('Next Update')),
28 E('div', { 'class': 'th' }, _('Lookup Hostname')),
29 E('div', { 'class': 'th' }, _('Registered IP')),
30 E('div', { 'class': 'th' }, _('Network'))
34 cbi_update_table(table
, Object
.keys(services
).map(function(key
, index
) {
37 services
[key
].next_update
? _(services
[key
].next_update
) : _('Unknown'),
38 uci
.get('ddns',key
,'lookup_host'),
39 services
[key
].ip
? services
[key
].ip
: _('No Data'),
40 (uci
.get('ddns',key
,'use_ipv6') == '1' ? 'IPv6' : 'IPv4') + ' / ' + uci
.get('ddns',key
,'interface')
42 }), E('em', _('There is no service configured.')));