commit 29/01/2026
This commit is contained in:
@@ -50,6 +50,10 @@
|
||||
margin-top: 1rem!important;
|
||||
}
|
||||
|
||||
.me-1 {
|
||||
margin-right: .25rem!important;
|
||||
}
|
||||
|
||||
.me-2 {
|
||||
margin-right: .5rem!important;
|
||||
}
|
||||
@@ -78,6 +82,10 @@
|
||||
margin-bottom: auto!important;
|
||||
}
|
||||
|
||||
.ms-1 {
|
||||
margin-left: .25rem!important;
|
||||
}
|
||||
|
||||
@media (min-width:768px) {
|
||||
.me-md-auto {
|
||||
margin-right: auto!important;
|
||||
|
||||
@@ -54,6 +54,8 @@ function reloadLogs(APIURL = "Log/", date, filter) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
console.log("log.js ready");
|
||||
let selectedlogdate = "";
|
||||
@@ -100,4 +102,6 @@ $(document).ready(function () {
|
||||
$('#btnExport').off('click').on('click', function () {
|
||||
DoExport(APIURL, "log.xlsx", { date: selectedlogdate, filter: logfilter });
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -49,7 +49,7 @@ function getCardByIndex(index) {
|
||||
* @param {StreamerOutputData[]} values
|
||||
*/
|
||||
function UpdateStreamerCard(values) {
|
||||
|
||||
|
||||
function setProgress(index, $bar, value, max = 100) {
|
||||
const v = Number(value ?? 0);
|
||||
const pct = Math.max(0, Math.min(100, Math.round((v / max) * 100)));
|
||||
@@ -304,6 +304,14 @@ function LiveAudioCommand(command, bz, cbOK = null, cbFail = null) {
|
||||
window.streamws = null;
|
||||
window.mediasource = null;
|
||||
|
||||
/**
|
||||
* handler for ws_connected, ws_disconnected, ws_message events
|
||||
*/
|
||||
|
||||
ws_connected_handler;
|
||||
ws_disconnected_handler;
|
||||
ws_message_handler;
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
@@ -351,7 +359,7 @@ $(document).ready(function () {
|
||||
if (event.data instanceof ArrayBuffer) {
|
||||
const chunk = new Uint8Array(event.data);
|
||||
sourceBuffer.appendBuffer(chunk);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -426,50 +434,64 @@ $(document).ready(function () {
|
||||
|
||||
runIntervalJob();
|
||||
|
||||
window.addEventListener('ws_connected', () => {
|
||||
console.log("overview.js ws_connected event triggered");
|
||||
runIntervalJob();
|
||||
});
|
||||
if (!ws_connected_handler) {
|
||||
ws_connected_handler = function () {
|
||||
console.log("overview.js ws_connected event triggered");
|
||||
runIntervalJob();
|
||||
};
|
||||
}
|
||||
|
||||
window.addEventListener('ws_disconnected', () => {
|
||||
console.log("overview.js ws_disconnected event triggered");
|
||||
if (intervaljob1) clearInterval(intervaljob1);
|
||||
if (intervaljob2) clearInterval(intervaljob2);
|
||||
intervaljob1 = null;
|
||||
intervaljob2 = null;
|
||||
});
|
||||
window.addEventListener('ws_message', (event) => {
|
||||
let rep = event.detail;
|
||||
let cmd = rep.reply;
|
||||
let data = rep.data;
|
||||
if (cmd && cmd.length > 0) {
|
||||
switch (cmd) {
|
||||
case "getPagingQueue":
|
||||
let pq = JSON.parse(data);
|
||||
window.PagingQueue = [];
|
||||
if (Array.isArray(pq) && pq.length > 0) {
|
||||
window.PagingQueue.push(...pq);
|
||||
}
|
||||
fill_pagingqueuetablebody(window.PagingQueue);
|
||||
break;
|
||||
case "getAASQueue":
|
||||
let aq = JSON.parse(data);
|
||||
window.QueueTable = [];
|
||||
if (Array.isArray(aq) && aq.length > 0) {
|
||||
window.QueueTable.push(...aq);
|
||||
}
|
||||
fill_automaticqueuetablebody(window.QueueTable);
|
||||
break;
|
||||
case "getStreamerOutputs":
|
||||
/**
|
||||
* @type {StreamerOutputData[]}
|
||||
*/
|
||||
let so = JSON.parse(data);
|
||||
UpdateStreamerCard(so);
|
||||
break;
|
||||
if (!ws_disconnected_handler) {
|
||||
ws_disconnected_handler = function () {
|
||||
console.log("overview.js ws_disconnected event triggered");
|
||||
if (intervaljob1) clearInterval(intervaljob1);
|
||||
if (intervaljob2) clearInterval(intervaljob2);
|
||||
intervaljob1 = null;
|
||||
intervaljob2 = null;
|
||||
};
|
||||
}
|
||||
|
||||
if (!ws_message_handler) {
|
||||
ws_message_handler = function (event) {
|
||||
let rep = event.detail;
|
||||
let cmd = rep.reply;
|
||||
let data = rep.data;
|
||||
if (cmd && cmd.length > 0) {
|
||||
switch (cmd) {
|
||||
case "getPagingQueue":
|
||||
let pq = JSON.parse(data);
|
||||
window.PagingQueue = [];
|
||||
if (Array.isArray(pq) && pq.length > 0) {
|
||||
window.PagingQueue.push(...pq);
|
||||
}
|
||||
fill_pagingqueuetablebody(window.PagingQueue);
|
||||
break;
|
||||
case "getAASQueue":
|
||||
let aq = JSON.parse(data);
|
||||
window.QueueTable = [];
|
||||
if (Array.isArray(aq) && aq.length > 0) {
|
||||
window.QueueTable.push(...aq);
|
||||
}
|
||||
fill_automaticqueuetablebody(window.QueueTable);
|
||||
break;
|
||||
case "getStreamerOutputs":
|
||||
/**
|
||||
* @type {StreamerOutputData[]}
|
||||
*/
|
||||
let so = JSON.parse(data);
|
||||
UpdateStreamerCard(so);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
window.removeEventListener('ws_connected', ws_connected_handler);
|
||||
window.removeEventListener('ws_disconnected', ws_disconnected_handler);
|
||||
window.removeEventListener('ws_message', ws_message_handler);
|
||||
window.addEventListener('ws_connected', ws_connected_handler);
|
||||
window.addEventListener('ws_disconnected', ws_disconnected_handler);
|
||||
window.addEventListener('ws_message', ws_message_handler);
|
||||
|
||||
$(window).on('beforeunload', function () {
|
||||
console.log("overview.js beforeunload event triggered");
|
||||
|
||||
@@ -217,6 +217,14 @@ $(document).ready(function () {
|
||||
</div>`;
|
||||
$('#citylist').append(row);
|
||||
});
|
||||
$('#city_selectall').off('click').on('click', function () {
|
||||
// select all checkboxes
|
||||
$('#citylist input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#city_clearall').off('click').on('click', function () {
|
||||
// deselect all checkboxes
|
||||
$('#citylist input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
}
|
||||
|
||||
function fill_airlinelist() {
|
||||
@@ -231,6 +239,14 @@ $(document).ready(function () {
|
||||
</div>`;
|
||||
$('#airlinelist').append(row);
|
||||
});
|
||||
$('#airline_selectall').off('click').on('click', function () {
|
||||
// select all checkboxes
|
||||
$('#airlinelist input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#airline_clearall').off('click').on('click', function () {
|
||||
// deselect all checkboxes
|
||||
$('#airlinelist input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
}
|
||||
|
||||
// broadcast zone selection modal elements
|
||||
@@ -246,6 +262,14 @@ $(document).ready(function () {
|
||||
</div>`;
|
||||
$('#broadcastzonelist').append(row);
|
||||
});
|
||||
$('#bzone_selectall').off('click').on('click', function () {
|
||||
// select all checkboxes
|
||||
$('#broadcastzonelist input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#bzone_clearall').off('click').on('click', function () {
|
||||
// deselect all checkboxes
|
||||
$('#broadcastzonelist input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -263,6 +287,14 @@ $(document).ready(function () {
|
||||
</div>`;
|
||||
$('#messagebanklist').append(row);
|
||||
});
|
||||
$('#mbank_selectall').off('click').on('click', function () {
|
||||
// select all checkboxes
|
||||
$('#messagebanklist input[type=checkbox]').prop('checked', true);
|
||||
});
|
||||
$('#mbank_clearall').off('click').on('click', function () {
|
||||
// deselect all checkboxes
|
||||
$('#messagebanklist input[type=checkbox]').prop('checked', false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user