Added Restart Device functionality.

Added device status to Fatal Message modal.
Added auto-reconnect to Fatal Message modal.
This commit is contained in:
Gunther Brunner
2014-06-19 21:13:20 +09:00
parent 694d621794
commit aebeb4d357
5 changed files with 47 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
module.exports = function ($scope, gettext, $filter) {
$scope.reboot = function (device) {
$scope.reboot = function () {
var config = {
rebootEnabled: true
}
@@ -8,8 +8,9 @@ module.exports = function ($scope, gettext, $filter) {
if (config.rebootEnabled) {
if (confirm($filter('translate')(
gettext('Are you sure you want to reboot this device? \nThe device will be unavailable for a moment.')))) {
console.log('reboot')
$scope.control.reboot().then(function (result) {
console.error(result)
})
}
}
}