mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
removing old code
This commit is contained in:
@@ -214,11 +214,6 @@ export default
|
|||||||
}
|
}
|
||||||
UpdateDOM({ scope: scope });
|
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();
|
openSocket();
|
||||||
|
|
||||||
|
|||||||
@@ -22,16 +22,17 @@ export default
|
|||||||
});
|
});
|
||||||
|
|
||||||
self.socket.onopen = function () {
|
self.socket.onopen = function () {
|
||||||
$log.debug("Websocket connection opened");
|
$log.debug("Websocket connection opened.");
|
||||||
$rootScope.socketPromise.resolve();
|
$rootScope.socketPromise.resolve();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.socket.onerror = function (error) {
|
self.socket.onerror = function (error) {
|
||||||
$log.debug('Error Logged: ' + error); //log errors
|
$log.debug('Websocket Error Logged: ' + error); //log errors
|
||||||
};
|
};
|
||||||
|
|
||||||
self.socket.onclose = function () {
|
self.socket.onclose = function (error, obj) {
|
||||||
$log.debug('Websocket Disconnected.');
|
$log.debug('Websocket Disconnected: '+error);
|
||||||
|
self.checkStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.socket.onmessage = function (e) {
|
self.socket.onmessage = function (e) {
|
||||||
@@ -57,12 +58,11 @@ export default
|
|||||||
else {
|
else {
|
||||||
// The naming scheme is "ws" then a
|
// The naming scheme is "ws" then a
|
||||||
// dash (-) and the group_name.
|
// dash (-) and the group_name.
|
||||||
// ex: 'ws-jobs'
|
// ex: 'ws-jobs'
|
||||||
str = `ws-${data.group_name}`;
|
str = `ws-${data.group_name}`;
|
||||||
}
|
}
|
||||||
$rootScope.$emit(str, data);
|
$rootScope.$emit(str, data);
|
||||||
return self.socket;
|
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++;
|
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') {
|
if ($state.current.name === 'adHocJobStdout') {
|
||||||
$log.debug("socket watching on ad_hoc_command_events-" + job_id);
|
$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++;
|
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);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user