mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 08:13:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,47 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require rpc';
|
||||
'require uci';
|
||||
|
||||
return baseclass.extend({
|
||||
title: _('Dynamic DNS'),
|
||||
|
||||
callDDnsGetServicesStatus: rpc.declare({
|
||||
object: 'luci.ddns',
|
||||
method: 'get_services_status',
|
||||
expect: { }
|
||||
}),
|
||||
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
this.callDDnsGetServicesStatus(),
|
||||
uci.load('ddns')
|
||||
]);
|
||||
},
|
||||
|
||||
render: function(data) {
|
||||
var services = data[0];
|
||||
|
||||
var table = E('table', { 'class': 'table' }, [
|
||||
E('tr', { 'class': 'tr table-titles' }, [
|
||||
E('th', { 'class': 'th' }, _('Configuration')),
|
||||
E('th', { 'class': 'th' }, _('Next Update')),
|
||||
E('th', { 'class': 'th' }, _('Lookup Hostname')),
|
||||
E('th', { 'class': 'th' }, _('Registered IP')),
|
||||
E('th', { 'class': 'th' }, _('Network'))
|
||||
])
|
||||
]);
|
||||
|
||||
cbi_update_table(table, Object.keys(services).map(function(key, index) {
|
||||
return [
|
||||
key,
|
||||
services[key].next_update ? _(services[key].next_update) : _('Unknown'),
|
||||
uci.get('ddns',key,'lookup_host'),
|
||||
services[key].ip ? services[key].ip : _('No Data'),
|
||||
(uci.get('ddns',key,'use_ipv6') == '1' ? 'IPv6' : 'IPv4') + ' / ' + uci.get('ddns',key,'interface')
|
||||
];
|
||||
}), E('em', _('There is no service configured.')));
|
||||
|
||||
return E([table]);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user