mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Remove socket binding when the scope is destroyed so that we don't make errant GET requests in future instances of this controller.
This commit is contained in:
parent
b657bc684c
commit
4adb65596a
@ -39,6 +39,12 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
|
||||
}
|
||||
});
|
||||
|
||||
// Unbind $rootScope socket event binding(s) so that they don't get triggered
|
||||
// in another instance of this controller
|
||||
$scope.$on('$destroy', function() {
|
||||
$scope.removeJobStatusChange();
|
||||
});
|
||||
|
||||
// Set the parse type so that CodeMirror knows how to display extra params YAML/JSON
|
||||
$scope.parseType = 'yaml';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user