mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-27 19:25:13 +02:00
Added basic fatal message functionality.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module.exports = function ($scope, gettext, $routeParams, $location, DeviceService, GroupService, ControlService) {
|
||||
module.exports = function ($scope, gettext, $routeParams, $location, DeviceService, GroupService, ControlService, FatalMessageService) {
|
||||
|
||||
var sharedTabs = [
|
||||
{
|
||||
@@ -122,4 +122,15 @@ module.exports = function ($scope, gettext, $routeParams, $location, DeviceServi
|
||||
.catch(function () {
|
||||
$location.path('/')
|
||||
})
|
||||
|
||||
|
||||
$scope.$watch('device.state', function (newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
if (oldValue === 'using') {
|
||||
FatalMessageService.open(angular.copy($scope.device))
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user