mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
19 lines
449 B
JavaScript
19 lines
449 B
JavaScript
module.exports = function ($scope, gettext, $filter) {
|
|
|
|
$scope.reboot = function () {
|
|
var config = {
|
|
rebootEnabled: true
|
|
}
|
|
|
|
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.')))) {
|
|
$scope.control.reboot().then(function (result) {
|
|
console.error(result)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|