def post(self, op):
if op == 'shutdown':
powerctl.shut_down()
-
- elif op == 'reboot':
- powerctl.reboot()
class VersionHandler(BaseHandler):
(r'^/movie/(?P<camera_id>\d+)/(?P<op>list)/?$', handlers.MovieHandler),
(r'^/movie/(?P<camera_id>\d+)/(?P<op>download|preview)/(?P<filename>.+)/?$', handlers.MovieHandler),
(r'^/update/?$', handlers.UpdateHandler),
- (r'^/power/(?P<op>shutdown|reboot)/?$', handlers.PowerHandler),
+ (r'^/power/(?P<op>shutdown)/?$', handlers.PowerHandler),
(r'^/version/?$', handlers.VersionHandler),
(r'^.*$', handlers.NotFoundHandler),
],
}
div.update-button,
-div.shut-down-button,
-div.reboot-button {
+div.shut-down-button {
position: relative;
height: 1.5em;
line-height: 1.5em;
text-align: center;
margin: 2px 0px;
color: white;
- font-size: 1em;
+ font-size: 0.9em;
border-radius: 3px;
transition: all 0.1s linear;
+ width: 7em;
}
div.update-button {
- width: 4em;
background: #317CAD;
}
div.shut-down-button {
- width: 8em;
- background: #c0392b;
-}
-
-div.reboot-button {
- width: 8em;
background: #c0392b;
}
background: #D43F2F;
}
-div.reboot-button:HOVER {
- background: #D43F2F;
-}
-
div.update-button:ACTIVE {
background: #317CAD;
}
background: #B03427;
}
-div.reboot-button:ACTIVE {
- background: #B03427;
-}
-
div.settings-top-bar.open #cameraSelect {
display: inline;
}
doShutDown();
});
- /* reboot button */
- $('#rebootButton').click(function () {
- doReboot();
- });
-
/* whenever the window is resized,
* if a modal dialog is visible, it should be repositioned */
$(window).resize(updateModalDialogPosition);
});
}
-function doReboot() {
- runConfirmDialog('Really reboot?', function () {
- ajax('POST', '/power/reboot/');
- });
-}
-
function doRemCamera() {
if (Object.keys(pushConfigs).length) {
return runAlertDialog('Please apply the modified settings first!');
<td class="settings-item-value"><div class="button shut-down-button" id="shutDownButton">Shut Down</div></td>
<td><span class="help-mark" title="shuts down the system">?</span></td>
</tr>
- <tr class="settings-item advanced-setting{% if not enable_reboot %} hidden{% endif %}">
- <td class="settings-item-label"></td>
- <td class="settings-item-value"><div class="button reboot-button" id="rebootButton">Reboot</div></td>
- <td><span class="help-mark" title="reboots the system">?</span></td>
- </tr>
</table>
<div class="settings-section-title advanced-setting{% if not wpa_supplicant %} hidden{% endif %}"><input type="checkbox" class="styled section wifi" id="wifiSwitch">Wireless Network</div>