update Do 30. Apr 12:31:01 CEST 2020
This commit is contained in:
parent
dd2dc48407
commit
372d3c3244
@ -240,15 +240,15 @@ socket.on('connect_error', function (err) {
|
||||
socket.on('io.version', function (server_id) {
|
||||
// TODO: socket.emit(lade client xxx neu)
|
||||
if (client_id != server_id) {
|
||||
$('#waipModal').modal('hide');
|
||||
setTimeout(function () {
|
||||
$('#waipModalTitle').html('ACHTUNG');
|
||||
$('#waipModalBody').html('Neue Server-Version. Seite wird in 10 Sekunden neu geladen!');
|
||||
if ($('#waipModal').hasClass('in')) {
|
||||
$('#waipModal').modal('hide');
|
||||
};
|
||||
$('#waipModal').modal('show');
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 10000);
|
||||
}, 1000);
|
||||
};
|
||||
});
|
||||
|
||||
@ -523,7 +523,7 @@ function calcSpeed(prev, next) {
|
||||
/* ####### Rückmeldung ####### */
|
||||
/* ########################### */
|
||||
|
||||
$('#rueckmeldung').each(function (index) {
|
||||
/*$('#rueckmeldung').each(function (index) {
|
||||
$(this).on("click", function () {
|
||||
$('#responseModal').modal('show');
|
||||
});
|
||||
@ -537,7 +537,7 @@ $('#send_response').on('click', function () {
|
||||
respo.fuehrungskraft = $('#radios_res_fk').prop('checked');
|
||||
respo.atemschutz = $('#cb_res_agt').prop('checked');
|
||||
socket.emit('response', waip_id, respo);
|
||||
});
|
||||
});*/
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,19 +10,12 @@ module.exports = function (io, sql, tw, async, app_cfg) {
|
||||
if (socket_rooms) {
|
||||
socket_rooms.forEach(function (rooms) {
|
||||
// fuer jede Wache(rooms.room) die verbundenen Sockets(Clients) ermitteln und den Einsatz verteilen
|
||||
|
||||
var room_sockets = io.nsps['/waip'].adapter.rooms[rooms.room];//.sockets;
|
||||
console.log(room_sockets);
|
||||
if (typeof room_sockets !== 'undefined'){ // ) {
|
||||
Object.keys(room_sockets.sockets).forEach(function (socket) {
|
||||
console.log(socket);
|
||||
if (typeof socket !== 'undefined') {
|
||||
|
||||
var socket_real = io.of('/waip').connected[socket];
|
||||
console.log(socket_real);
|
||||
waip_verteilen(waip_id, socket_real, rooms.room);
|
||||
var room_sockets = io.nsps['/waip'].adapter.rooms[rooms.room];
|
||||
if (typeof room_sockets !== 'undefined'){
|
||||
Object.keys(room_sockets.sockets).forEach(function (socket_id) {
|
||||
var socket = io.of('/waip').connected[socket_id];
|
||||
waip_verteilen(waip_id, socket, rooms.room);
|
||||
sql.db_log('WAIP', 'Einsatz ' + waip_id + ' wird an ' + socket.id + ' (' + rooms.room + ') gesendet');
|
||||
};
|
||||
});
|
||||
};
|
||||
});
|
||||
@ -260,10 +253,11 @@ module.exports = function (io, sql, tw, async, app_cfg) {
|
||||
if (data) {
|
||||
data.forEach(function (row) {
|
||||
// fuer jede Wache(row.room) die verbundenen Sockets(Clients) ermitteln und Standby senden
|
||||
var room_stockets = io.sockets.adapter.rooms[row.room];
|
||||
if (typeof room_stockets !== 'undefined') {
|
||||
Object.keys(room_stockets).forEach(function (socket) {
|
||||
var room_sockets = io.nsps['/waip'].adapter.rooms[row.room];
|
||||
if (typeof room_sockets !== 'undefined') {
|
||||
Object.keys(room_sockets.sockets).forEach(function (socket_id) {
|
||||
// Standby senden
|
||||
var socket = io.of('/waip').connected[socket_id];
|
||||
sql.db_check_client_waipid(socket.id, waip_id, function (same_id) {
|
||||
if (same_id) {
|
||||
socket.emit('io.standby', null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user