'require form';
'require tools.widgets as widgets';
-var callInitList, callInitAction, callTimezone,
+var callRcList, callRcInit, callTimezone,
callGetLocaltime, callSetLocaltime, CBILocalTime;
-callInitList = rpc.declare({
- object: 'luci',
- method: 'getInitList',
+callRcList = rpc.declare({
+ object: 'rc',
+ method: 'list',
params: [ 'name' ],
expect: { '': {} },
filter: function(res) {
}
});
-callInitAction = rpc.declare({
- object: 'luci',
- method: 'setInitAction',
+callRcInit = rpc.declare({
+ object: 'rc',
+ method: 'init',
params: [ 'name', 'action' ],
expect: { result: false }
});
this.ntpd_support ? E('button', {
'class': 'cbi-button cbi-button-apply',
'click': ui.createHandlerFn(this, function() {
- return callInitAction('sysntpd', 'restart');
+ return callRcInit('sysntpd', 'restart');
}),
'disabled': (this.readonly != null) ? this.readonly : this.map.readonly
}, _('Sync with NTP-Server')) : ''
return view.extend({
load: function() {
return Promise.all([
- callInitList('sysntpd'),
+ callRcList('sysntpd'),
callTimezone(),
callGetLocaltime(),
uci.load('luci'),
else
uci.unset('system', 'ntp', 'enabled');
- return callInitAction('sysntpd', 'enable');
+ return callRcInit('sysntpd', 'enable');
};
o.load = function(section_id) {
return (ntpd_enabled == 1 &&
o.default = o.enabled;
o.depends('enabled', '1');
- o = s.taboption('timesync', form.DynamicList, 'server', _('NTP server candidates'));
+ o = s.taboption('timesync', form.DynamicList, 'server', _('NTP server candidates'),
+ _('List of upstream NTP server candidates with which to synchronize.'));
o.datatype = 'host(0)';
o.ucisection = 'ntp';
o.depends('enabled', '1');