mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
removing old code
This commit is contained in:
parent
cf54fe27e6
commit
4bb2234019
@ -214,11 +214,6 @@ export default
|
||||
}
|
||||
UpdateDOM({ scope: scope });
|
||||
});
|
||||
// Unbind $rootScope socket event binding(s) so that they don't get triggered
|
||||
// in another instance of this controller
|
||||
// scope.$on('$destroy', function() {
|
||||
// $rootScope.socket.removeAllListeners("job_events-" + job_id);
|
||||
// });
|
||||
}
|
||||
openSocket();
|
||||
|
||||
|
||||
@ -22,16 +22,17 @@ export default
|
||||
});
|
||||
|
||||
self.socket.onopen = function () {
|
||||
$log.debug("Websocket connection opened");
|
||||
$log.debug("Websocket connection opened.");
|
||||
$rootScope.socketPromise.resolve();
|
||||
};
|
||||
|
||||
self.socket.onerror = function (error) {
|
||||
$log.debug('Error Logged: ' + error); //log errors
|
||||
$log.debug('Websocket Error Logged: ' + error); //log errors
|
||||
};
|
||||
|
||||
self.socket.onclose = function () {
|
||||
$log.debug('Websocket Disconnected.');
|
||||
self.socket.onclose = function (error, obj) {
|
||||
$log.debug('Websocket Disconnected: '+error);
|
||||
self.checkStatus();
|
||||
};
|
||||
|
||||
self.socket.onmessage = function (e) {
|
||||
@ -57,12 +58,11 @@ export default
|
||||
else {
|
||||
// The naming scheme is "ws" then a
|
||||
// dash (-) and the group_name.
|
||||
// ex: 'ws-jobs'
|
||||
// ex: 'ws-jobs'
|
||||
str = `ws-${data.group_name}`;
|
||||
}
|
||||
$rootScope.$emit(str, data);
|
||||
return self.socket;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@ -159,14 +159,6 @@ export default
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
removeAllListeners: function (eventName) {
|
||||
var self = this;
|
||||
if(self){
|
||||
if(self.socket){
|
||||
self.socket.removeEventListener(eventName);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}];
|
||||
|
||||
@ -28,11 +28,6 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
|
||||
event_queue++;
|
||||
}
|
||||
});
|
||||
// Unbind $rootScope socket event binding(s) so that they don't get triggered
|
||||
// in another instance of this controller
|
||||
// $scope.$on('$destroy', function() {
|
||||
// $rootScope.socket.removeAllListeners("job_events-" + job_id);
|
||||
// });
|
||||
}
|
||||
if ($state.current.name === 'adHocJobStdout') {
|
||||
$log.debug("socket watching on ad_hoc_command_events-" + job_id);
|
||||
@ -42,11 +37,6 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
|
||||
event_queue++;
|
||||
}
|
||||
});
|
||||
// Unbind $rootScope socket event binding(s) so that they don't get triggered
|
||||
// in another instance of this controller
|
||||
// $scope.$on('$destroy', function() {
|
||||
// $rootScope.adhoc_event_socket.removeAllListeners("ad_hoc_command_events-" + job_id);
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user