0a144655590a6235fe39b797f0efd6870e3c4163
7 var callReboot
= rpc
.declare({
10 expect
: { result
: false }
13 return L
.view
.extend({
18 render: function(changes
) {
21 E('p', {}, _('Reboots the operating system of your device'))
24 for (var config
in (changes
|| {})) {
25 body
.appendChild(E('p', { 'class': 'alert-message warning' },
26 _('Warning: There are unsaved changes that will get lost on reboot!')));
30 body
.appendChild(E('hr'));
31 body
.appendChild(E('button', {
32 'class': 'cbi-button cbi-button-action important',
33 'click': ui
.createHandlerFn(this, 'handleReboot')
34 }, _('Perform reboot')));
39 handleReboot: function(ev
) {
40 return callReboot().then(function() {
41 L
.ui
.showModal(_('Rebooting…'), [
42 E('p', { 'class': 'spinning' }, _('Waiting for device...'))
45 window
.setTimeout(function() {
46 L
.ui
.showModal(_('Rebooting…'), [
47 E('p', { 'class': 'spinning alert-message warning' },
48 _('Device unreachable! Still waiting for device...'))
52 L
.ui
.awaitReconnect();
56 handleSaveApply
: null,