Compare commits
13 Commits
1563e233d6
...
feature-we
| Author | SHA1 | Date | |
|---|---|---|---|
| cdcb02e976 | |||
| 17b4485e69 | |||
| 4d02ab6d07 | |||
| 8bd57f216a | |||
| 8978a0986d | |||
| bc3f5c5691 | |||
| e5d8d8059e | |||
| 1b84ec133b | |||
| 1a6b7de6ec | |||
| 4da5a2fb05 | |||
| 2ca7004b70 | |||
| 2fe4a46e3e | |||
| 4d3dc538bd |
@@ -37,3 +37,52 @@
|
|||||||
--bs-btn-disabled-border-color: #0d6efd;
|
--bs-btn-disabled-border-color: #0d6efd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-4 {
|
||||||
|
margin-top: 1.5rem!important;
|
||||||
|
margin-bottom: 1.5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mt-0 {
|
||||||
|
margin-top: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.me-2 {
|
||||||
|
margin-right: .5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-2 {
|
||||||
|
margin-bottom: .5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-3 {
|
||||||
|
margin-bottom: 1rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-4 {
|
||||||
|
margin-bottom: 1.5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-5 {
|
||||||
|
margin-bottom: 3rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-7 {
|
||||||
|
margin-bottom: 6rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-auto {
|
||||||
|
margin-bottom: auto!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width:768px) {
|
||||||
|
.me-md-auto {
|
||||||
|
margin-right: auto!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width:768px) {
|
||||||
|
.mb-md-0 {
|
||||||
|
margin-bottom: 0!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-login {
|
.btn-login {
|
||||||
border-radius: 20px;
|
border-radius: 8px;
|
||||||
box-shadow: rgba(136, 165, 191, 0.48) 6px 2px 16px 0px, rgba(255, 255, 255, 0.8) -6px -2px 16px 0px;
|
box-shadow: rgba(136, 165, 191, 0.48) 6px 2px 16px 0px, rgba(255, 255, 255, 0.8) -6px -2px 16px 0px;
|
||||||
--bs-btn-hover-bg: #5780f2;
|
--bs-btn-hover-bg: #5780f2;
|
||||||
background-color: #5278e1;
|
background-color: #5278e1;
|
||||||
@@ -277,3 +277,44 @@ table {
|
|||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-login {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 0;
|
||||||
|
color: #3E4C66;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-login {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2E3A59;
|
||||||
|
}
|
||||||
|
|
||||||
|
#file-input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-setting {
|
||||||
|
border-radius: 8px;
|
||||||
|
border: white solid 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#drop-area {
|
||||||
|
border: 2px dashed #ccc;
|
||||||
|
border-radius: 20px;
|
||||||
|
width: 400px;
|
||||||
|
height: 200px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-family: sans-serif;
|
||||||
|
color: #666;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.2s, border-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#drop-area.highlight {
|
||||||
|
background: #f0f8ff;
|
||||||
|
border-color: #0d6efd;
|
||||||
|
color: #0d6efd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
31
html/webpage/assets/js/dragdrop.js
vendored
Normal file
31
html/webpage/assets/js/dragdrop.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
const dropArea = document.getElementById("drop-area");
|
||||||
|
const fileInput = document.getElementById("file-input");
|
||||||
|
|
||||||
|
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
||||||
|
dropArea.addEventListener(eventName, e => e.preventDefault());
|
||||||
|
dropArea.addEventListener(eventName, e => e.stopPropagation());
|
||||||
|
});
|
||||||
|
|
||||||
|
['dragenter', 'dragover'].forEach(eventName => {
|
||||||
|
dropArea.addEventListener(eventName, () => dropArea.classList.add('highlight'));
|
||||||
|
});
|
||||||
|
|
||||||
|
['dragleave', 'drop'].forEach(eventName => {
|
||||||
|
dropArea.addEventListener(eventName, () => dropArea.classList.remove('highlight'));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
dropArea.addEventListener('click', () => fileInput.click());
|
||||||
|
|
||||||
|
dropArea.addEventListener('drop', e => {
|
||||||
|
const files = e.dataTransfer.files;
|
||||||
|
handleFiles(files);
|
||||||
|
});
|
||||||
|
|
||||||
|
fileInput.addEventListener('change', e => {
|
||||||
|
handleFiles(e.target.files);
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleFiles(files) {
|
||||||
|
console.log("file dropped");
|
||||||
|
}
|
||||||
@@ -121,17 +121,32 @@ $(document).ready(function () {
|
|||||||
function refill_messageavailablevariables() {
|
function refill_messageavailablevariables() {
|
||||||
$messageavailablevariables.empty();
|
$messageavailablevariables.empty();
|
||||||
categories.forEach(cat => {
|
categories.forEach(cat => {
|
||||||
$messageavailablevariables.append(ListItem(`{${cat}}`));
|
$messageavailablevariables.append(ListItem(`[${cat}]`));
|
||||||
});
|
});
|
||||||
if ($messagelanguage.val() && $messagevoicetype.val()) {
|
let lang = $messagelanguage.val();
|
||||||
soundbankdata
|
let vt = $messagevoicetype.val();
|
||||||
.filter(sb => sb.language.toLowerCase() === $messagelanguage.val().toLowerCase())
|
if (lang && lang.length > 0){
|
||||||
.filter(sb => sb.voiceType.toLowerCase() === $messagevoicetype.val().toLowerCase())
|
console.log("Selected Language:", lang);
|
||||||
.filter(sb => sb.category.toLowerCase() === "phrase")
|
if (vt && vt.length > 0){
|
||||||
.forEach(sb => {
|
console.log("Selected Voice Type:", vt);
|
||||||
$messageavailablevariables.append(ListItem(`[${sb.Description}]`));
|
|
||||||
|
fetchAPI(`SoundBank/GetPhrases/${lang}/${vt}`, "GET", {}, null, (okdata) => {
|
||||||
|
if (Array.isArray(okdata) && okdata.length > 0) {
|
||||||
|
console.log(`Loaded ${okdata.length} phrases from soundbank for language=${lang} and voiceType=${vt}`);
|
||||||
|
console.log(JSON.stringify(okdata));
|
||||||
|
okdata.forEach(sb => {
|
||||||
|
if (sb.description && sb.description.length > 0) {
|
||||||
|
$messageavailablevariables.append(ListItem(`${sb.description} [${sb.TAG}]`));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}, (errdata) => {
|
||||||
|
//alert("Error loading phrases from soundbank : " + errdata.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +158,7 @@ $(document).ready(function () {
|
|||||||
$messagedescription.val('');
|
$messagedescription.val('');
|
||||||
// fill messagelanguage options from languages[]
|
// fill messagelanguage options from languages[]
|
||||||
$messagelanguage.empty();
|
$messagelanguage.empty();
|
||||||
languages.forEach(lang => {
|
window.languages.forEach(lang => {
|
||||||
$messagelanguage.append(new Option(lang, lang));
|
$messagelanguage.append(new Option(lang, lang));
|
||||||
});
|
});
|
||||||
$messagelanguage.val(null);
|
$messagelanguage.val(null);
|
||||||
@@ -154,7 +169,7 @@ $(document).ready(function () {
|
|||||||
$messageannid.val(1);
|
$messageannid.val(1);
|
||||||
// fill messagevoicetype options from voiceTypes[]
|
// fill messagevoicetype options from voiceTypes[]
|
||||||
$messagevoicetype.empty();
|
$messagevoicetype.empty();
|
||||||
voiceTypes.forEach(vt => {
|
window.voiceTypes.forEach(vt => {
|
||||||
$messagevoicetype.append(new Option(vt, vt));
|
$messagevoicetype.append(new Option(vt, vt));
|
||||||
});
|
});
|
||||||
$messagevoicetype.val(null);
|
$messagevoicetype.val(null);
|
||||||
@@ -344,19 +359,8 @@ $(document).ready(function () {
|
|||||||
// Fill modal fields with selected messagebank data
|
// Fill modal fields with selected messagebank data
|
||||||
$messageindex.val(mb.index).prop('disabled', true);
|
$messageindex.val(mb.index).prop('disabled', true);
|
||||||
$messagedescription.val(mb.description);
|
$messagedescription.val(mb.description);
|
||||||
// Fill messagelanguage options and select current
|
|
||||||
$messagelanguage.empty();
|
|
||||||
languages.forEach(lang => {
|
|
||||||
$messagelanguage.append(new Option(lang, lang));
|
|
||||||
});
|
|
||||||
$messagelanguage.val(mb.language);
|
$messagelanguage.val(mb.language);
|
||||||
// Fill messagevoicetype options and select current
|
|
||||||
$messagevoicetype.empty();
|
|
||||||
voiceTypes.forEach(vt => {
|
|
||||||
$messagevoicetype.append(new Option(vt, vt));
|
|
||||||
});
|
|
||||||
$messagevoicetype.val(mb.voice_Type);
|
$messagevoicetype.val(mb.voice_Type);
|
||||||
// Set annid
|
|
||||||
$messageannid.val(mb.aNN_ID);
|
$messageannid.val(mb.aNN_ID);
|
||||||
// Refill message available variables
|
// Refill message available variables
|
||||||
refill_messageavailablevariables();
|
refill_messageavailablevariables();
|
||||||
|
|||||||
359
html/webpage/assets/js/overview.js
Normal file
359
html/webpage/assets/js/overview.js
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
/**
|
||||||
|
* @typedef {Object} StreamerOutputData
|
||||||
|
* @property {number} index - The index of the Barix connection.
|
||||||
|
* @property {string} channel - The channel name of the Barix connection.
|
||||||
|
* @property {string} ipaddress - The IP address of the Barix connection.
|
||||||
|
* @property {number} bufferRemain - The remaining buffer size of the Barix connection.
|
||||||
|
* @property {boolean} isPlaying - true = playback started, false = playback stopped
|
||||||
|
* @property {number} vu - The VU level of the Barix connection, 0 to 100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} PagingQueue
|
||||||
|
* @property {number} index - The index of the paging queue item.
|
||||||
|
* @property {string} Date_Time - The date and time of the paging queue item.
|
||||||
|
* @property {string} Source - The source of the paging queue item.
|
||||||
|
* @property {string} Type - The type of the paging queue item.
|
||||||
|
* @property {string} Message - The message of the paging queue item.
|
||||||
|
* @property {string} BroadcastZones - The broadcast zones of the paging queue item.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} StreamerCard
|
||||||
|
* @property {JQuery<HTMLElement> | null} title - The jQuery result should be <h4> element.
|
||||||
|
* @property {JQuery<HTMLElement> | null} ip - The jQuery result should be <h6> element.
|
||||||
|
* @property {JQuery<HTMLElement> | null} buffer - The jQuery result should be <h6> element.
|
||||||
|
* @property {JQuery<HTMLElement> | null} status - The jQuery result should be <p> element.
|
||||||
|
* @property {JQuery<HTMLElement> | null} vu - The jQuery result should be <progress-bar> element.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getCardByIndex(index) {
|
||||||
|
let obj = {
|
||||||
|
// title is <h4> element wiht id `streamertitle${index}`, with index as two digit number, e.g. 01, 02, 03
|
||||||
|
title: $(`#streamertitle${index.toString().padStart(2, '0')}`),
|
||||||
|
// ip is <h6> element with id `streamerip${index}`, with index as two digit number, e.g. 01, 02, 03
|
||||||
|
ip: $(`#streamerip${index.toString().padStart(2, '0')}`),
|
||||||
|
// buffer is <h6> element with id `streamerbuffer${index}`, with index as two digit number, e.g. 01, 02, 03
|
||||||
|
buffer: $(`#streamerbuffer${index.toString().padStart(2, '0')}`),
|
||||||
|
// status is <p> element with id `streamerstatus${index}`, with index as two digit number, e.g. 01, 02, 03
|
||||||
|
status: $(`#streamerstatus${index.toString().padStart(2, '0')}`),
|
||||||
|
// vu is <progress-bar> element with id `streamervu${index}`, with index as two digit number, e.g. 01, 02, 03
|
||||||
|
vu: $(`#streamervu${index.toString().padStart(2, '0')} .progress-bar`),
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the streamer card with the provided values.
|
||||||
|
* @param {StreamerOutputData[]} values
|
||||||
|
*/
|
||||||
|
function UpdateStreamerCard(values) {
|
||||||
|
if (!Array.isArray(values) || values.length === 0) return;
|
||||||
|
|
||||||
|
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)));
|
||||||
|
//if (index!==1) return; // only update index 1 for testing
|
||||||
|
//console.log(`setProgress: index=${index}, value=${v}, pct=${pct}`);
|
||||||
|
$bar
|
||||||
|
.attr('aria-valuenow', v) // semantic value
|
||||||
|
.css('width', pct + '%') // visual width
|
||||||
|
.text(pct); // optional label
|
||||||
|
}
|
||||||
|
for (let i = 1; i <= 64; i++) {
|
||||||
|
let vv = values.find(v => v.index === i);
|
||||||
|
let card = getCardByIndex(i);
|
||||||
|
if (vv) {
|
||||||
|
// there is value for this index
|
||||||
|
if (card.title) card.title.text(vv.channel ? vv.channel : `Channel ${i.toString().padStart(2, '0')}`);
|
||||||
|
if (card.ip) card.ip.text(`IP Address: ${vv.ipaddress ? vv.ipaddress : 'N/A'}`);
|
||||||
|
if (card.buffer) card.buffer.text(`Buffer: ${vv.bufferRemain !== undefined && vv.bufferRemain !== null ? vv.bufferRemain.toString() : 'N/A'}`);
|
||||||
|
if (card.status) card.status.text(`Status: ${vv.isPlaying ? 'Playing' : 'Stopped'}`);
|
||||||
|
if (card.vu) {
|
||||||
|
setProgress(i, card.vu, vv.vu, 100);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// no value for this index, disable the card
|
||||||
|
if (card.title) card.title.text(`Channel ${i.toString().padStart(2, '0')}`);
|
||||||
|
if (card.ip) card.ip.text(`IP Address: N/A`);
|
||||||
|
if (card.buffer) card.buffer.text(`Buffer: N/A`);
|
||||||
|
if (card.status) card.status.text(`Status: Disconnected`);
|
||||||
|
if (card.vu) {
|
||||||
|
setProgress(i, card.vu, 0, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {PagingQueue[]}
|
||||||
|
*/
|
||||||
|
window.PagingQueue = [];
|
||||||
|
/**
|
||||||
|
* @type {JQuery<HTMLElement> | null}
|
||||||
|
*/
|
||||||
|
window.selectedpagingrow = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} QueueTable
|
||||||
|
* @property {number} index - The index of the automatic queue item.
|
||||||
|
* @property {string} Date_Time - The date and time of the automatic queue item.
|
||||||
|
* @property {string} Source - The source of the automatic queue item.
|
||||||
|
* @property {string} Type - The type of the automatic queue item.
|
||||||
|
* @property {string} Message - The message of the automatic queue item.
|
||||||
|
* @property {string} SB_TAGS - The SB_TAGS of the automatic queue item.
|
||||||
|
* @property {string} BroadcastZones - The broadcast zones of the automatic queue item.
|
||||||
|
* @property {number} Repeat - The repeat count of the automatic queue item.
|
||||||
|
* @property {string} Language - The language of the automatic queue item.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {QueueTable[]}
|
||||||
|
*/
|
||||||
|
window.QueueTable = [];
|
||||||
|
/**
|
||||||
|
* @type {JQuery<HTMLElement> | null}
|
||||||
|
*/
|
||||||
|
window.selectedautomaticrow = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills the paging queue table body with the provided data.
|
||||||
|
* @param {PagingQueue[]} vv array of PagingQueue objects
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function fill_pagingqueuetablebody(vv) {
|
||||||
|
$('#pagingqueuetable').empty();
|
||||||
|
if (!Array.isArray(vv) || vv.length === 0) return;
|
||||||
|
vv.forEach(item => {
|
||||||
|
// fill index and description columns using item properties
|
||||||
|
$('#pagingqueuetable').append(`<tr>
|
||||||
|
<td>${item.index}</td>
|
||||||
|
<td>${item.date_Time}</td>
|
||||||
|
<td>${item.source}</td>
|
||||||
|
<td>${item.type}</td>
|
||||||
|
<td>${item.message}</td>
|
||||||
|
<td>${item.broadcastZones}</td>
|
||||||
|
</tr>`);
|
||||||
|
let $addedrow = $('#pagingqueuetable tr:last');
|
||||||
|
$addedrow.off('click').on('click', function () {
|
||||||
|
if (window.selectedpagingrow) {
|
||||||
|
window.selectedpagingrow.find('td').css('background-color', '');
|
||||||
|
if (window.selectedpagingrow.is($(this))) {
|
||||||
|
window.selectedpagingrow = null;
|
||||||
|
$('#removepagingqueue').prop('disabled', true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.selectedpagingrow = $(this);
|
||||||
|
window.selectedpagingrow.find('td').css('background-color', 'lightblue');
|
||||||
|
$('#removepagingqueue').prop('disabled', false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills the automatic queue table body with the provided data.
|
||||||
|
* @param {QueueTable[]} vv array of QueueTable objects
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function fill_automaticqueuetablebody(vv) {
|
||||||
|
$('#automaticqueuetable').empty();
|
||||||
|
if (!Array.isArray(vv) || vv.length === 0) return;
|
||||||
|
vv.forEach(item => {
|
||||||
|
// fill index and description columns using item properties
|
||||||
|
//console.log("fill_automaticqueuetablebody: item", item);
|
||||||
|
$('#automaticqueuetable').append(`<tr>
|
||||||
|
<td>${item.index}</td>
|
||||||
|
<td>${item.date_Time}</td>
|
||||||
|
<td>${item.source}</td>
|
||||||
|
<td>${item.type}</td>
|
||||||
|
<td>${item.message}</td>
|
||||||
|
<td>${item.broadcastZones}</td>
|
||||||
|
</tr>`);
|
||||||
|
let $addedrow = $('#automaticqueuetable tr:last');
|
||||||
|
$addedrow.off('click').on('click', function () {
|
||||||
|
if (window.selectedautomaticrow) {
|
||||||
|
window.selectedautomaticrow.find('td').css('background-color', '');
|
||||||
|
if (window.selectedautomaticrow.is($(this))) {
|
||||||
|
window.selectedautomaticrow = null;
|
||||||
|
$('#removeautomatictable').prop('disabled', true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.selectedautomaticrow = $(this);
|
||||||
|
window.selectedautomaticrow.find('td').css('background-color', 'lightblue');
|
||||||
|
$('#removeautomatictable').prop('disabled', false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadPagingQueue(APIURL = "QueuePaging/") {
|
||||||
|
window.PagingQueue = [];
|
||||||
|
fetchAPI(APIURL + "List", "GET", {}, null, (okdata) => {
|
||||||
|
if (Array.isArray(okdata) && okdata.length > 0) {
|
||||||
|
window.PagingQueue.push(...okdata);
|
||||||
|
fill_pagingqueuetablebody(window.PagingQueue);
|
||||||
|
} else {
|
||||||
|
console.log("reloadPagingQueue: okdata is not array");
|
||||||
|
}
|
||||||
|
}, (errdata) => {
|
||||||
|
console.log("reloadPagingQueue: errdata", errdata);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadAutomaticQueue(APIURL = "QueueTable/") {
|
||||||
|
window.QueueTable = [];
|
||||||
|
fetchAPI(APIURL + "List", "GET", {}, null, (okdata) => {
|
||||||
|
if (Array.isArray(okdata) && okdata.length > 0) {
|
||||||
|
window.QueueTable.push(...okdata);
|
||||||
|
fill_automaticqueuetablebody(window.QueueTable);
|
||||||
|
} else {
|
||||||
|
console.log("reloadAutomaticQueue: okdata is not array");
|
||||||
|
}
|
||||||
|
}, (errdata) => {
|
||||||
|
console.log("reloadAutomaticQueue: errdata", errdata);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function RemovePagingQueueByIndex(index, APIURL = "QueuePaging/") {
|
||||||
|
fetchAPI(APIURL + "DeleteByIndex/" + index, "DELETE", {}, null, (okdata) => {
|
||||||
|
console.log("RemovePagingQueueByIndex: okdata", okdata);
|
||||||
|
reloadPagingQueue(APIURL);
|
||||||
|
}, (errdata) => {
|
||||||
|
console.log("RemovePagingQueueByIndex: errdata", errdata);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function RemoveAutomaticQueueByIndex(index, APIURL = "QueueTable/") {
|
||||||
|
fetchAPI(APIURL + "DeleteByIndex/" + index, "DELETE", {}, null, (okdata) => {
|
||||||
|
console.log("RemoveAutomaticQueueByIndex: okdata", okdata);
|
||||||
|
reloadAutomaticQueue(APIURL);
|
||||||
|
}, (errdata) => {
|
||||||
|
console.log("RemoveAutomaticQueueByIndex: errdata", errdata);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
console.log("overview.js loaded");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#clearpagingqueue').off('click').on('click', function () {
|
||||||
|
DoClear("QueuePaging/", "Paging Queue", (okdata) => {
|
||||||
|
reloadPagingQueue();
|
||||||
|
alert("Success clear Paging Queue: " + okdata.message);
|
||||||
|
}, (errdata) => {
|
||||||
|
alert("Error clear Paging Queue: " + errdata.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('#removepagingqueue').off('click').on('click', function () {
|
||||||
|
if (window.selectedpagingrow) {
|
||||||
|
let cells = window.selectedpagingrow.find('td');
|
||||||
|
let index = Number(cells.eq(0).text());
|
||||||
|
let description = cells.eq(1).text();
|
||||||
|
if (!isNaN(index) && description && description.length > 0) {
|
||||||
|
if (confirm(`Are you sure to remove Paging Queue Index: ${index} Description: ${description} ?`)) {
|
||||||
|
RemovePagingQueueByIndex(index);
|
||||||
|
window.selectedpagingrow = null;
|
||||||
|
$('#removepagingqueue').prop('disabled', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#clearautomatictable').off('click').on('click', function () {
|
||||||
|
DoClear("QueueTable/", "Automatic Queue", (okdata) => {
|
||||||
|
reloadAutomaticQueue();
|
||||||
|
alert("Success clear Automatic Queue: " + okdata.message);
|
||||||
|
}, (errdata) => {
|
||||||
|
alert("Error clear Automatic Queue: " + errdata.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('#removeautomatictable').off('click').on('click', function () {
|
||||||
|
if (window.selectedautomaticrow) {
|
||||||
|
let cells = window.selectedautomaticrow.find('td');
|
||||||
|
let index = Number(cells.eq(0).text());
|
||||||
|
let description = cells.eq(1).text();
|
||||||
|
if (!isNaN(index) && description && description.length > 0) {
|
||||||
|
if (confirm(`Are you sure to remove Automatic Queue Index: ${index} Description: ${description} ?`)) {
|
||||||
|
RemoveAutomaticQueueByIndex(index);
|
||||||
|
window.selectedautomaticrow = null;
|
||||||
|
$('#removeautomatictable').prop('disabled', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let intervaljob1 = null;
|
||||||
|
let intervaljob2 = null;
|
||||||
|
function runIntervalJob() {
|
||||||
|
if (intervaljob1) clearInterval(intervaljob1);
|
||||||
|
intervaljob1 = setInterval(() => {
|
||||||
|
sendCommand("getStreamerOutputs", "");
|
||||||
|
}, 100);
|
||||||
|
if (intervaljob2) clearInterval(intervaljob2);
|
||||||
|
intervaljob2 = setInterval(() => {
|
||||||
|
sendCommand("getPagingQueue", "");
|
||||||
|
sendCommand("getAASQueue", "");
|
||||||
|
}, 2000);
|
||||||
|
console.log("overview.js interval job started");
|
||||||
|
}
|
||||||
|
|
||||||
|
runIntervalJob();
|
||||||
|
|
||||||
|
window.addEventListener('ws_connected', () => {
|
||||||
|
console.log("overview.js ws_connected event triggered");
|
||||||
|
runIntervalJob();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('ws_disconnected', () => {
|
||||||
|
console.log("overview.js ws_disconnected event triggered");
|
||||||
|
if (intervaljob) clearInterval(intervaljob);
|
||||||
|
intervaljob = 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);
|
||||||
|
//console.log("getPagingQueue:", pq);
|
||||||
|
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);
|
||||||
|
//console.log("getAASQueue:", aq);
|
||||||
|
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).on('beforeunload', function () {
|
||||||
|
console.log("overview.js beforeunload event triggered");
|
||||||
|
clearInterval(intervaljob1);
|
||||||
|
clearInterval(intervaljob2);
|
||||||
|
intervaljob1 = null;
|
||||||
|
intervaljob2 = null;
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -101,30 +101,30 @@ $(document).ready(function () {
|
|||||||
let $schedulehour = $schedulemodal.find('#schedulehour');
|
let $schedulehour = $schedulemodal.find('#schedulehour');
|
||||||
// number input 0-59
|
// number input 0-59
|
||||||
let $scheduleminute = $schedulemodal.find('#scheduleminute');
|
let $scheduleminute = $schedulemodal.find('#scheduleminute');
|
||||||
|
// select2 for message
|
||||||
//TODO ganti dropdown with list of messages from MessageBank
|
let $schedulemessage = $schedulemodal.find('#schedulemessage');
|
||||||
// text input
|
$schedulemessage.select2({});
|
||||||
let $schedulesoundpath = $schedulemodal.find('#schedulesoundpath');
|
|
||||||
// number input 0-5
|
// number input 0-5
|
||||||
let $schedulerepeat = $schedulemodal.find('#schedulerepeat');
|
let $schedulerepeat = $schedulemodal.find('#schedulerepeat');
|
||||||
// checkbox
|
// checkbox
|
||||||
let $scheduleenable = $schedulemodal.find('#scheduleenable');
|
let $scheduleenable = $schedulemodal.find('#scheduleenable');
|
||||||
// div for list of checkboxes
|
// select2 for broadcastzones
|
||||||
let $schedulezones = $schedulemodal.find('#schedulezones');
|
let $schedulezones = $schedulemodal.find('#schedulezones');
|
||||||
|
$schedulezones.select2({});
|
||||||
// radio button for everyday
|
// radio button for everyday
|
||||||
let $scheduleeveryday = $schedulemodal.find('#scheduleeveryday');
|
let $scheduleeveryday = $schedulemodal.find('#scheduleeveryday');
|
||||||
// radio button for weekdays
|
// radio button for weekly
|
||||||
let $schedulesunday = $schedulemodal.find('#schedulesunday');
|
let $scheduleweekly = $schedulemodal.find('#scheduleweekly');
|
||||||
let $schedulemonday = $schedulemodal.find('#schedulemonday');
|
// select2 for weekly selection
|
||||||
let $scheduletuesday = $schedulemodal.find('#scheduletuesday');
|
let $weeklyselect = $schedulemodal.find('#weeklyselect');
|
||||||
let $schedulewednesday = $schedulemodal.find('#schedulewednesday');
|
$weeklyselect.select2({});
|
||||||
let $schedulethursday = $schedulemodal.find('#schedulethursday');
|
|
||||||
let $schedulefriday = $schedulemodal.find('#schedulefriday');
|
|
||||||
let $schedulesaturday = $schedulemodal.find('#schedulesaturday');
|
|
||||||
// radio button for specific date
|
// radio button for specific date
|
||||||
let $schedulespecialdate = $schedulemodal.find('#schedulespecialdate');
|
let $schedulespecialdate = $schedulemodal.find('#schedulespecialdate');
|
||||||
// date input
|
// date input
|
||||||
let $scheduledate = $schedulemodal.find('#scheduledate');
|
let $scheduledate = $schedulemodal.find('#scheduledate');
|
||||||
|
// select2 for language
|
||||||
|
let $languageselect = $schedulemodal.find('#languageselect');
|
||||||
|
$languageselect.select2({});
|
||||||
|
|
||||||
$schedulespecialdate.on('change', function () {
|
$schedulespecialdate.on('change', function () {
|
||||||
if ($(this).is(':checked')) {
|
if ($(this).is(':checked')) {
|
||||||
@@ -139,17 +139,10 @@ $(document).ready(function () {
|
|||||||
$scheduledescription.val('');
|
$scheduledescription.val('');
|
||||||
$schedulehour.val('0');
|
$schedulehour.val('0');
|
||||||
$scheduleminute.val('0');
|
$scheduleminute.val('0');
|
||||||
$schedulesoundpath.val('');
|
|
||||||
$schedulerepeat.val('0');
|
$schedulerepeat.val('0');
|
||||||
$scheduleenable.prop('checked', true);
|
$scheduleenable.prop('checked', true);
|
||||||
$scheduleeveryday.prop('checked', false);
|
$scheduleeveryday.prop('checked', false);
|
||||||
$schedulesunday.prop('checked', false);
|
|
||||||
$schedulemonday.prop('checked', false);
|
|
||||||
$scheduletuesday.prop('checked', false);
|
|
||||||
$schedulewednesday.prop('checked', false);
|
|
||||||
$schedulethursday.prop('checked', false);
|
|
||||||
$schedulefriday.prop('checked', false);
|
|
||||||
$schedulesaturday.prop('checked', false);
|
|
||||||
$schedulespecialdate.prop('checked', false);
|
$schedulespecialdate.prop('checked', false);
|
||||||
$scheduledate.prop('disabled', true).val('');
|
$scheduledate.prop('disabled', true).val('');
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ function fetchAPI(endpoint, method, headers = {}, body = null, cbOK, cbError) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fetch(url, options)
|
fetch(url, options)
|
||||||
.then(async(response) => {
|
.then(async (response) => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
let msg ;
|
let msg;
|
||||||
try{
|
try {
|
||||||
let _xxx = await response.json();
|
let _xxx = await response.json();
|
||||||
msg = _xxx.message || response.statusText;
|
msg = _xxx.message || response.statusText;
|
||||||
} catch {
|
} catch {
|
||||||
@@ -281,10 +281,10 @@ window.redcircle = null;
|
|||||||
*/
|
*/
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
document.title = "Automatic Announcement System"
|
document.title = "Automatic Announcement System"
|
||||||
if (window.greencircle === null){
|
if (window.greencircle === null) {
|
||||||
fetchImg('green_circle.png', (url) => { window.greencircle = url; }, (err) => { console.error("Error loading green_circle.png : ", err); });
|
fetchImg('green_circle.png', (url) => { window.greencircle = url; }, (err) => { console.error("Error loading green_circle.png : ", err); });
|
||||||
}
|
}
|
||||||
if (window.redcircle === null){
|
if (window.redcircle === null) {
|
||||||
fetchImg('red_circle.png', (url) => { window.redcircle = url; }, (err) => { console.error("Error loading red_circle.png : ", err); });
|
fetchImg('red_circle.png', (url) => { window.redcircle = url; }, (err) => { console.error("Error loading red_circle.png : ", err); });
|
||||||
}
|
}
|
||||||
const wsURL = window.location.pathname + '/ws'
|
const wsURL = window.location.pathname + '/ws'
|
||||||
@@ -313,18 +313,39 @@ $(document).ready(function () {
|
|||||||
getScheduledDays();
|
getScheduledDays();
|
||||||
|
|
||||||
|
|
||||||
// Initialize WebSocket connection
|
// reconnect handle
|
||||||
window.ws = new WebSocket(wsURL);
|
let ws_reconnect;
|
||||||
|
|
||||||
window.ws.onopen = () => {
|
function reconnect() {
|
||||||
|
if (window.ws && window.ws.readyState === WebSocket.OPEN) return;
|
||||||
|
const s = new WebSocket(wsURL);
|
||||||
|
s.addEventListener('open', () => {
|
||||||
console.log('WebSocket connection established');
|
console.log('WebSocket connection established');
|
||||||
$('#onlineindicator').attr('src', window.greencircle);
|
$('#onlineindicator').attr('src', window.greencircle);
|
||||||
};
|
|
||||||
window.ws.onmessage = (event) => {
|
if (ws_reconnect) {
|
||||||
|
// stop reconnect attempts
|
||||||
|
clearTimeout(ws_reconnect);
|
||||||
|
ws_reconnect = null;
|
||||||
|
}
|
||||||
|
window.dispatchEvent(new Event('ws_connected'));
|
||||||
|
});
|
||||||
|
s.addEventListener('close', () => {
|
||||||
|
console.log('WebSocket connection closed');
|
||||||
|
window.dispatchEvent(new Event('ws_disconnected'));
|
||||||
|
resetStatusIndicators();
|
||||||
|
if (!ws_reconnect) {
|
||||||
|
clearTimeout(ws_reconnect);
|
||||||
|
ws_reconnect = null;
|
||||||
|
}
|
||||||
|
ws_reconnect = setTimeout(reconnect, 5000); // try to reconnect every 5 seconds
|
||||||
|
});
|
||||||
|
s.addEventListener('message', (event) => {
|
||||||
if ($('#onlineindicator').attr('src') !== window.greencircle) {
|
if ($('#onlineindicator').attr('src') !== window.greencircle) {
|
||||||
$('#onlineindicator').attr('src', window.greencircle);
|
$('#onlineindicator').attr('src', window.greencircle);
|
||||||
}
|
}
|
||||||
let rep = JSON.parse(event.data);
|
let rep = JSON.parse(event.data);
|
||||||
|
window.dispatchEvent(new CustomEvent('ws_message', { detail: rep }));
|
||||||
let cmd = rep.reply
|
let cmd = rep.reply
|
||||||
let data = rep.data;
|
let data = rep.data;
|
||||||
if (cmd && cmd.length > 0) {
|
if (cmd && cmd.length > 0) {
|
||||||
@@ -339,7 +360,15 @@ $(document).ready(function () {
|
|||||||
$('#diskstatus').text("Disk : " + data)
|
$('#diskstatus').text("Disk : " + data)
|
||||||
break;
|
break;
|
||||||
case "getNetworkStatus":
|
case "getNetworkStatus":
|
||||||
$('#networkstatus').text("Network : " + data)
|
let result = "";
|
||||||
|
let json = JSON.parse(data);
|
||||||
|
if (Array.isArray(json) && json.length > 0) {
|
||||||
|
json.forEach((net) => {
|
||||||
|
if (result.length > 0) result += "\n"
|
||||||
|
result += `${net.displayName} (${net.ipV4addr.join(";")}) TX:${(net.txSpeed / 1024).toFixed(1)} KB/s RX:${(net.rxSpeed / 1024).toFixed(1)} KB/s`
|
||||||
|
})
|
||||||
|
} else result = "N/A";
|
||||||
|
$('#networkstatus').text(result)
|
||||||
break;
|
break;
|
||||||
case "getSystemTime":
|
case "getSystemTime":
|
||||||
$('#datetimetext').text(data)
|
$('#datetimetext').text(data)
|
||||||
@@ -347,18 +376,18 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
window.ws.onclose = () => {
|
window.ws = s;
|
||||||
console.log('WebSocket connection closed');
|
}
|
||||||
resetStatusIndicators();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// window.ws.onerror = (error) => {
|
|
||||||
// console.error('WebSocket error:', error);
|
|
||||||
// };
|
|
||||||
|
|
||||||
|
|
||||||
|
reconnect();
|
||||||
|
window.addEventListener('beforeunload', () => {
|
||||||
|
try{
|
||||||
|
window.ws?.close(1000, "Client closed connection");
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error closing WebSocket connection:", error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
sendCommand("getCPUStatus", "")
|
sendCommand("getCPUStatus", "")
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Select2item
|
||||||
|
* @property {number} id
|
||||||
|
* @property {string} text
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} SoundBank
|
* @typedef {Object} SoundBank
|
||||||
* @property {number} index
|
* @property {number} index
|
||||||
@@ -9,12 +17,6 @@
|
|||||||
* @property {string} path
|
* @property {string} path
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} Select2item
|
|
||||||
* @property {number} id
|
|
||||||
* @property {string} text
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of Soundbank data loaded from server
|
* List of Soundbank data loaded from server
|
||||||
* @type {SoundBank[]}
|
* @type {SoundBank[]}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -195,9 +195,9 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-3">Description</th>
|
<th class="class75">Description</th>
|
||||||
<th class="col">IP Address</th>
|
<th class="class20">IP Address</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="soundchanneltablebody"></tbody>
|
<tbody id="soundchanneltablebody"></tbody>
|
||||||
@@ -236,11 +236,11 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-2">Description</th>
|
<th class="class40">Description</th>
|
||||||
<th class="col-sm-2">SoundChannel</th>
|
<th class="class20">SoundChannel</th>
|
||||||
<th class="col-sm-2">ID</th>
|
<th class="class05">ID</th>
|
||||||
<th class="col">BP</th>
|
<th class="class30">BP</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="broadcastzonetablebody"></tbody>
|
<tbody id="broadcastzonetablebody"></tbody>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-2">TAG</th>
|
<th class="class20">TAG</th>
|
||||||
<th class="col">Languages</th>
|
<th class="class75">Languages</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="languagebanktablebody"></tbody>
|
<tbody id="languagebanktablebody"></tbody>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -39,11 +39,11 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-1 col-md-1">No</th>
|
<th class="class10">No</th>
|
||||||
<th class="col-2 col-md-2 col-lg-2">Date</th>
|
<th class="class15">Date</th>
|
||||||
<th class="col-2 col-md-2 col-lg-2">Time</th>
|
<th class="class15">Time</th>
|
||||||
<th class="col-2 col-md-2 col-lg-2">Machine</th>
|
<th class="class15">Machine</th>
|
||||||
<th>Description</th>
|
<th class="class45">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="logtablebody"></tbody>
|
<tbody id="logtablebody"></tbody>
|
||||||
|
|||||||
@@ -14,22 +14,21 @@
|
|||||||
<body>
|
<body>
|
||||||
<section class="position-relative py-4 py-xl-5">
|
<section class="position-relative py-4 py-xl-5">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-5">
|
<div class="row mb-4"></div>
|
||||||
<div class="col-md-8 col-xl-6 text-center mx-auto">
|
<div class="row d-flex justify-content-center mb-7">
|
||||||
<h2>Sign In</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row d-flex justify-content-center">
|
|
||||||
<div class="col-md-6 col-xl-4">
|
<div class="col-md-6 col-xl-4">
|
||||||
<div class="card mb-5 card-login">
|
<div class="card mb-5 card-login">
|
||||||
<div class="card-body d-flex flex-column align-items-center">
|
<div class="card-body d-flex flex-column align-items-center">
|
||||||
<div class="bs-icon-xl bs-icon-circle bs-icon-primary my-4 bs-icon"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 16 16" class="bi bi-person bg-icon-login">
|
<div class="bs-icon-xl bs-icon-circle bs-icon-primary my-4 bs-icon bg-icon-login"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 16 16" class="bi bi-person bg-icon-login">
|
||||||
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664z"></path>
|
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664z"></path>
|
||||||
</svg></div>
|
</svg></div>
|
||||||
<form class="text-center" method="post">
|
<h2 class="mb-3 h-login">Login</h2>
|
||||||
<div class="mb-3"><input class="form-control input-login" type="text" name="username" placeholder="Username"></div>
|
<form class="text-center py-2 bottom-signin" method="post">
|
||||||
<div class="mb-3"><input class="form-control input-login" type="password" name="password" placeholder="Password"></div>
|
<p class="p-login">Username</p>
|
||||||
<div class="mb-3"><button class="btn btn-primary d-block w-100 btn-login" type="submit">Sign In</button></div>
|
<div class="mb-3"><input class="form-control input-login" type="text" name="username" placeholder="Enter your username"></div>
|
||||||
|
<p class="p-login">Password</p>
|
||||||
|
<div class="mb-3"><input class="form-control input-login" type="password" name="password" placeholder="Enter your password"></div>
|
||||||
|
<div class="mb-3 py-2"><button class="btn btn-primary d-block w-100 btn-login" type="submit">Login</button></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-2">Description</th>
|
<th class="class15">Description</th>
|
||||||
<th class="col-sm-1">Language</th>
|
<th class="class10">Language</th>
|
||||||
<th class="col-sm-1">ANN ID</th>
|
<th class="class10">ANN ID</th>
|
||||||
<th class="col-sm-1">Type</th>
|
<th class="class10">Type</th>
|
||||||
<th class="col-sm-3">Message Details</th>
|
<th class="class35">Message Details</th>
|
||||||
<th class="col-sm-3">Message Tags</th>
|
<th class="class15">Message Tags</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="messagebanktablebody"></tbody>
|
<tbody id="messagebanktablebody"></tbody>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
||||||
<div class="card" id="streamercard-4">
|
<div class="card card-channel" id="streamercard-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle05">Channel 05</h4>
|
<h4 class="card-title" id="streamertitle05">Channel 05</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
||||||
<div class="card" id="streamercard-5">
|
<div class="card card-channel" id="streamercard-5">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle06">Channel 06</h4>
|
<h4 class="card-title" id="streamertitle06">Channel 06</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
||||||
<div class="card" id="streamercard-6">
|
<div class="card card-channel" id="streamercard-6">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle07">Channel 07</h4>
|
<h4 class="card-title" id="streamertitle07">Channel 07</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 pad-card">
|
||||||
<div class="card" id="streamercard-7">
|
<div class="card card-channel" id="streamercard-7">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle08">Channel 08</h4>
|
<h4 class="card-title" id="streamertitle08">Channel 08</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-8">
|
<div class="card card-channel" id="streamercard-8">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle09">Channel 09</h4>
|
<h4 class="card-title" id="streamertitle09">Channel 09</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-9">
|
<div class="card card-channel" id="streamercard-9">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle10">Channel 10</h4>
|
<h4 class="card-title" id="streamertitle10">Channel 10</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-10">
|
<div class="card card-channel" id="streamercard-10">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle11">Channel 11</h4>
|
<h4 class="card-title" id="streamertitle11">Channel 11</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -237,7 +237,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-11">
|
<div class="card card-channel" id="streamercard-11">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle12">Channel 12</h4>
|
<h4 class="card-title" id="streamertitle12">Channel 12</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-12">
|
<div class="card card-channel" id="streamercard-12">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle13">Channel 13</h4>
|
<h4 class="card-title" id="streamertitle13">Channel 13</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-13">
|
<div class="card card-channel" id="streamercard-13">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle14">Channel 14</h4>
|
<h4 class="card-title" id="streamertitle14">Channel 14</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-14">
|
<div class="card card-channel" id="streamercard-14">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle15">Channel 15</h4>
|
<h4 class="card-title" id="streamertitle15">Channel 15</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-15">
|
<div class="card card-channel" id="streamercard-15">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle16">Channel 16</h4>
|
<h4 class="card-title" id="streamertitle16">Channel 16</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-16">
|
<div class="card card-channel" id="streamercard-16">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle17">Channel 17</h4>
|
<h4 class="card-title" id="streamertitle17">Channel 17</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-17">
|
<div class="card card-channel" id="streamercard-17">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle18">Channel 18</h4>
|
<h4 class="card-title" id="streamertitle18">Channel 18</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-18">
|
<div class="card card-channel" id="streamercard-18">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle19">Channel 19</h4>
|
<h4 class="card-title" id="streamertitle19">Channel 19</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-19">
|
<div class="card card-channel" id="streamercard-19">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle20">Channel 20</h4>
|
<h4 class="card-title" id="streamertitle20">Channel 20</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -414,7 +414,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-20">
|
<div class="card card-channel" id="streamercard-20">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle21">Channel 21</h4>
|
<h4 class="card-title" id="streamertitle21">Channel 21</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -433,7 +433,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-21">
|
<div class="card card-channel" id="streamercard-21">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle22">Channel 22</h4>
|
<h4 class="card-title" id="streamertitle22">Channel 22</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -452,7 +452,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-22">
|
<div class="card card-channel" id="streamercard-22">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle23">Channel 23</h4>
|
<h4 class="card-title" id="streamertitle23">Channel 23</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -471,7 +471,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-23">
|
<div class="card card-channel" id="streamercard-23">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle24">Channel 24</h4>
|
<h4 class="card-title" id="streamertitle24">Channel 24</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-24">
|
<div class="card card-channel" id="streamercard-24">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle25">Channel 25</h4>
|
<h4 class="card-title" id="streamertitle25">Channel 25</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-25">
|
<div class="card card-channel" id="streamercard-25">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle26">Channel 26</h4>
|
<h4 class="card-title" id="streamertitle26">Channel 26</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -530,7 +530,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-26">
|
<div class="card card-channel" id="streamercard-26">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle27">Channel 27</h4>
|
<h4 class="card-title" id="streamertitle27">Channel 27</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -549,7 +549,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-27">
|
<div class="card card-channel" id="streamercard-27">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle28">Channel 28</h4>
|
<h4 class="card-title" id="streamertitle28">Channel 28</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -570,7 +570,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-28">
|
<div class="card card-channel" id="streamercard-28">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle29">Channel 29</h4>
|
<h4 class="card-title" id="streamertitle29">Channel 29</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -589,7 +589,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-29">
|
<div class="card card-channel" id="streamercard-29">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle30">Channel 30</h4>
|
<h4 class="card-title" id="streamertitle30">Channel 30</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-30">
|
<div class="card card-channel" id="streamercard-30">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle31">Channel 31</h4>
|
<h4 class="card-title" id="streamertitle31">Channel 31</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -627,7 +627,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-31">
|
<div class="card card-channel" id="streamercard-31">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle32">Channel 32</h4>
|
<h4 class="card-title" id="streamertitle32">Channel 32</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -648,7 +648,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-32">
|
<div class="card card-channel" id="streamercard-32">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle33">Channel 33</h4>
|
<h4 class="card-title" id="streamertitle33">Channel 33</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -667,7 +667,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-33">
|
<div class="card card-channel" id="streamercard-33">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle34">Channel 34</h4>
|
<h4 class="card-title" id="streamertitle34">Channel 34</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -686,7 +686,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-34">
|
<div class="card card-channel" id="streamercard-34">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle35">Channel 35</h4>
|
<h4 class="card-title" id="streamertitle35">Channel 35</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -705,7 +705,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-35">
|
<div class="card card-channel" id="streamercard-35">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle36">Channel 36</h4>
|
<h4 class="card-title" id="streamertitle36">Channel 36</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -726,7 +726,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-36">
|
<div class="card card-channel" id="streamercard-36">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle37">Channel 37</h4>
|
<h4 class="card-title" id="streamertitle37">Channel 37</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -745,7 +745,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-37">
|
<div class="card card-channel" id="streamercard-37">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle38">Channel 38</h4>
|
<h4 class="card-title" id="streamertitle38">Channel 38</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -764,7 +764,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-38">
|
<div class="card card-channel" id="streamercard-38">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle39">Channel 39</h4>
|
<h4 class="card-title" id="streamertitle39">Channel 39</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -783,7 +783,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-39">
|
<div class="card card-channel" id="streamercard-39">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle40">Channel 40</h4>
|
<h4 class="card-title" id="streamertitle40">Channel 40</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -804,7 +804,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-40">
|
<div class="card card-channel" id="streamercard-40">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle41">Channel 41</h4>
|
<h4 class="card-title" id="streamertitle41">Channel 41</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -823,7 +823,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-41">
|
<div class="card card-channel" id="streamercard-41">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle42">Channel 42</h4>
|
<h4 class="card-title" id="streamertitle42">Channel 42</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -842,7 +842,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-42">
|
<div class="card card-channel" id="streamercard-42">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle43">Channel 43</h4>
|
<h4 class="card-title" id="streamertitle43">Channel 43</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -861,7 +861,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-43">
|
<div class="card card-channel" id="streamercard-43">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle44">Channel 44</h4>
|
<h4 class="card-title" id="streamertitle44">Channel 44</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -882,7 +882,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-44">
|
<div class="card card-channel" id="streamercard-44">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle-44">Channel 45</h4>
|
<h4 class="card-title" id="streamertitle-44">Channel 45</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -901,7 +901,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-45">
|
<div class="card card-channel" id="streamercard-45">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle46">Channel 46</h4>
|
<h4 class="card-title" id="streamertitle46">Channel 46</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -920,7 +920,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-46">
|
<div class="card card-channel" id="streamercard-46">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle47">Channel 47</h4>
|
<h4 class="card-title" id="streamertitle47">Channel 47</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -939,7 +939,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-47">
|
<div class="card card-channel" id="streamercard-47">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle48">Channel 48</h4>
|
<h4 class="card-title" id="streamertitle48">Channel 48</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -960,7 +960,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-48">
|
<div class="card card-channel" id="streamercard-48">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle49">Channel 49</h4>
|
<h4 class="card-title" id="streamertitle49">Channel 49</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -979,7 +979,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-49">
|
<div class="card card-channel" id="streamercard-49">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle50">Channel 50</h4>
|
<h4 class="card-title" id="streamertitle50">Channel 50</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -998,7 +998,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-50">
|
<div class="card card-channel" id="streamercard-50">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle51">Channel 51</h4>
|
<h4 class="card-title" id="streamertitle51">Channel 51</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1017,7 +1017,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-51">
|
<div class="card card-channel" id="streamercard-51">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle52">Channel 52</h4>
|
<h4 class="card-title" id="streamertitle52">Channel 52</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1038,7 +1038,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-52">
|
<div class="card card-channel" id="streamercard-52">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle53">Channel 53</h4>
|
<h4 class="card-title" id="streamertitle53">Channel 53</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1057,7 +1057,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-53">
|
<div class="card card-channel" id="streamercard-53">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle54">Channel 54</h4>
|
<h4 class="card-title" id="streamertitle54">Channel 54</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1076,7 +1076,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-54">
|
<div class="card card-channel" id="streamercard-54">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle55">Channel 55</h4>
|
<h4 class="card-title" id="streamertitle55">Channel 55</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1095,7 +1095,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-55">
|
<div class="card card-channel" id="streamercard-55">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle56">Channel 56</h4>
|
<h4 class="card-title" id="streamertitle56">Channel 56</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1116,7 +1116,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-56">
|
<div class="card card-channel" id="streamercard-56">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle57">Channel 57</h4>
|
<h4 class="card-title" id="streamertitle57">Channel 57</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1135,7 +1135,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-57">
|
<div class="card card-channel" id="streamercard-57">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle58">Channel 58</h4>
|
<h4 class="card-title" id="streamertitle58">Channel 58</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1154,7 +1154,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-58">
|
<div class="card card-channel" id="streamercard-58">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle59">Channel 59</h4>
|
<h4 class="card-title" id="streamertitle59">Channel 59</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1173,7 +1173,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-59">
|
<div class="card card-channel" id="streamercard-59">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle60">Channel 60</h4>
|
<h4 class="card-title" id="streamertitle60">Channel 60</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1194,7 +1194,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-60">
|
<div class="card card-channel" id="streamercard-60">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle61">Channel 61</h4>
|
<h4 class="card-title" id="streamertitle61">Channel 61</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1213,7 +1213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-61">
|
<div class="card card-channel" id="streamercard-61">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle62">Channel 62</h4>
|
<h4 class="card-title" id="streamertitle62">Channel 62</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1232,7 +1232,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-62">
|
<div class="card card-channel" id="streamercard-62">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle63">Channel 63</h4>
|
<h4 class="card-title" id="streamertitle63">Channel 63</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1251,7 +1251,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
<div class="col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3 col-xxl-3 pad-card">
|
||||||
<div class="card" id="streamercard-63">
|
<div class="card card-channel" id="streamercard-63">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title" id="streamertitle64">Channel 64</h4>
|
<h4 class="card-title" id="streamertitle64">Channel 64</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1263,7 +1263,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="card-text" id="streamerstatus64">Status : Idle</p>
|
<p class="card-text" id="streamerstatus64">Status : Idle</p>
|
||||||
<div class="progress" id="streamervu-63">
|
<div class="progress" id="streamervu64">
|
||||||
<div class="progress-bar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%;">50%</div>
|
<div class="progress-bar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%;">50%</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1282,8 +1282,12 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Index</th>
|
<th class="class05">Index</th>
|
||||||
<th>Description</th>
|
<th class="class10">Date Time</th>
|
||||||
|
<th class="class15">Source</th>
|
||||||
|
<th class="class10">Type</th>
|
||||||
|
<th class="class30">Message</th>
|
||||||
|
<th class="class30">Broadcast Zones</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="pagingqueuetable"></tbody>
|
<tbody id="pagingqueuetable"></tbody>
|
||||||
@@ -1306,8 +1310,12 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Index</th>
|
<th class="class05">Index</th>
|
||||||
<th>Description</th>
|
<th class="class10">Date Time</th>
|
||||||
|
<th class="class15">Source</th>
|
||||||
|
<th class="class10">Type</th>
|
||||||
|
<th class="class30">Message</th>
|
||||||
|
<th class="class30">Broadcast Zones</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="automaticqueuetable"></tbody>
|
<tbody id="automaticqueuetable"></tbody>
|
||||||
@@ -1324,6 +1332,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="assets/js/bs-init.js"></script>
|
<script src="assets/js/bs-init.js"></script>
|
||||||
|
<script src="assets/js/overview.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -17,8 +17,70 @@
|
|||||||
<h2 style="text-align: center;">Setting</h2>
|
<h2 style="text-align: center;">Setting</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card card-setting">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title"><strong>Upload Soundbank</strong></h4>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">Path</label></div>
|
||||||
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4"><input class="w-100 form-control" type="text" id="setting_path"></div>
|
||||||
|
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-2"><button class="btn w-100 pad-button btn-round-basic color-add" id="save_directory" type="button">Save Directory</button></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">Category</label></div>
|
||||||
|
<div class="col-6 col-sm-10 col-md-2 col-lg-2 col-xl-2"><select id="setting_category" class="input-add form-select"></select></div>
|
||||||
|
<div class="col-6 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">Language</label></div>
|
||||||
|
<div class="col-6 col-sm-10 col-md-2 col-lg-2 col-xl-2"><select id="setting_language" class="input-add form-select"></select></div>
|
||||||
|
<div class="col-6 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">Voice</label></div>
|
||||||
|
<div class="col-6 col-sm-10 col-md-2 col-lg-2 col-xl-2"><select id="setting_voice" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<div class="bg-white w-100" id="drop-area" multiple=""><input type="file" id="file-input"><label class="form-label d">Drop files here or click to select</label></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<div class="row"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row py-5">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card card-setting">
|
||||||
|
<div class="card-body pad-accordion">
|
||||||
|
<h4 class="card-title"><strong>FIS CODE</strong></h4>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">GOP</label></div>
|
||||||
|
<div class="col-10 col-sm-10 col-md-10 col-lg-10 col-xl-10"><select id="input_GOP" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">GBP</label></div>
|
||||||
|
<div class="col-10 col-sm-10 col-md-10 col-lg-10 col-xl-10"><select id="input_GBP" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">GFC</label></div>
|
||||||
|
<div class="col-10 col-sm-10 col-md-10 col-lg-10 col-xl-10"><select id="input_GFC" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label">FLD</label></div>
|
||||||
|
<div class="col-10 col-sm-10 col-md-10 col-lg-10 col-xl-10"><select id="input_FLD" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2"><label class="col-form-label"></label></div>
|
||||||
|
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-2"><button class="btn w-100 pad-button btn-round-basic color-add" type="button">Save</button></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="assets/js/bs-init.js"></script>
|
<script src="assets/js/bs-init.js"></script>
|
||||||
|
<script src="assets/js/dragdrop.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th>Description</th>
|
<th class="class20">Description</th>
|
||||||
<th class="col-sm-1">TAG</th>
|
<th class="class10">TAG</th>
|
||||||
<th class="col-sm-1">Category</th>
|
<th class="class15">Category</th>
|
||||||
<th class="col-sm-1">Language</th>
|
<th class="class15">Language</th>
|
||||||
<th class="col-sm-1">Type</th>
|
<th class="class10">Type</th>
|
||||||
<th class="col-sm-3">Filename</th>
|
<th class="class25">Filename</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="soundbanktablebody"></tbody>
|
<tbody id="soundbanktablebody"></tbody>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
||||||
<p class="text-add">Path</p>
|
<p class="text-add">Path</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 col-sm-8 col-md-8 col-lg-8 col-xl-8"><select id="modalpath" class="input-add form-select" name="modalpath" data-control="select2"></select></div>
|
<div class="col-8 col-sm-8 col-md-8 col-lg-8 col-xl-8"><select id="modalpath" class="input-add form-select cw-100" name="modalpath" data-control="select2"></select></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"><button class="btn btn-round-basic color-edit class25" id="soundbankclose" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-round-basic color-add class25" id="soundbanksave" type="button">Save</button></div>
|
<div class="modal-footer"><button class="btn btn-round-basic color-edit class25" id="soundbankclose" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-round-basic color-add class25" id="soundbanksave" type="button">Save</button></div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -42,14 +42,15 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-2">Description</th>
|
<th class="class15">Description</th>
|
||||||
<th class="col-sm-1">Day</th>
|
<th class="class15">Day</th>
|
||||||
<th class="col-sm-1">Time</th>
|
<th class="class10">Time</th>
|
||||||
<th class="col-sm-2">Sound Path</th>
|
<th class="class15">Sound Path</th>
|
||||||
<th class="col-sm-1">Repeat</th>
|
<th class="class10">Repeat</th>
|
||||||
<th class="col-sm-1">Enable</th>
|
<th class="class05">Enable</th>
|
||||||
<th>Broadcast Zones</th>
|
<th class="class15">Broadcast Zones</th>
|
||||||
|
<th class="class10">Language</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="schedulebanktablebody"></tbody>
|
<tbody id="schedulebanktablebody"></tbody>
|
||||||
@@ -87,37 +88,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row pad-day">
|
<div class="row pad-day">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulesunday" name="dayselection" value="Sunday"><label class="form-check-label" for="formCheck-8">Sunday</label></div>
|
<div class="form-check"><input class="form-check-input" type="radio" id="scheduleweekly"><label class="form-check-label" for="formCheck-1">Weekly</label></div><select class="w-100 input-add form-select" id="weeklyselect">
|
||||||
</div>
|
<optgroup label="This is a group">
|
||||||
</div>
|
<option value="12" selected="">This is item 1</option>
|
||||||
<div class="row pad-day">
|
<option value="13">This is item 2</option>
|
||||||
<div class="col">
|
<option value="14">This is item 3</option>
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulemonday" name="dayselection" value="Monday"><label class="form-check-label" for="formCheck-7">Monday</label></div>
|
</optgroup>
|
||||||
</div>
|
</select>
|
||||||
</div>
|
|
||||||
<div class="row pad-day">
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="scheduletuesday" name="dayselection" value="Tuesday"><label class="form-check-label" for="formCheck-6">Tuesday</label></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row pad-day">
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulewednesday" name="dayselection" value="Wednesday"><label class="form-check-label" for="formCheck-5">Wednesday</label></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row pad-day">
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulethursday" name="dayselection" value="Thursday"><label class="form-check-label" for="formCheck-4">Thursday</label></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row pad-day">
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulefriday" name="dayselection" value="Friday"><label class="form-check-label" for="formCheck-3">Friday</label></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row pad-day">
|
|
||||||
<div class="col">
|
|
||||||
<div class="form-check"><input class="form-check-input" type="radio" id="schedulesaturday" name="dayselection" value="Saturday"><label class="form-check-label" for="formCheck-2">Saturday</label></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -134,12 +111,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="row w-100 h-100">
|
<div class="row w-100 h-100">
|
||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-3 col-xl-3"><input type="number" id="schedulehour" class="input-add form-control class100" value="0" min="0" max="23" step="1"></div>
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4"><input type="number" id="schedulehour" class="input-add form-control class100" value="0" min="0" max="23" step="1"></div>
|
||||||
<div class="col-2 col-sm-2 col-md-2 col-lg-3 col-xl-3">
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2">
|
||||||
<p class="pad-time">(H)</p>
|
<p class="pad-time">(H)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-3 col-xl-3"><input class="w-100 input-add form-control" type="number" id="scheduleminute" value="0" min="0" max="59" step="1"></div>
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4"><input class="w-100 input-add form-control" type="number" id="scheduleminute" value="0" min="0" max="59" step="1"></div>
|
||||||
<div class="col-2 col-sm-2 col-md-2 col-lg-3 col-xl-3">
|
<div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2">
|
||||||
<p class="pad-time">(M)</p>
|
<p class="pad-time">(M)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,9 +124,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
||||||
<p class="text-add">Sound Path</p>
|
<p class="text-add">Message</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-8 col-sm-8 col-md-8 col-lg-8 col-xl-8"><select id="schedulemessage" class="input-add form-select"></select></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<p class="text-add">Language</p>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="row pad-day">
|
||||||
|
<div class="col"><select class="w-100 input-add form-select" id="languageselect">
|
||||||
|
<optgroup label="This is a group">
|
||||||
|
<option value="12" selected="">This is item 1</option>
|
||||||
|
<option value="13">This is item 2</option>
|
||||||
|
<option value="14">This is item 3</option>
|
||||||
|
</optgroup>
|
||||||
|
</select></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 col-sm-8 col-md-8 col-lg-8 col-xl-8"><input type="text" id="schedulesoundpath" class="input-add form-control"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
||||||
@@ -167,7 +160,13 @@
|
|||||||
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
<div class="col-4 col-sm-4 col-md-4 col-lg-4 col-xl-4">
|
||||||
<p class="text-add">Broadcast Zones</p>
|
<p class="text-add">Broadcast Zones</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 col-sm-8 col-md-8 col-lg-8 col-xl-8 border" id="schedulezones"></div>
|
<div class="col-8 col-sm-8 col-md-8 col-lg-9 col-xl-8 border"><select class="w-100 input-add form-select" id="schedulezones">
|
||||||
|
<optgroup label="This is a group">
|
||||||
|
<option value="12" selected="">This is item 1</option>
|
||||||
|
<option value="13">This is item 2</option>
|
||||||
|
<option value="14">This is item 3</option>
|
||||||
|
</optgroup>
|
||||||
|
</select></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer"><button class="btn btn-round-basic color-edit class25" id="scheduleclose" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-round-basic class25 color-add" id="schedulesave" type="button">Save</button></div>
|
<div class="modal-footer"><button class="btn btn-round-basic color-edit class25" id="scheduleclose" type="button" data-bs-dismiss="modal">Close</button><button class="btn btn-round-basic class25 color-add" id="schedulesave" type="button">Save</button></div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
<title>AAS_NewGen_08OKT25</title>
|
<title>AAS_NewGen_17OKT25</title>
|
||||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
<link rel="stylesheet" href="assets/css/bss-overrides.css">
|
||||||
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
<link rel="stylesheet" href="assets/css/Login-Form-Basic-icons.css">
|
||||||
@@ -42,13 +42,13 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1">No</th>
|
<th class="class05">No</th>
|
||||||
<th class="col-sm-1">Username</th>
|
<th class="class10">Username</th>
|
||||||
<th class="col-sm-1">Location</th>
|
<th class="class15">Location</th>
|
||||||
<th class="col-sm-2">Airline</th>
|
<th class="class15">Airline</th>
|
||||||
<th class="col-sm-2">City</th>
|
<th class="class15">City</th>
|
||||||
<th class="col-sm-2">Messagebank</th>
|
<th class="class20">Messagebank</th>
|
||||||
<th class="col">Broadcast Zones</th>
|
<th class="class20">Broadcast Zones</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="usertablebody"></tbody>
|
<tbody id="usertablebody"></tbody>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ lateinit var audioPlayer: AudioPlayer
|
|||||||
val StreamerOutputs: MutableMap<String, BarixConnection> = HashMap()
|
val StreamerOutputs: MutableMap<String, BarixConnection> = HashMap()
|
||||||
lateinit var udpreceiver: UDPReceiver
|
lateinit var udpreceiver: UDPReceiver
|
||||||
lateinit var tcpreceiver: TCPReceiver
|
lateinit var tcpreceiver: TCPReceiver
|
||||||
const val version = "0.0.6 (14/10/2025)"
|
const val version = "0.0.8 (16/10/2025)"
|
||||||
// AAS 64 channels
|
// AAS 64 channels
|
||||||
const val max_channel = 64
|
const val max_channel = 64
|
||||||
|
|
||||||
@@ -167,7 +167,6 @@ fun main() {
|
|||||||
|
|
||||||
val barixserver = TCP_Barix_Command_Server()
|
val barixserver = TCP_Barix_Command_Server()
|
||||||
barixserver.StartTcpServer { cmd ->
|
barixserver.StartTcpServer { cmd ->
|
||||||
//Logger.info { cmd }
|
|
||||||
val _tcp = barixserver.getSocket(cmd.ipaddress)
|
val _tcp = barixserver.getSocket(cmd.ipaddress)
|
||||||
val _streamer = StreamerOutputs[cmd.ipaddress]
|
val _streamer = StreamerOutputs[cmd.ipaddress]
|
||||||
val _sc = db.soundchannelDB.List.find { it.ip == cmd.ipaddress }
|
val _sc = db.soundchannelDB.List.find { it.ip == cmd.ipaddress }
|
||||||
@@ -177,7 +176,8 @@ fun main() {
|
|||||||
if (_sc != null) {
|
if (_sc != null) {
|
||||||
|
|
||||||
val _bc = BarixConnection(_sc.index, _sc.channel, cmd.ipaddress)
|
val _bc = BarixConnection(_sc.index, _sc.channel, cmd.ipaddress)
|
||||||
_bc.vu = cmd.vu
|
// cmd.vu 0 - 32767, kita convert ke 0 - 100
|
||||||
|
_bc.vu = ((1.0 * cmd.vu / 32767.0)* 100.0).toInt()
|
||||||
_bc.bufferRemain = cmd.buffremain
|
_bc.bufferRemain = cmd.buffremain
|
||||||
_bc.statusData = cmd.statusdata
|
_bc.statusData = cmd.statusdata
|
||||||
_bc.commandsocket = _tcp
|
_bc.commandsocket = _tcp
|
||||||
@@ -191,7 +191,8 @@ fun main() {
|
|||||||
if (_sc != null && _sc.channel != _streamer.channel) {
|
if (_sc != null && _sc.channel != _streamer.channel) {
|
||||||
_streamer.channel = _sc.channel
|
_streamer.channel = _sc.channel
|
||||||
}
|
}
|
||||||
_streamer.vu = cmd.vu
|
// cmd.vu 0 - 32767, kita convert ke 0 - 100
|
||||||
|
_streamer.vu = ((1.0 * cmd.vu / 32767.0)* 100.0).toInt()
|
||||||
_streamer.bufferRemain = cmd.buffremain
|
_streamer.bufferRemain = cmd.buffremain
|
||||||
_streamer.statusData = cmd.statusdata
|
_streamer.statusData = cmd.statusdata
|
||||||
|
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ class MainExtension01 {
|
|||||||
.filter { it.Type=="PAGING" }
|
.filter { it.Type=="PAGING" }
|
||||||
|
|
||||||
list.forEach { qp ->
|
list.forEach { qp ->
|
||||||
println("Processing $qp")
|
//println("Processing $qp")
|
||||||
if (qp.BroadcastZones.isNotBlank()){
|
if (qp.BroadcastZones.isNotBlank()){
|
||||||
if (ValidFile(qp.Message)){
|
if (ValidFile(qp.Message)){
|
||||||
val zz = qp.BroadcastZones.split(";")
|
val zz = qp.BroadcastZones.split(";")
|
||||||
@@ -883,7 +883,7 @@ class MainExtension01 {
|
|||||||
db.queuetableDB.Get()
|
db.queuetableDB.Get()
|
||||||
val list = db.queuetableDB.List.filter { it.Type=="SOUNDBANK" }
|
val list = db.queuetableDB.List.filter { it.Type=="SOUNDBANK" }
|
||||||
list.forEach { qa ->
|
list.forEach { qa ->
|
||||||
println("Processing $qa")
|
//println("Processing $qa")
|
||||||
if (qa.BroadcastZones.isNotEmpty()){
|
if (qa.BroadcastZones.isNotEmpty()){
|
||||||
val zz = qa.BroadcastZones.split(";")
|
val zz = qa.BroadcastZones.split(";")
|
||||||
if (AllBroadcastZonesValid(zz)){
|
if (AllBroadcastZonesValid(zz)){
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode
|
|||||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||||
import content.Category
|
import content.Category
|
||||||
import content.Language
|
import content.Language
|
||||||
|
import content.NetworkInformation
|
||||||
import content.ScheduleDay
|
import content.ScheduleDay
|
||||||
import content.VoiceType
|
import content.VoiceType
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@@ -15,6 +16,8 @@ import oshi.SystemInfo
|
|||||||
import oshi.hardware.CentralProcessor
|
import oshi.hardware.CentralProcessor
|
||||||
import oshi.hardware.GlobalMemory
|
import oshi.hardware.GlobalMemory
|
||||||
import oshi.hardware.NetworkIF
|
import oshi.hardware.NetworkIF
|
||||||
|
import oshi.hardware.Sensors
|
||||||
|
import oshi.software.os.OperatingSystem
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
@@ -35,6 +38,9 @@ class Somecodes {
|
|||||||
val si = SystemInfo()
|
val si = SystemInfo()
|
||||||
val processor: CentralProcessor = si.hardware.processor
|
val processor: CentralProcessor = si.hardware.processor
|
||||||
val memory : GlobalMemory = si.hardware.memory
|
val memory : GlobalMemory = si.hardware.memory
|
||||||
|
val NetworkInfoMap = mutableMapOf<String, NetworkInformation>()
|
||||||
|
val sensor : Sensors = si.hardware.sensors
|
||||||
|
val os : OperatingSystem = si.operatingSystem
|
||||||
|
|
||||||
val datetimeformat1: DateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss")
|
val datetimeformat1: DateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss")
|
||||||
val dateformat1: DateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy")
|
val dateformat1: DateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy")
|
||||||
@@ -278,16 +284,43 @@ class Somecodes {
|
|||||||
, (usedMemory.toDouble() / totalMemory * 100))
|
, (usedMemory.toDouble() / totalMemory * 100))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun GetNetworkStatus(networkname: String) : String{
|
fun GetNetworkStatus(cb : Consumer<List<NetworkInformation>>) {
|
||||||
val networks: List<NetworkIF> = si.hardware.networkIFs.toList()
|
val networks: List<NetworkIF> = si.hardware.networkIFs.toList()
|
||||||
//TODO cari network yang sesuai dengan networkname
|
networks.forEach { net ->
|
||||||
// networks.forEach { net ->
|
|
||||||
//
|
if (net.ifOperStatus==NetworkIF.IfOperStatus.UP){
|
||||||
// println(net.name+" "+net.displayName+" ")
|
if (net.iPv4addr.size>0 || net.iPv6addr.size>0){
|
||||||
// net.updateAttributes()
|
var ni = NetworkInfoMap[net.name]
|
||||||
// println("upload: ${SizetoHuman(net.bytesSent)} sent, download: ${SizetoHuman(net.bytesRecv)} received")
|
if (ni == null){
|
||||||
// }
|
ni = NetworkInformation(net.name, net.displayName, net.macaddr)
|
||||||
return ""
|
NetworkInfoMap[net.name] = ni
|
||||||
|
}
|
||||||
|
ni.ipV4addr = net.iPv4addr.toMutableList()
|
||||||
|
ni.ipV6addr = net.iPv6addr.toMutableList()
|
||||||
|
ni.speed = net.speed
|
||||||
|
ni.packetsSent = net.packetsSent
|
||||||
|
ni.packetsRecv = net.packetsRecv
|
||||||
|
if (ni.updateStamp==0L){
|
||||||
|
ni.bytesSent = net.bytesSent
|
||||||
|
ni.bytesRecv = net.bytesRecv
|
||||||
|
ni.txSpeed = 0
|
||||||
|
ni.rxSpeed = 0
|
||||||
|
ni.updateStamp = System.currentTimeMillis()
|
||||||
|
} else {
|
||||||
|
// tx speed = (current bytesSent - previous bytesSent) / (current time - previous time) * 1000
|
||||||
|
val currentTime = System.currentTimeMillis()
|
||||||
|
ni.txSpeed = ((net.bytesSent - ni.bytesSent) * 1000 / (currentTime - ni.updateStamp))
|
||||||
|
ni.rxSpeed = ((net.bytesRecv - ni.bytesRecv) * 1000 / (currentTime - ni.updateStamp))
|
||||||
|
ni.bytesSent = net.bytesSent
|
||||||
|
ni.bytesRecv = net.bytesRecv
|
||||||
|
ni.updateStamp = currentTime
|
||||||
|
}
|
||||||
|
} else if (NetworkInfoMap.contains(net.name)) NetworkInfoMap.remove(net.name)
|
||||||
|
} else if (NetworkInfoMap.contains(net.name)) NetworkInfoMap.remove(net.name)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
cb.accept(NetworkInfoMap.values.toList())
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -463,6 +496,35 @@ class Somecodes {
|
|||||||
sb.append(".wav")
|
sb.append(".wav")
|
||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get sensors information using OSHI library.
|
||||||
|
* @return A string representing the CPU temperature, fan speeds, and CPU voltage, or an empty string if not available.
|
||||||
|
*/
|
||||||
|
fun GetSensorsInfo() : String {
|
||||||
|
val cputemp = sensor.cpuTemperature
|
||||||
|
val cpuvolt = sensor.cpuVoltage
|
||||||
|
val fanspeed = sensor.fanSpeeds
|
||||||
|
return if (cpuvolt>0 && cputemp > 0 && fanspeed.isNotEmpty()){
|
||||||
|
String.format("CPU Temp: %.1f °C\nFan Speeds: %s RPM\nCPU Voltage: %.2f V",
|
||||||
|
sensor.cpuTemperature,
|
||||||
|
sensor.fanSpeeds.joinToString("/"),
|
||||||
|
sensor.cpuVoltage
|
||||||
|
)
|
||||||
|
} else ""
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun GetUptime() : String {
|
||||||
|
val value = os.systemUptime
|
||||||
|
return if (value>0){
|
||||||
|
// number of seconds since system boot
|
||||||
|
val hours = value / 3600
|
||||||
|
val minutes = (value % 3600) / 60
|
||||||
|
val seconds = value % 60
|
||||||
|
String.format("%02d:%02d:%02d", hours, minutes, seconds)
|
||||||
|
} else ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class TCP_Android_Command_Server {
|
|||||||
din.read(bb)
|
din.read(bb)
|
||||||
// B4A format, 4 bytes di depan adalah size
|
// B4A format, 4 bytes di depan adalah size
|
||||||
val str = String(bb, 4, bb.size - 4)
|
val str = String(bb, 4, bb.size - 4)
|
||||||
println("Received command from $key : $str")
|
//println("Received command from $key : $str")
|
||||||
str.split("@").map { it.trim() }.filter { ValidString(it) }
|
str.split("@").map { it.trim() }.filter { ValidString(it) }
|
||||||
.forEach {
|
.forEach {
|
||||||
process_command(key,it) { reply ->
|
process_command(key,it) { reply ->
|
||||||
@@ -308,7 +308,7 @@ class TCP_Android_Command_Server {
|
|||||||
if (userlogin != null){
|
if (userlogin != null){
|
||||||
val userdb = db.userDB.List.find { it.username == username }
|
val userdb = db.userDB.List.find { it.username == username }
|
||||||
if (userdb != null){
|
if (userdb != null){
|
||||||
println("Sending initialization data to $key with username $username")
|
//println("Sending initialization data to $key with username $username")
|
||||||
val result = StringBuilder()
|
val result = StringBuilder()
|
||||||
// kirim Zone
|
// kirim Zone
|
||||||
result.append("ZONE")
|
result.append("ZONE")
|
||||||
|
|||||||
15
src/content/NetworkInformation.kt
Normal file
15
src/content/NetworkInformation.kt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package content
|
||||||
|
|
||||||
|
class NetworkInformation(val name: String, val displayName: String, val macAddress: String) {
|
||||||
|
var ipV4addr: MutableList<String> = mutableListOf()
|
||||||
|
var ipV6addr: MutableList<String> = mutableListOf()
|
||||||
|
var bytesSent: Long = 0
|
||||||
|
var bytesRecv: Long = 0
|
||||||
|
var packetsSent: Long = 0
|
||||||
|
var packetsRecv: Long = 0
|
||||||
|
var speed: Long = 0 // in bits per second
|
||||||
|
var updateStamp : Long = 0 // epoch time in milliseconds, buat hitung speed
|
||||||
|
var txSpeed: Long = 0
|
||||||
|
var rxSpeed: Long = 0
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,28 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
data class BroadcastZones(var index: UInt, var description: String, var SoundChannel: String, var id: String, var bp: String)
|
data class BroadcastZones(var index: UInt, var description: String, var SoundChannel: String, var id: String, var bp: String){
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if all fields are not empty
|
||||||
|
*/
|
||||||
|
fun isNotEmpty(): Boolean{
|
||||||
|
if (description.isNotEmpty()){
|
||||||
|
if (SoundChannel.isNotEmpty()){
|
||||||
|
if (id.isNotEmpty()){
|
||||||
|
if (bp.isNotEmpty()){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a string representation of the BroadcastZones object.
|
||||||
|
*/
|
||||||
|
override fun toString(): String {
|
||||||
|
return "BroadcastZones(index=$index, description='$description', SoundChannel='$SoundChannel', id='$id', bp='$bp')"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
package database
|
|
||||||
|
|
||||||
data class BroadcastZonesHtml(var index: UInt, var description: String, var SoundChannel: String, var Box: String, var Relay: String)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package database
|
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
data class IpZones(var index:UInt, var description: String, var ip: String)
|
|
||||||
@@ -1,4 +1,22 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
@Suppress("unused")
|
data class LanguageLink(var index: UInt, var TAG: String, var Language: String){
|
||||||
data class LanguageLink(var index: UInt, var TAG: String, var Language: String)
|
|
||||||
|
/**
|
||||||
|
* Check if the LanguageLink object has non-empty TAG and Language fields.
|
||||||
|
* @return true if both TAG and Language are not empty, false otherwise.
|
||||||
|
*/
|
||||||
|
fun isNotEmpty() : Boolean {
|
||||||
|
return TAG.isNotEmpty() && Language.isNotEmpty()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a string representation of the LanguageLink object.
|
||||||
|
* @return A string in the format "LanguageLink(index=..., TAG='...', Language='...')".
|
||||||
|
*/
|
||||||
|
override fun toString(): String {
|
||||||
|
return "LanguageLink(index=$index, TAG='$TAG', Language='$Language')"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
@Suppress("unused")
|
data class LogSemiauto(val index: UInt, val date: String, val time: String, val source: String, val description: String){
|
||||||
data class LogSemiauto(val index: UInt, val date: String, val time: String, val source: String, val description: String)
|
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "$date $time [$source] $description"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1411,9 +1411,9 @@ class MariaDB(
|
|||||||
// use a temporary table to reorder the index
|
// use a temporary table to reorder the index
|
||||||
statement?.executeUpdate("CREATE TABLE IF NOT EXISTS $tempdb_name LIKE ${super.dbName}")
|
statement?.executeUpdate("CREATE TABLE IF NOT EXISTS $tempdb_name LIKE ${super.dbName}")
|
||||||
statement?.executeUpdate("TRUNCATE TABLE $tempdb_name")
|
statement?.executeUpdate("TRUNCATE TABLE $tempdb_name")
|
||||||
statement?.executeUpdate("INSERT INTO $tempdb_name (Date_Time, Source, Type, Message, SB_TAGS) SELECT Date_Time, Source, Type, Message, SB_TAGS FROM ${super.dbName} ORDER BY `index` ")
|
statement?.executeUpdate("INSERT INTO $tempdb_name (Date_Time, Source, Type, Message, BroadcastZones) SELECT Date_Time, Source, Type, Message, BroadcastZones FROM ${super.dbName} ")
|
||||||
statement?.executeUpdate("TRUNCATE TABLE ${super.dbName}")
|
statement?.executeUpdate("TRUNCATE TABLE ${super.dbName}")
|
||||||
statement?.executeUpdate("INSERT INTO ${super.dbName} (Date_Time, Source, Type, Message, SB_TAGS) SELECT Date_Time, Source, Type, Message, SB_TAGS FROM $tempdb_name")
|
statement?.executeUpdate("INSERT INTO ${super.dbName} (Date_Time, Source, Type, Message, BroadcastZones) SELECT Date_Time, Source, Type, Message, BroadcastZones FROM $tempdb_name")
|
||||||
statement?.executeUpdate("DROP TABLE $tempdb_name")
|
statement?.executeUpdate("DROP TABLE $tempdb_name")
|
||||||
Logger.info("${super.dbName} table resorted by index" as Any)
|
Logger.info("${super.dbName} table resorted by index" as Any)
|
||||||
// reload the local list
|
// reload the local list
|
||||||
@@ -1436,7 +1436,7 @@ class MariaDB(
|
|||||||
val workbook = XSSFWorkbook()
|
val workbook = XSSFWorkbook()
|
||||||
val sheet = workbook.createSheet("QueuePaging")
|
val sheet = workbook.createSheet("QueuePaging")
|
||||||
val headerRow = sheet.createRow(0)
|
val headerRow = sheet.createRow(0)
|
||||||
val headers = arrayOf("Index", "Date_Time", "Source", "Type", "Message", "SB_TAGS")
|
val headers = arrayOf("Index", "Date_Time", "Source", "Type", "Message", "BroadcastZones")
|
||||||
for ((colIndex, header) in headers.withIndex()) {
|
for ((colIndex, header) in headers.withIndex()) {
|
||||||
val cell = headerRow.createCell(colIndex)
|
val cell = headerRow.createCell(colIndex)
|
||||||
cell.setCellValue(header)
|
cell.setCellValue(header)
|
||||||
@@ -1449,7 +1449,7 @@ class MariaDB(
|
|||||||
row.createCell(2).setCellValue(resultSet.getString("Source"))
|
row.createCell(2).setCellValue(resultSet.getString("Source"))
|
||||||
row.createCell(3).setCellValue(resultSet.getString("Type"))
|
row.createCell(3).setCellValue(resultSet.getString("Type"))
|
||||||
row.createCell(4).setCellValue(resultSet.getString("Message"))
|
row.createCell(4).setCellValue(resultSet.getString("Message"))
|
||||||
row.createCell(5).setCellValue(resultSet.getString("SB_TAGS"))
|
row.createCell(5).setCellValue(resultSet.getString("BroadcastZones"))
|
||||||
}
|
}
|
||||||
for (i in headers.indices) {
|
for (i in headers.indices) {
|
||||||
sheet.autoSizeColumn(i)
|
sheet.autoSizeColumn(i)
|
||||||
|
|||||||
@@ -8,4 +8,27 @@ data class Messagebank(
|
|||||||
var Voice_Type: String,
|
var Voice_Type: String,
|
||||||
var Message_Detail: String,
|
var Message_Detail: String,
|
||||||
var Message_TAGS: String
|
var Message_TAGS: String
|
||||||
)
|
) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if all fields are not empty and ANN_ID > 0
|
||||||
|
*/
|
||||||
|
fun isNotEmpty(): Boolean{
|
||||||
|
if (Description.isNotEmpty()){
|
||||||
|
if (Language.isNotEmpty()){
|
||||||
|
if (Voice_Type.isNotEmpty()){
|
||||||
|
if (Message_Detail.isNotEmpty()){
|
||||||
|
if (Message_TAGS.isNotEmpty()){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Messagebank(index=$index, Description='$Description', Language='$Language', ANN_ID=$ANN_ID, Voice_Type='$Voice_Type', Message_Detail='$Message_Detail', Message_TAGS='$Message_TAGS')"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
data class QueueFids(var index: UInt, var ALCODE: String, var FLNUM: String, var ORIGIN: String, var ETAD: String, var FREMARK: String)
|
data class QueueFids(var index: UInt, var ALCODE: String, var FLNUM: String, var ORIGIN: String, var ETAD: String, var FREMARK: String){
|
||||||
|
|
||||||
|
fun isNotEmpty(): Boolean {
|
||||||
|
return ALCODE.isNotEmpty() && FLNUM.isNotEmpty() && ORIGIN.isNotEmpty() && ETAD.isNotEmpty() && FREMARK.isNotEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "QueueFids(index=$index, ALCODE='$ALCODE', FLNUM='$FLNUM', ORIGIN='$ORIGIN', ETAD='$ETAD', FREMARK='$FREMARK')"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
data class QueuePaging(var index: UInt, var Date_Time: String, var Source: String, var Type: String, var Message: String, var BroadcastZones: String){
|
data class QueuePaging(var index: UInt, var Date_Time: String, var Source: String, var Type: String, var Message: String, var BroadcastZones: String){
|
||||||
|
fun isNotEmpty(): Boolean {
|
||||||
|
return Date_Time.isNotEmpty() && Source.isNotEmpty() && Type.isNotEmpty() && Message.isNotEmpty() && BroadcastZones.isNotEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "QueuePaging(index=$index, Date_Time='$Date_Time', Source='$Source', Type='$Type', Message='$Message', BroadcastZones='$BroadcastZones')"
|
return "QueuePaging(index=$index, Date_Time='$Date_Time', Source='$Source', Type='$Type', Message='$Message', BroadcastZones='$BroadcastZones')"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ package database
|
|||||||
|
|
||||||
data class QueueTable(var index: UInt, var Date_Time: String, var Source: String, var Type: String, var Message: String, var SB_TAGS: String, var BroadcastZones: String, var Repeat: UInt, var Language: String){
|
data class QueueTable(var index: UInt, var Date_Time: String, var Source: String, var Type: String, var Message: String, var SB_TAGS: String, var BroadcastZones: String, var Repeat: UInt, var Language: String){
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if all fields are not empty
|
||||||
|
*/
|
||||||
|
fun isNotEmpty(): Boolean {
|
||||||
|
return Date_Time.isNotEmpty() && Source.isNotEmpty() && Type.isNotEmpty() && Message.isNotEmpty() && SB_TAGS.isNotEmpty() && BroadcastZones.isNotEmpty() && Language.isNotEmpty()
|
||||||
|
}
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "QueueTable(index=$index, Date_Time='$Date_Time', Source='$Source', Type='$Type', Message='$Message', SB_TAGS='$SB_TAGS', BroadcastZones='$BroadcastZones', Repeat=$Repeat, Language='$Language')"
|
return "QueueTable(index=$index, Date_Time='$Date_Time', Source='$Source', Type='$Type', Message='$Message', SB_TAGS='$SB_TAGS', BroadcastZones='$BroadcastZones', Repeat=$Repeat, Language='$Language')"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,13 @@ data class ScheduleBank(
|
|||||||
var Repeat: UByte,
|
var Repeat: UByte,
|
||||||
var Enable: Boolean,
|
var Enable: Boolean,
|
||||||
var BroadcastZones: String,
|
var BroadcastZones: String,
|
||||||
var Language: String)
|
var Language: String) {
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "ScheduleBank(index=$index, Description='$Description', Day='$Day', Time='$Time', Soundpath='$Soundpath', Repeat=$Repeat, Enable=$Enable, BroadcastZones='$BroadcastZones', Language='$Language')"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isNotEmpty() : Boolean{
|
||||||
|
return Description.isNotEmpty() && Day.isNotEmpty() && Time.isNotEmpty() && Soundpath.isNotEmpty() && BroadcastZones.isNotEmpty() && Language.isNotEmpty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
@Suppress("unused")
|
data class SoundChannel(val index: UInt, val channel: String, val ip: String) {
|
||||||
data class SoundChannel(val index: UInt, val channel: String, val ip: String)
|
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "SoundChannel(index=$index, channel='$channel', ip='$ip')"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if both channel and ip are not empty
|
||||||
|
* @return true if both channel and ip are not empty, false otherwise
|
||||||
|
*/
|
||||||
|
fun isNotEmpty() : Boolean {
|
||||||
|
return channel.isNotEmpty() && ip.isNotEmpty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import content.Category
|
|
||||||
|
|
||||||
data class Soundbank(
|
data class Soundbank(
|
||||||
var index: UInt,
|
var index: UInt,
|
||||||
@@ -16,20 +15,7 @@ data class Soundbank(
|
|||||||
* Check if all fields are not empty
|
* Check if all fields are not empty
|
||||||
*/
|
*/
|
||||||
fun isNotEmpty(): Boolean{
|
fun isNotEmpty(): Boolean{
|
||||||
if (Description.isNotEmpty()){
|
return Description.isNotEmpty() && TAG.isNotEmpty() && Category.isNotEmpty() && Language.isNotEmpty() && VoiceType.isNotEmpty() && Path.isNotEmpty()
|
||||||
if (TAG.isNotEmpty()){
|
|
||||||
if (Category.isNotEmpty()){
|
|
||||||
if (Language.isNotEmpty()){
|
|
||||||
if (VoiceType.isNotEmpty()){
|
|
||||||
if (Path.isNotEmpty()){
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ data class UserDB(var index: UInt, var username: String, var password: String, v
|
|||||||
return "UserDB(index=$index, username='$username', location='$location', airline_tags='$airline_tags', city_tags='$city_tags', messagebank_ann_id='$messagebank_ann_id', broadcastzones='$broadcastzones')"
|
return "UserDB(index=$index, username='$username', location='$location', airline_tags='$airline_tags', city_tags='$city_tags', messagebank_ann_id='$messagebank_ann_id', broadcastzones='$broadcastzones')"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isNotEmpty() : Boolean {
|
||||||
|
return username.isNotEmpty() && password.isNotEmpty() && location.isNotEmpty() && airline_tags.isNotEmpty() && city_tags.isNotEmpty() && messagebank_ann_id.isNotEmpty() && broadcastzones.isNotEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this UserDB object with another UserDB object for equality.
|
* Compares this UserDB object with another UserDB object for equality.
|
||||||
* Two UserDB objects are considered equal if all their properties are equal, except for the index property.
|
* Two UserDB objects are considered equal if all their properties are equal, except for the index property.
|
||||||
|
|||||||
266
src/toa/Vx3K.kt
Normal file
266
src/toa/Vx3K.kt
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
package toa
|
||||||
|
|
||||||
|
import codes.Somecodes
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import org.tinylog.Logger
|
||||||
|
import java.net.Inet4Address
|
||||||
|
import java.net.InetSocketAddress
|
||||||
|
import java.net.Socket
|
||||||
|
import java.nio.ByteBuffer
|
||||||
|
import java.nio.ByteOrder
|
||||||
|
import java.util.function.BiConsumer
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VX3K Protocol
|
||||||
|
* @param ipaddress IP address of the VX3K device, default to 192.168.14.1
|
||||||
|
* @param port Port number of the VX3K device, from 50050-50053 default to 50053
|
||||||
|
*/
|
||||||
|
class Vx3K(val ipaddress : String = "192.168.14.1", val port : Int = 50053) {
|
||||||
|
private val remotesocket : InetSocketAddress
|
||||||
|
init{
|
||||||
|
if (port !in 50050..50053){
|
||||||
|
throw IllegalArgumentException("Port number must be between 50050 and 50053")
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
val inet = Inet4Address.getByName(ipaddress)
|
||||||
|
remotesocket = InetSocketAddress(inet, port)
|
||||||
|
} catch (_ : Exception){
|
||||||
|
throw IllegalArgumentException("Invalid IP address: $ipaddress")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to the VX3K device
|
||||||
|
* @param timeout Connection timeout in milliseconds, default to 30000 ms
|
||||||
|
*/
|
||||||
|
fun Connect(timeout: Int = 30000){
|
||||||
|
try{
|
||||||
|
val socket = Socket()
|
||||||
|
// read timeout 5 seconds
|
||||||
|
socket.soTimeout = 5000
|
||||||
|
socket.connect(remotesocket, timeout)
|
||||||
|
} catch (e : Exception){
|
||||||
|
Logger.error { "Failed to connect with ${remotesocket.hostName}:${remotesocket.port}, Message: ${e.message}" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Virtual Contact Input (Commmand 0x1001)
|
||||||
|
* @param ID : Device ID for VX3K, range 0 - 31
|
||||||
|
* @param CIN : Contact Input Number, range 0 - 15 for normal terminal, 16 for emergency contact input1, 17 for emergency contact input2
|
||||||
|
* @param isON : true for ON, false for OFF
|
||||||
|
* @param cb : Callback function with parameters (success: Boolean, message: String)
|
||||||
|
*/
|
||||||
|
fun VirtualCIN(ID: Short, CIN: Short, isON: Boolean, cb : BiConsumer<Boolean, String>){
|
||||||
|
val commandID = 0x1001.toShort()
|
||||||
|
if (ID !in 0..31){
|
||||||
|
cb.accept(false, "ID must be between 0 and 31")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (CIN !in 0..17){
|
||||||
|
cb.accept(false, "CIN must be between 0 and 17")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
val payload = ByteBuffer.allocate(6).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
payload.putShort(ID)
|
||||||
|
payload.putShort(CIN)
|
||||||
|
payload.putShort(if (isON) 1 else 0)
|
||||||
|
val command = Make_Request_Command(commandID, payload.array())
|
||||||
|
Send_Receive(command,8){
|
||||||
|
success, reply ->
|
||||||
|
if (success){
|
||||||
|
val bb = ByteBuffer.wrap(reply).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
val resp_commandID = bb.short
|
||||||
|
val resp_code = bb.short
|
||||||
|
if (resp_commandID==commandID){
|
||||||
|
if (resp_code.toInt() == 0){
|
||||||
|
cb.accept(true, "Virtual CIN command sent successfully to ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Virtual CIN command failed with response code $resp_code from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Invalid response command ID $resp_commandID from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Failed to send Virtual CIN command to ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open / Close Audio Input in Broadcast Pattern (Command 0x1003 for old firmware, 0x1101 for new firmware)
|
||||||
|
* @param NewFirmware Set to true if using new firmware version
|
||||||
|
* @param ID Device ID for VX3K, range 0 - 39 for new firmware, 0 - 31 for old firmware
|
||||||
|
* @param Channel Audio Input Channel, range 0 - 3
|
||||||
|
* @param BroadcastZones Vx3K_BroadcastZone object with selected broadcast zones
|
||||||
|
* @param cb Callback function with parameters (success: Boolean, message: String)
|
||||||
|
*/
|
||||||
|
fun AudioInput_BroadcastPattern(NewFirmware : Boolean, ID: Short, Channel: Short, BroadcastZones: Vx3K_BroadcastZone, cb: BiConsumer<Boolean, String>){
|
||||||
|
val CommandID = if (NewFirmware) 0x1101.toShort() else 0x1003.toShort()
|
||||||
|
if (NewFirmware){
|
||||||
|
if (ID !in 0..39){
|
||||||
|
cb.accept(false, "ID must be between 0 and 39")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ID !in 0..31){
|
||||||
|
cb.accept(false, "ID must be between 0 and 31")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Channel !in 0..3){
|
||||||
|
cb.accept(false, "Channel must be between 0 and 3")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val payload = ByteBuffer.allocate(if (NewFirmware) 86 else 70).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
// Audio Input = 1
|
||||||
|
payload.putShort(1)
|
||||||
|
// VX3K ID
|
||||||
|
payload.putShort(ID)
|
||||||
|
// Audio Input Channel
|
||||||
|
payload.putShort(Channel)
|
||||||
|
// Broadcast Pattern Zones
|
||||||
|
payload.put(BroadcastZones.payload)
|
||||||
|
val command = Make_Request_Command(CommandID, payload.array())
|
||||||
|
Send_Receive(command,8){
|
||||||
|
success, reply ->
|
||||||
|
if (success){
|
||||||
|
val bb = ByteBuffer.wrap(reply).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
val resp_commandID = bb.short
|
||||||
|
val resp_code = bb.short
|
||||||
|
if (resp_commandID==CommandID){
|
||||||
|
if (resp_code.toInt() == 0){
|
||||||
|
cb.accept(true, "Open Audio Input Broadcast command sent successfully to ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Open Audio Input Broadcast command failed with response code $resp_code from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Invalid response command ID $resp_commandID from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Failed to send Open Audio Input Broadcast command to ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open / Close Network Broadcast Pattern (Command 0x1102 for old firmware, 0x1104 for new firmware)
|
||||||
|
* @param NewFirmware Set to true if using new firmware version
|
||||||
|
* @param multicastIP Multicast IP address in string format, from 224.0.0.0 ~ 239.255.255.255, default to 224.0.0.1
|
||||||
|
* @param port UDP Port number, port 5000-5255 is invalid, default to 5300
|
||||||
|
* @param priority Broadcast Priority value, range 1 - 1024, default to 512 (to be checked later)
|
||||||
|
* @param isBGM true for BGM, false for Paging
|
||||||
|
* @param SSRC SSRC value, range 1 - 65535, default to 1 (to be checked later)
|
||||||
|
* @param payloadType RTP Payload Type, range 0 - 127, default to 0 (to be checked later)
|
||||||
|
* @param payloadSize RTP Payload Size, range 0 - 1500, default to 1000 (to be checked later)
|
||||||
|
* @param BroadcastZones Vx3K_BroadcastZone object with selected broadcast zones
|
||||||
|
* @param cb Callback function with parameters (success: Boolean, message: String)
|
||||||
|
*/
|
||||||
|
fun Network_BroadcastPattern(NewFirmware: Boolean,multicastIP: String = "224.0.0.1", port: Int = 5300, priority: Int = 512, isBGM: Boolean, SSRC: UShort = 1u, payloadType: Short = 0, payloadSize: Short = 1000, BroadcastZones: Vx3K_BroadcastZone, cb:BiConsumer<Boolean, String>){
|
||||||
|
val CommandID = if (NewFirmware) 0x1104.toShort() else 0x1102.toShort()
|
||||||
|
if (Somecodes.ValidIPV4(multicastIP)){
|
||||||
|
val inet = Inet4Address.getByName(multicastIP)
|
||||||
|
if (inet.isMulticastAddress){
|
||||||
|
if (port in 5256..65535){
|
||||||
|
if (priority in 1..1024){
|
||||||
|
if (SSRC in 1u..65535u){
|
||||||
|
if (payloadType in 0..127){
|
||||||
|
if (payloadSize in 0..1500){
|
||||||
|
val jitterbuffer = 1000 //TODO 32 signed integer, to be checked later
|
||||||
|
val payload = ByteBuffer.allocate(if (NewFirmware) 100 else 84)
|
||||||
|
payload.put(inet.address)
|
||||||
|
payload.putShort(port.toShort())
|
||||||
|
payload.putShort(priority.toShort())
|
||||||
|
payload.putShort(if (isBGM) 1 else 0)
|
||||||
|
payload.putShort(SSRC.toShort())
|
||||||
|
payload.putShort(payloadType)
|
||||||
|
payload.putShort(payloadSize)
|
||||||
|
payload.putInt(jitterbuffer)
|
||||||
|
payload.put(BroadcastZones.payload)
|
||||||
|
val command = Make_Request_Command(CommandID, payload.array())
|
||||||
|
Send_Receive(command,10){
|
||||||
|
success, reply ->
|
||||||
|
if (success){
|
||||||
|
val bb = ByteBuffer.wrap(reply).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
val resp_commandID = bb.short
|
||||||
|
val resp_code = bb.short
|
||||||
|
// buang 2 short
|
||||||
|
bb.short
|
||||||
|
bb.short
|
||||||
|
val sound_source_number = bb.short
|
||||||
|
if (resp_commandID==CommandID){
|
||||||
|
if (resp_code.toInt() == 0){
|
||||||
|
cb.accept(true, "Open Network Broadcast command sent successfully to ${remotesocket.hostName}:${remotesocket.port}, Sound Source Number: $sound_source_number")
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Open Network Broadcast command failed with response code $resp_code from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Invalid response command ID $resp_commandID from ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cb.accept(false, "Failed to send Open Network Broadcast command to ${remotesocket.hostName}:${remotesocket.port}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else cb.accept(false, "Payload Size must be between 0 and 1500")
|
||||||
|
} else cb.accept(false, "Payload Type must be between 0 and 127")
|
||||||
|
} else cb.accept(false, "SSRC must be between 1 and 65535")
|
||||||
|
} else cb.accept(false, "Priority must be between 1 and 1024")
|
||||||
|
} else cb.accept(false, "Port must be greater than 5255 and less than 65536")
|
||||||
|
} else cb.accept(false, "multicastIP must between 224.0.0.0 ~ 239.255.255.255")
|
||||||
|
} else cb.accept(false, "Multicast IP address invalid")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send command and receive reply from VX3K device
|
||||||
|
* @param command Command byte array to send
|
||||||
|
* @param expectedlength Expected length of the reply byte array
|
||||||
|
* @param cb Callback function with parameters (success: Boolean, reply: ByteArray)
|
||||||
|
*/
|
||||||
|
private fun Send_Receive(command: ByteArray, expectedlength: Int, cb : BiConsumer<Boolean, ByteArray>){
|
||||||
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
|
try{
|
||||||
|
val tcp = Socket()
|
||||||
|
tcp.soTimeout = 5000
|
||||||
|
tcp.connect(remotesocket, 30000)
|
||||||
|
val outstream = tcp.getOutputStream()
|
||||||
|
val instream = tcp.getInputStream()
|
||||||
|
outstream.write(command)
|
||||||
|
outstream.flush()
|
||||||
|
val reply = ByteArray(expectedlength)
|
||||||
|
instream.read(reply)
|
||||||
|
outstream.close()
|
||||||
|
instream.close()
|
||||||
|
tcp.close()
|
||||||
|
cb.accept(true, reply)
|
||||||
|
} catch (_: Exception){
|
||||||
|
cb.accept(false, ByteArray(0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrap payload into VX3K Request Command format
|
||||||
|
* @param commandID Command ID
|
||||||
|
* @param Payload Payload data
|
||||||
|
* @return ByteArray of the complete command
|
||||||
|
*/
|
||||||
|
private fun Make_Request_Command(commandID: Short, Payload: ByteArray) : ByteArray {
|
||||||
|
val result = ByteBuffer.allocate(8+Payload.size).order(ByteOrder.BIG_ENDIAN)
|
||||||
|
// command ID (2 bytes)
|
||||||
|
result.putShort(commandID)
|
||||||
|
// Response code (2 bytes), set 0 for Request
|
||||||
|
result.putShort(0)
|
||||||
|
// command length = command header (8 bytes) + payload size
|
||||||
|
result.putShort((Payload.size+8).toShort())
|
||||||
|
// flag and reserver = 0 (2 bytes)
|
||||||
|
result.putShort(0)
|
||||||
|
result.put(Payload)
|
||||||
|
// read to byte array
|
||||||
|
return result.array()
|
||||||
|
}
|
||||||
|
}
|
||||||
67
src/toa/Vx3K_BroadcastZone.kt
Normal file
67
src/toa/Vx3K_BroadcastZone.kt
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
package toa
|
||||||
|
|
||||||
|
import kotlin.experimental.and
|
||||||
|
import kotlin.experimental.or
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VX3K Broadcast Zone Configuration
|
||||||
|
* Old Firmware: Broadcast Zone 1 - 512
|
||||||
|
* New Firmware: Broadcast Zone 1 - 640
|
||||||
|
* @param NewFirmware Set to true if using new firmware version
|
||||||
|
*/
|
||||||
|
@Suppress("unused")
|
||||||
|
class Vx3K_BroadcastZone(val NewFirmware: Boolean = false) {
|
||||||
|
val payload: ByteArray = if (NewFirmware) ByteArray(80) else ByteArray(64)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a zone as active
|
||||||
|
* @param zonenumber Zone number to set (1 to 512 for old firmware, 1 to 640 for new firmware)
|
||||||
|
*/
|
||||||
|
fun SetZone(zonenumber: Int){
|
||||||
|
if (zonenumber<1) throw Exception("Minimum zone number is 1")
|
||||||
|
if (NewFirmware){
|
||||||
|
if (zonenumber>640) throw Exception("Maximum zone number is 640 for new firmware")
|
||||||
|
} else {
|
||||||
|
if (zonenumber>512) throw Exception("Maximum zone number is 512 for old firmware")
|
||||||
|
}
|
||||||
|
|
||||||
|
val byteIndex = (zonenumber - 1) / 8
|
||||||
|
val bitIndex = (zonenumber - 1) % 8
|
||||||
|
payload[byteIndex] = payload[byteIndex] or (1 shl bitIndex).toByte()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear a zone (set as inactive)
|
||||||
|
* @param zonenumber Zone number to clear (1 to 512 for old firmware, 1 to 640 for new firmware)
|
||||||
|
*/
|
||||||
|
fun ClearZone(zonenumber: Int){
|
||||||
|
if (zonenumber<1) throw Exception("Minimum zone number is 1")
|
||||||
|
if (NewFirmware){
|
||||||
|
if (zonenumber>640) throw Exception("Maximum zone number is 640 for new firmware")
|
||||||
|
} else {
|
||||||
|
if (zonenumber>512) throw Exception("Maximum zone number is 512 for old firmware")
|
||||||
|
}
|
||||||
|
|
||||||
|
val byteIndex = (zonenumber - 1) / 8
|
||||||
|
val bitIndex = (zonenumber - 1) % 8
|
||||||
|
payload[byteIndex] = payload[byteIndex] and ((1 shl bitIndex).inv().toByte())
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set all zones as active
|
||||||
|
*/
|
||||||
|
fun SetAllZones(){
|
||||||
|
for (i in payload.indices){
|
||||||
|
payload[i] = 0xFF.toByte()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear all zones (set all as inactive)
|
||||||
|
*/
|
||||||
|
fun ClearAllZones(){
|
||||||
|
for (i in payload.indices){
|
||||||
|
payload[i] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
src/web/StreamerOutputData.kt
Normal file
9
src/web/StreamerOutputData.kt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
package web
|
||||||
|
|
||||||
|
class StreamerOutputData(val index: UInt, val channel: String, val ipaddress: String, val vu: Int, val bufferRemain: Int, var isPlaying: Boolean) {
|
||||||
|
companion object{
|
||||||
|
fun fromBarixConnection(bc: barix.BarixConnection): StreamerOutputData {
|
||||||
|
return StreamerOutputData(bc.index, bc.channel, bc.ipaddress, bc.vu, bc.bufferRemain, bc.isPlaying())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ package web
|
|||||||
|
|
||||||
import StreamerOutputs
|
import StreamerOutputs
|
||||||
import codes.Somecodes
|
import codes.Somecodes
|
||||||
|
import codes.Somecodes.Companion.GetSensorsInfo
|
||||||
|
import codes.Somecodes.Companion.GetUptime
|
||||||
import codes.Somecodes.Companion.ListAudioFiles
|
import codes.Somecodes.Companion.ListAudioFiles
|
||||||
import codes.Somecodes.Companion.ValiDateForLogHtml
|
import codes.Somecodes.Companion.ValiDateForLogHtml
|
||||||
import codes.Somecodes.Companion.ValidFile
|
import codes.Somecodes.Companion.ValidFile
|
||||||
@@ -9,6 +11,7 @@ import codes.Somecodes.Companion.ValidIPV4
|
|||||||
import codes.Somecodes.Companion.ValidScheduleDay
|
import codes.Somecodes.Companion.ValidScheduleDay
|
||||||
import codes.Somecodes.Companion.ValidScheduleTime
|
import codes.Somecodes.Companion.ValidScheduleTime
|
||||||
import codes.Somecodes.Companion.ValidString
|
import codes.Somecodes.Companion.ValidString
|
||||||
|
import codes.Somecodes.Companion.ValidStrings
|
||||||
import com.fasterxml.jackson.databind.JsonNode
|
import com.fasterxml.jackson.databind.JsonNode
|
||||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||||
import content.Category
|
import content.Category
|
||||||
@@ -23,7 +26,6 @@ import database.ScheduleBank
|
|||||||
import database.SoundChannel
|
import database.SoundChannel
|
||||||
import database.Soundbank
|
import database.Soundbank
|
||||||
import database.UserDB
|
import database.UserDB
|
||||||
//>>>>>>>>> Temporary merge branch 2
|
|
||||||
import db
|
import db
|
||||||
import io.javalin.Javalin
|
import io.javalin.Javalin
|
||||||
import io.javalin.apibuilder.ApiBuilder.before
|
import io.javalin.apibuilder.ApiBuilder.before
|
||||||
@@ -40,7 +42,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook
|
|||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
// Set user session
|
// Set user session
|
||||||
it.sessionAttribute("user", user.first)
|
it.sessionAttribute("user", user.first)
|
||||||
println("User ${user.first} logged in")
|
//println("User ${user.first} logged in")
|
||||||
// Redirect to home page
|
// Redirect to home page
|
||||||
it.redirect("home.html")
|
it.redirect("home.html")
|
||||||
}
|
}
|
||||||
@@ -98,28 +99,32 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
before { CheckUsers(it) }
|
before { CheckUsers(it) }
|
||||||
ws("/ws") { ws ->
|
ws("/ws") { ws ->
|
||||||
// WebSocket endpoint for home
|
// WebSocket endpoint for home
|
||||||
ws.onClose { wsCloseContext ->
|
//
|
||||||
// TODO Handle WebSocket close event
|
|
||||||
println("WebSocket closed: ${wsCloseContext.session.remoteAddress}")
|
|
||||||
}
|
|
||||||
ws.onMessage { wsMessageContext ->
|
ws.onMessage { wsMessageContext ->
|
||||||
try {
|
try {
|
||||||
val cmd =
|
val cmd =
|
||||||
objectmapper.readValue(wsMessageContext.message(), WebsocketCommand::class.java)
|
objectmapper.readValue(wsMessageContext.message(), WebsocketCommand::class.java)
|
||||||
when (cmd.command) {
|
when (cmd.command) {
|
||||||
"getSystemTime" -> {
|
"getSystemTime" -> {
|
||||||
|
val systemtime = LocalDateTime.now().format(Somecodes.datetimeformat1)
|
||||||
|
val uptime = GetUptime()
|
||||||
SendReply(
|
SendReply(
|
||||||
wsMessageContext,
|
wsMessageContext,
|
||||||
cmd.command,
|
cmd.command,
|
||||||
LocalDateTime.now().format(Somecodes.datetimeformat1)
|
if (uptime.isNotEmpty()) "Date & Time : $systemtime\nSystem Uptime : $uptime" else "Date & Time : $systemtime"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
"getCPUStatus" -> {
|
"getCPUStatus" -> {
|
||||||
Somecodes.getCPUUsage { vv ->
|
Somecodes.getCPUUsage { vv ->
|
||||||
|
val sv = GetSensorsInfo()
|
||||||
|
if (sv.isNotEmpty()){
|
||||||
|
SendReply(wsMessageContext, cmd.command, vv+"\n"+sv)
|
||||||
|
} else {
|
||||||
SendReply(wsMessageContext, cmd.command, vv)
|
SendReply(wsMessageContext, cmd.command, vv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
"getMemoryStatus" -> {
|
"getMemoryStatus" -> {
|
||||||
SendReply(wsMessageContext, cmd.command, Somecodes.getMemoryUsage())
|
SendReply(wsMessageContext, cmd.command, Somecodes.getMemoryUsage())
|
||||||
@@ -130,9 +135,9 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
"getNetworkStatus" -> {
|
"getNetworkStatus" -> {
|
||||||
// TODO Get Network status
|
Somecodes.GetNetworkStatus { nn ->
|
||||||
Somecodes.GetNetworkStatus("")
|
SendReply(wsMessageContext, cmd.command, objectmapper.writeValueAsString(nn))
|
||||||
SendReply(wsMessageContext, cmd.command, "OK")
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"getPagingQueue" ->{
|
"getPagingQueue" ->{
|
||||||
@@ -144,7 +149,8 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
"getStreamerOutputs" -> {
|
"getStreamerOutputs" -> {
|
||||||
SendReply(wsMessageContext, cmd.command, objectmapper.writeValueAsString(StreamerOutputs.values.toList()))
|
val reply : List<StreamerOutputData> = StreamerOutputs.map { so -> StreamerOutputData.fromBarixConnection(so.value) }
|
||||||
|
SendReply(wsMessageContext, cmd.command, objectmapper.writeValueAsString(reply))
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
@@ -156,10 +162,9 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ws.onConnect { wsConnectContext ->
|
// ws.onConnect { wsConnectContext ->
|
||||||
// TODO Handle WebSocket connect event
|
// println("WebSocket connected: ${wsConnectContext.session.remoteAddress}")
|
||||||
println("WebSocket connected: ${wsConnectContext.session.remoteAddress}")
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,6 +241,23 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
get("ListFiles") {
|
get("ListFiles") {
|
||||||
it.result(objectmapper.writeValueAsString(ListAudioFiles(Somecodes.Soundbank_directory)))
|
it.result(objectmapper.writeValueAsString(ListAudioFiles(Somecodes.Soundbank_directory)))
|
||||||
}
|
}
|
||||||
|
get("GetPhrases/{Language}/{VoiceType}"){
|
||||||
|
val language = it.pathParam("Language")
|
||||||
|
val voiceType = it.pathParam("VoiceType")
|
||||||
|
if (ValidString(language) && Language.entries.any { lang -> lang.name == language }) {
|
||||||
|
if (ValidString(voiceType) && VoiceType.entries.any { vt -> vt.name == voiceType }) {
|
||||||
|
val phrases = db.soundDB.List
|
||||||
|
.filter { sb -> sb.Language == language }
|
||||||
|
.filter {sb -> sb.VoiceType == voiceType}
|
||||||
|
.filter { sb -> sb.Category == Category.Phrase.name}
|
||||||
|
.distinctBy { sb -> sb.TAG }
|
||||||
|
.sortedBy { sb -> sb.TAG }
|
||||||
|
it.result(objectmapper.writeValueAsString(phrases))
|
||||||
|
} else it.status(400)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Invalid VoiceType")))
|
||||||
|
} else it.status(400)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Invalid Language")))
|
||||||
|
}
|
||||||
get("AirlineTags") { ctx ->
|
get("AirlineTags") { ctx ->
|
||||||
val value = db.soundDB.List
|
val value = db.soundDB.List
|
||||||
.filter { it.Category == Category.Airplane_Name.name }
|
.filter { it.Category == Category.Airplane_Name.name }
|
||||||
@@ -267,6 +289,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.soundDB.Add(addvalue)) {
|
if (db.soundDB.Add(addvalue)) {
|
||||||
db.soundDB.Resort()
|
db.soundDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Added Sound Bank: $addvalue")
|
||||||
} else it.status(500)
|
} else it.status(500)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Failed to add soundbank to database")))
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to add soundbank to database")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
@@ -284,6 +307,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.soundDB.Clear()) {
|
if (db.soundDB.Clear()) {
|
||||||
db.soundDB.Get()
|
db.soundDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Sound Bank table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate soundbank table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate soundbank table")))
|
||||||
}
|
}
|
||||||
@@ -297,6 +321,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.soundDB.DeleteByIndex(index.toInt())) {
|
if (db.soundDB.DeleteByIndex(index.toInt())) {
|
||||||
db.soundDB.Resort()
|
db.soundDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Sound Bank with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete soundbank with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete soundbank with index $index")))
|
||||||
}
|
}
|
||||||
@@ -366,6 +391,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.soundDB.UpdateByIndex(index.toInt(), sb)) {
|
if (db.soundDB.UpdateByIndex(index.toInt(), sb)) {
|
||||||
db.soundDB.Resort()
|
db.soundDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Soundbank $sb")
|
||||||
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to update soundbank with index $index")))
|
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to update soundbank with index $index")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Nothing has changed for soundbank with index $index")))
|
.result(objectmapper.writeValueAsString(resultMessage("Nothing has changed for soundbank with index $index")))
|
||||||
@@ -417,8 +443,15 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
// get messagebank list
|
// get messagebank list
|
||||||
it.result(MariaDB.ArrayListtoString(db.messageDB.List))
|
it.result(MariaDB.ArrayListtoString(db.messageDB.List))
|
||||||
}
|
}
|
||||||
post("Add"){
|
get("MessageIDs") { ctx ->
|
||||||
val json : JsonNode = objectmapper.readTree(it.body())
|
val value = db.messageDB.List
|
||||||
|
.distinctBy { it.ANN_ID }
|
||||||
|
.sortedBy { it.ANN_ID }
|
||||||
|
.map { KeyValueMessage(it.ANN_ID.toString(), it.Description) }
|
||||||
|
ctx.result(objectmapper.writeValueAsString(value))
|
||||||
|
}
|
||||||
|
post("Add") {
|
||||||
|
val json: JsonNode = objectmapper.readTree(it.body())
|
||||||
val description = json.get("Description")?.asText("") ?: ""
|
val description = json.get("Description")?.asText("") ?: ""
|
||||||
val language = json.get("Language")?.asText("") ?: ""
|
val language = json.get("Language")?.asText("") ?: ""
|
||||||
val ann_id = json.get("ANN_ID")?.asInt()?.toUInt() ?: 0u
|
val ann_id = json.get("ANN_ID")?.asInt()?.toUInt() ?: 0u
|
||||||
@@ -435,6 +468,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.messageDB.Add(mb)){
|
if (db.messageDB.Add(mb)){
|
||||||
db.messageDB.Resort()
|
db.messageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Added Messagebank: $mb")
|
||||||
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add messagebank to database")))
|
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add messagebank to database")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Message_TAGS")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Message_TAGS")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Message_Detail")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Message_Detail")))
|
||||||
@@ -448,6 +482,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.messageDB.Clear()) {
|
if (db.messageDB.Clear()) {
|
||||||
db.messageDB.Get()
|
db.messageDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Message Bank table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate messagebank table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate messagebank table")))
|
||||||
}
|
}
|
||||||
@@ -461,6 +496,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.messageDB.DeleteByIndex(index.toInt())) {
|
if (db.messageDB.DeleteByIndex(index.toInt())) {
|
||||||
db.messageDB.Resort()
|
db.messageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Message Bank with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete messagebank with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete messagebank with index $index")))
|
||||||
}
|
}
|
||||||
@@ -521,6 +557,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.messageDB.UpdateByIndex(index.toInt(), mb)) {
|
if (db.messageDB.UpdateByIndex(index.toInt(), mb)) {
|
||||||
db.messageDB.Resort()
|
db.messageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Messagebank $mb")
|
||||||
} else it.status(500)
|
} else it.status(500)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Failed to update messagebank with index $index")))
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to update messagebank with index $index")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
@@ -573,7 +610,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
val json: JsonNode = objectmapper.readTree(it.body())
|
val json: JsonNode = objectmapper.readTree(it.body())
|
||||||
val tag = json.get("tag").asText("")
|
val tag = json.get("tag").asText("")
|
||||||
val languages = json.get("language").asText("").split(";")
|
val languages = json.get("language").asText("").split(";")
|
||||||
println("Add Language Link, tag=$tag, languages=$languages")
|
//println("Add Language Link, tag=$tag, languages=$languages")
|
||||||
if (ValidString(tag)){
|
if (ValidString(tag)){
|
||||||
if (languages.all { xx -> Language.entries.any { yy -> yy.name.equals(xx,true)} }){
|
if (languages.all { xx -> Language.entries.any { yy -> yy.name.equals(xx,true)} }){
|
||||||
if (!db.languageDB.List.any { ll -> ll.TAG.equals(tag,true) }) {
|
if (!db.languageDB.List.any { ll -> ll.TAG.equals(tag,true) }) {
|
||||||
@@ -581,13 +618,14 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.languageDB.Add(newvalue)){
|
if (db.languageDB.Add(newvalue)){
|
||||||
db.languageDB.Resort()
|
db.languageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Added Language Link: $newvalue")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add language link to database")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add language link to database")))
|
||||||
println("Failed to add language link to database")
|
//println("Failed to add language link to database")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("TAG=$tag already exists")))
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("TAG=$tag already exists")))
|
||||||
println("TAG=$tag already exists")
|
//println("TAG=$tag already exists")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Contains unsupported language")))
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Contains unsupported language")))
|
||||||
@@ -603,6 +641,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.languageDB.Clear()) {
|
if (db.languageDB.Clear()) {
|
||||||
db.languageDB.Resort()
|
db.languageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Language Link table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate language link table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate language link table")))
|
||||||
}
|
}
|
||||||
@@ -616,6 +655,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.languageDB.DeleteByIndex(index.toInt())) {
|
if (db.languageDB.DeleteByIndex(index.toInt())) {
|
||||||
db.languageDB.Resort()
|
db.languageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Language Link with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete language link with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete language link with index $index")))
|
||||||
}
|
}
|
||||||
@@ -650,6 +690,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.languageDB.UpdateByIndex(index.toInt(), ll)) {
|
if (db.languageDB.UpdateByIndex(index.toInt(), ll)) {
|
||||||
db.languageDB.Resort()
|
db.languageDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Language Link $ll")
|
||||||
} else it.status(500)
|
} else it.status(500)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Failed to update language link with index $index")))
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to update language link with index $index")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
@@ -702,6 +743,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.scheduleDB.Clear()) {
|
if (db.scheduleDB.Clear()) {
|
||||||
db.scheduleDB.Get()
|
db.scheduleDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Schedule Bank table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate schedulebank table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate schedulebank table")))
|
||||||
}
|
}
|
||||||
@@ -739,9 +781,9 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
language
|
language
|
||||||
)
|
)
|
||||||
if (db.scheduleDB.Add(newvalue)){
|
if (db.scheduleDB.Add(newvalue)){
|
||||||
|
|
||||||
db.scheduleDB.Resort()
|
db.scheduleDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Added Schedule Bank: $newvalue")
|
||||||
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add schedule to database")))
|
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add schedule to database")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Language")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Language")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Contains unsupported BroadcastZones")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Contains unsupported BroadcastZones")))
|
||||||
@@ -761,6 +803,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.scheduleDB.DeleteByIndex(index.toInt())) {
|
if (db.scheduleDB.DeleteByIndex(index.toInt())) {
|
||||||
db.scheduleDB.Resort()
|
db.scheduleDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Schedule Bank with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete schedule with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete schedule with index $index")))
|
||||||
}
|
}
|
||||||
@@ -840,6 +883,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.scheduleDB.UpdateByIndex(index.toInt(), sb)) {
|
if (db.scheduleDB.UpdateByIndex(index.toInt(), sb)) {
|
||||||
db.scheduleDB.Resort()
|
db.scheduleDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Schedule : $sb")
|
||||||
} else it.status(500)
|
} else it.status(500)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Failed to update schedule with index $index")))
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to update schedule with index $index")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
@@ -875,19 +919,192 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
db.scheduleDB.Resort()
|
db.scheduleDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to import schedulebank from XLSX")))
|
it.status(500)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to import schedulebank from XLSX")))
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
it.status(400)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Invalid XLSX file")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
path("UserManagement") {
|
||||||
|
get("List") {
|
||||||
|
it.result(objectmapper.writeValueAsString(db.userDB.List))
|
||||||
|
}
|
||||||
|
delete("List") {
|
||||||
|
if (db.userDB.Clear()) {
|
||||||
|
db.userDB.Get()
|
||||||
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear User Management table")
|
||||||
|
} else {
|
||||||
|
it.status(500)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to truncate user table")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post("Add") { ctx ->
|
||||||
|
val json: JsonNode = objectmapper.readTree(ctx.body())
|
||||||
|
val username = json.get("username").asText("")
|
||||||
|
val password = json.get("password").asText("")
|
||||||
|
val location = json.get("location").asText("")
|
||||||
|
val airline_tags = json.get("airline_tags").asText("")
|
||||||
|
val city_tags = json.get("city_tags").asText("")
|
||||||
|
val messagebank_ann_id = json.get("messagebank_ann_id").asText("")
|
||||||
|
val broadcastzones = json.get("broadcastzones").asText("")
|
||||||
|
if (ValidStrings(listOf(username, password, location, airline_tags, city_tags, messagebank_ann_id, broadcastzones))) {
|
||||||
|
if (!db.Username_exists(username)) {
|
||||||
|
// check apakah ada airline tag yang tidak ada di soundbank
|
||||||
|
val atags = airline_tags.split(";").map { it.trim() }
|
||||||
|
.filter { it.isNotEmpty() }.distinct()
|
||||||
|
val airlinetags = db.Get_AirlineCode_Tags()
|
||||||
|
if (atags.all { tag -> airlinetags.any { it == tag } }) {
|
||||||
|
// check apakah ada city tag yang tidak ada di soundbank
|
||||||
|
val ctags = city_tags.split(";").map { it.trim() }
|
||||||
|
.filter { it.isNotEmpty() }.distinct()
|
||||||
|
val citytags = db.Get_City_Tags()
|
||||||
|
if (ctags.all { tag -> citytags.any { it == tag } }) {
|
||||||
|
val bzdesc =
|
||||||
|
broadcastzones.split(";").map { it.trim() }
|
||||||
|
.filter { it.isNotEmpty() }.distinct()
|
||||||
|
val bzlist = db.Get_BroadcastZone_List()
|
||||||
|
if (bzdesc.all { desc -> bzlist.any { it == desc } }) {
|
||||||
|
val mbids = messagebank_ann_id.split(";")
|
||||||
|
.map { it.trim() }
|
||||||
|
.filter { it.isNotEmpty() }.distinct()
|
||||||
|
.mapNotNull { it.toUIntOrNull() }
|
||||||
|
val mbankids = db.Get_MessageID_List()
|
||||||
|
if (mbids.all { id -> mbankids.any { it == id } }) {
|
||||||
|
// semua valid, tambain ke database
|
||||||
|
val newuser = UserDB(
|
||||||
|
0u,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
location,
|
||||||
|
airline_tags,
|
||||||
|
city_tags,
|
||||||
|
messagebank_ann_id,
|
||||||
|
broadcastzones
|
||||||
|
)
|
||||||
|
if (db.userDB.Add(newuser)) {
|
||||||
|
db.userDB.Resort()
|
||||||
|
ctx.result(objectmapper.writeValueAsString(resultMessage("OK") ))
|
||||||
|
db.Add_Log("AAS", "Added User: $newuser")
|
||||||
|
} else ctx.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add user to database")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some ANN_ID not found in Messagebank") ))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some broadcast zone tags not found in soundbank")) )
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some city tags not found in soundbank")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some airline tags not found in soundbank")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString("Username already exists"))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Not all fields have value")))
|
||||||
|
}
|
||||||
|
delete("DeleteByIndex/{index}") {
|
||||||
|
// delete by index
|
||||||
|
val index = it.pathParam("index").toUIntOrNull()
|
||||||
|
if (index == null) {
|
||||||
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid index")))
|
||||||
|
} else {
|
||||||
|
if (db.userDB.DeleteByIndex(index.toInt())) {
|
||||||
|
db.userDB.Resort()
|
||||||
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted User with index $index")
|
||||||
|
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete user with index $index")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
patch("UpdateByIndex/{index}"){ ctx ->
|
||||||
|
// update by index
|
||||||
|
val index = ctx.pathParam("index").toUIntOrNull()
|
||||||
|
if (index!=null){
|
||||||
|
val user = db.userDB.List.find { xx -> xx.index == index }
|
||||||
|
if (user!=null){
|
||||||
|
val json : JsonNode = objectmapper.readTree(ctx.body())
|
||||||
|
if (!json.isEmpty){
|
||||||
|
val _username = json.get("username").asText("")
|
||||||
|
val _password = json.get("password").asText("")
|
||||||
|
val _location = json.get("location").asText("")
|
||||||
|
val _airline_tags = json.get("airline_tags").asText("")
|
||||||
|
val _city_tags = json.get("city_tags").asText("")
|
||||||
|
val _messagebank_ann_id = json.get("messagebank_ann_id").asText("")
|
||||||
|
val _broadcastzones = json.get("broadcastzones").asText("")
|
||||||
|
if (ValidStrings(listOf(_username, _password, _location, _airline_tags, _city_tags, _messagebank_ann_id, _broadcastzones))) {
|
||||||
|
val _otherusername = db.userDB.List.find { xx -> xx.username.equals(_username, true) && xx.index != index }
|
||||||
|
if (_otherusername == null) {
|
||||||
|
// belum ada user lain yang pakai username ini
|
||||||
|
val atags = _airline_tags.split(";").map { it.trim() }.filter { it.isNotEmpty() }.distinct()
|
||||||
|
val ctags = _city_tags.split(";").map { it.trim() }.filter { it.isNotEmpty() }.distinct()
|
||||||
|
val msgids = _messagebank_ann_id.split(";").map { it.trim() }.filter { it.isNotEmpty() }.distinct().mapNotNull { it.toUIntOrNull() }
|
||||||
|
val bzdesc = _broadcastzones.split(";").map { it.trim() }.filter { it.isNotEmpty() }.distinct()
|
||||||
|
|
||||||
|
val airline_tags = db.Get_AirlineCode_Tags()
|
||||||
|
val city_tags = db.Get_City_Tags()
|
||||||
|
val msgbankids = db.Get_MessageID_List()
|
||||||
|
val bzlist = db.Get_BroadcastZone_List()
|
||||||
|
if (atags.all { tag -> airline_tags.any { it == tag } }) {
|
||||||
|
if (ctags.all { tag -> city_tags.any { it == tag } }) {
|
||||||
|
if (msgids.all { tag -> msgbankids.any { it == tag } }) {
|
||||||
|
if (bzdesc.all { tag -> bzlist.any { it == tag } }) {
|
||||||
|
val editeduser = UserDB(index, _username, _password, _location, _airline_tags, _city_tags, _messagebank_ann_id, _broadcastzones)
|
||||||
|
if (!user.isEqual(editeduser)){
|
||||||
|
if (db.userDB.UpdateByIndex(index.toInt(), editeduser)){
|
||||||
|
db.userDB.Resort()
|
||||||
|
ctx.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated User : $editeduser")
|
||||||
|
} else ctx.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to update user with index $index")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Nothing has changed for user with index $index")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some broadcast zone is not found in Broadcast Zone list")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some ANN_ID not found in Messagebank")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Some city tags not found in soundbank")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString("Some airline tags not found in soundbank"))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Username already exists for another user")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Not all fiels have value")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("UpdateByIndex with index=$index has empty body")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("User with index $index not found")))
|
||||||
|
} else ctx.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid index")))
|
||||||
|
}
|
||||||
|
get("ExportXLSX") {
|
||||||
|
val xlsxdata = db.userDB.Export_XLSX()
|
||||||
|
if (xlsxdata != null) {
|
||||||
|
it.header(
|
||||||
|
"Content-Type",
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||||
|
)
|
||||||
|
it.header("Content-Disposition", "attachment; filename=\"userdb.xlsx\"")
|
||||||
|
it.outputStream().use { out ->
|
||||||
|
xlsxdata.write(out)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
it.status(500)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to export user table to XLSX")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post("ImportXLSX") {
|
||||||
|
val uploaded = it.uploadedFile("file")
|
||||||
|
if (uploaded == null) {
|
||||||
|
it.status(400)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("No file uploaded")))
|
||||||
|
return@post
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
val xlsx = XSSFWorkbook(uploaded.content())
|
||||||
|
if (db.userDB.Import_XLSX(xlsx)) {
|
||||||
|
db.userDB.Resort()
|
||||||
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
} else {
|
||||||
|
it.status(500)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to import user table from XLSX")))
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid XLSX file")))
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid XLSX file")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Kirim list message dan broadcast zones untuk ADD/Edit schedule
|
//TODO kirim list message dan broadcast zones untuk ADD/Edit schedule
|
||||||
//TODO add at js file for messagebank and broadcast zones values
|
|
||||||
get("GetMessageAndBroadcastZones") {
|
get("GetMessageAndBroadcastZones") {
|
||||||
val result = object {
|
val result = object {
|
||||||
val messages = db.messageDB.List.filter { mb -> !mb.Message_Detail.contains("[") && !mb.Message_Detail.contains("]") }
|
val messages = db.messageDB.List
|
||||||
val broadcastzones = db.broadcastDB.List
|
.filter { mb -> !mb.Message_Detail.contains("[") && !mb.Message_Detail.contains("]")}
|
||||||
|
.map { mb -> "${mb.Description} [${mb.ANN_ID}]" }
|
||||||
|
val broadcastzones = db.broadcastDB.List.map { it.description }
|
||||||
|
|
||||||
}
|
}
|
||||||
it.result(objectmapper.writeValueAsString(result))
|
it.result(objectmapper.writeValueAsString(result))
|
||||||
}
|
}
|
||||||
@@ -895,7 +1112,9 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
// Kirim list language dari Messagebank berdasarkan ANN_ID
|
// Kirim list language dari Messagebank berdasarkan ANN_ID
|
||||||
get("GetLanguageList/{ANN_ID}") { get1 ->
|
get("GetLanguageList/{ANN_ID}") { get1 ->
|
||||||
//kirim list language dari Messagebank
|
//kirim list language dari Messagebank
|
||||||
val langlist = db.messageDB.List.filter { it.ANN_ID == get1.pathParam("ANN_ID").toInt().toUInt() }.map { it.Language }.distinct()
|
val langlist = db.messageDB.List
|
||||||
|
.filter { it.ANN_ID == get1.pathParam("ANN_ID").toInt().toUInt() }
|
||||||
|
.map { it.Language }.distinct()
|
||||||
get1.result(objectmapper.writeValueAsString(langlist))
|
get1.result(objectmapper.writeValueAsString(langlist))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -947,24 +1166,20 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
path("BroadcastZones"){
|
path("BroadcastZones"){
|
||||||
get("List") {
|
get("List") {
|
||||||
// TODO : temporary, convert BroadcastZones to BroadcastZonesHtml, karena harus revisi javascript di Bootstrap Studio
|
|
||||||
// val newlist: ArrayList<BroadcastZonesHtml> = db.broadcastDB.List.map { xx ->
|
|
||||||
// BroadcastZonesHtml(
|
|
||||||
// xx.index,
|
|
||||||
// xx.description,
|
|
||||||
// xx.SoundChannel,
|
|
||||||
// xx.id,
|
|
||||||
// xx.bp
|
|
||||||
// )
|
|
||||||
// } as ArrayList<BroadcastZonesHtml>
|
|
||||||
|
|
||||||
it.result(MariaDB.ArrayListtoString(db.broadcastDB.List))
|
it.result(MariaDB.ArrayListtoString(db.broadcastDB.List))
|
||||||
}
|
}
|
||||||
delete("List"){
|
get("BroadcastZoneDescriptions") { ctx ->
|
||||||
|
val value = db.broadcastDB.List
|
||||||
|
.distinctBy { it.description }
|
||||||
|
.map { it.description }
|
||||||
|
ctx.result(objectmapper.writeValueAsString(value))
|
||||||
|
}
|
||||||
|
delete("List") {
|
||||||
// truncate broadcast zones table
|
// truncate broadcast zones table
|
||||||
if (db.broadcastDB.Clear()) {
|
if (db.broadcastDB.Clear()) {
|
||||||
db.broadcastDB.Get()
|
db.broadcastDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Broadcast Zones table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate broadcast zones table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate broadcast zones table")))
|
||||||
}
|
}
|
||||||
@@ -983,6 +1198,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.broadcastDB.Add(newbp)){
|
if (db.broadcastDB.Add(newbp)){
|
||||||
db.broadcastDB.Resort()
|
db.broadcastDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS","Added Broadcast Zone: $newbp")
|
||||||
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add broadcast zone to database")))
|
} else it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to add broadcast zone to database")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Relay")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Relay")))
|
||||||
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Box")))
|
} else it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid Box")))
|
||||||
@@ -998,6 +1214,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.broadcastDB.DeleteByIndex(index.toInt())) {
|
if (db.broadcastDB.DeleteByIndex(index.toInt())) {
|
||||||
db.broadcastDB.Resort()
|
db.broadcastDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Broadcast Zone with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete broadcast zone with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete broadcast zone with index $index")))
|
||||||
}
|
}
|
||||||
@@ -1042,6 +1259,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.broadcastDB.UpdateByIndex(index.toInt(), bz)) {
|
if (db.broadcastDB.UpdateByIndex(index.toInt(), bz)) {
|
||||||
db.broadcastDB.Resort()
|
db.broadcastDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Broadcast Zone : $bz")
|
||||||
} else it.status(500)
|
} else it.status(500)
|
||||||
.result(objectmapper.writeValueAsString(resultMessage("Failed to update broadcast zone with index $index")))
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to update broadcast zone with index $index")))
|
||||||
} else it.status(400)
|
} else it.status(400)
|
||||||
@@ -1090,11 +1308,15 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
get("List"){
|
get("List"){
|
||||||
it.result(MariaDB.ArrayListtoString(db.soundchannelDB.List))
|
it.result(MariaDB.ArrayListtoString(db.soundchannelDB.List))
|
||||||
}
|
}
|
||||||
delete("List"){
|
get("SoundChannelDescriptions") {
|
||||||
|
it.result(objectmapper.writeValueAsString(db.Get_SoundChannel_List()))
|
||||||
|
}
|
||||||
|
delete("List") {
|
||||||
// truncate sound channel table
|
// truncate sound channel table
|
||||||
if (db.soundchannelDB.Clear()) {
|
if (db.soundchannelDB.Clear()) {
|
||||||
db.soundchannelDB.Get()
|
db.soundchannelDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Sound Channel table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate sound channel table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate sound channel table")))
|
||||||
}
|
}
|
||||||
@@ -1128,25 +1350,28 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// cek apakah ada soundchannel lain yang pakai ip dan channel yang sama
|
// cek apakah ada soundchannel lain yang pakai ip dan channel yang sama
|
||||||
if (db.soundchannelDB.List.any { xx -> xx.index != index && _ip.equals(xx.ip) && _channel.equals(xx.channel, true) }) {
|
val othersc = db.soundchannelDB.List.filter { sc -> sc.ip == _ip }.filter { sc -> sc.index != index }
|
||||||
println("Another sound channel already uses IP $_ip and channel $_channel")
|
if (othersc.isNotEmpty()){
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Another sound channel already uses IP $_ip and channel $_channel")))
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("This IP address is already used by another sound channel")))
|
||||||
return@patch
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
// ada sesuatu yang ganti
|
// ada sesuatu yang ganti
|
||||||
val newsc = SoundChannel(0u, _channel, _ip)
|
val newsc = SoundChannel(0u, _channel, _ip)
|
||||||
if (db.soundchannelDB.UpdateByIndex(index.toInt(),newsc)){
|
if (db.soundchannelDB.UpdateByIndex(index.toInt(), newsc)) {
|
||||||
println("Updated sound channel with index $index")
|
println("Updated sound channel with index $index")
|
||||||
|
|
||||||
db.soundchannelDB.Resort()
|
db.soundchannelDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Updated Sound Channel : $newsc")
|
||||||
} else {
|
} else {
|
||||||
println("Failed to update sound channel with index $index")
|
println("Failed to update sound channel with index $index")
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to update sound channel with index $index")))
|
it.status(500)
|
||||||
return@patch
|
.result(objectmapper.writeValueAsString(resultMessage("Failed to update sound channel with index $index")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
println("Invalid IP address")
|
println("Invalid IP address")
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid IP address")))
|
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid IP address")))
|
||||||
@@ -1161,7 +1386,6 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
get("ExportXLSX"){
|
get("ExportXLSX"){
|
||||||
val xlsxdata = db.soundchannelDB.Export_XLSX()
|
val xlsxdata = db.soundchannelDB.Export_XLSX()
|
||||||
@@ -1193,23 +1417,23 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to import sound channel from XLSX")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to import sound channel from XLSX")))
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid XLSX file")))
|
it.status(400)
|
||||||
|
.result(objectmapper.writeValueAsString(resultMessage("Invalid XLSX file")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Steph : coba tambah untuk QueuePaging Table. Belum ada di JS file(?)
|
// Steph : coba tambah untuk QueuePaging Table. Belum ada di JS file(?)
|
||||||
path("QueuePaging"){
|
path("QueuePaging"){
|
||||||
|
|
||||||
get("List"){
|
get("List"){
|
||||||
it.result(MariaDB.ArrayListtoString(db.queuepagingDB.List))
|
it.result(MariaDB.ArrayListtoString(db.queuepagingDB.List))
|
||||||
}
|
}
|
||||||
|
|
||||||
delete("List"){
|
delete("List"){
|
||||||
// truncate queue paging table
|
// truncate queue paging table
|
||||||
if (db.queuepagingDB.Clear()) {
|
if (db.queuepagingDB.Clear()) {
|
||||||
db.queuepagingDB.Get()
|
db.queuepagingDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear queue paging table")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate queue paging table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate queue paging table")))
|
||||||
}
|
}
|
||||||
@@ -1223,6 +1447,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.queuepagingDB.DeleteByIndex(index.toInt())) {
|
if (db.queuepagingDB.DeleteByIndex(index.toInt())) {
|
||||||
db.queuepagingDB.Resort()
|
db.queuepagingDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted queue paging with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete queue paging with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete queue paging with index $index")))
|
||||||
}
|
}
|
||||||
@@ -1234,21 +1459,20 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
|
|
||||||
// Steph : coba tambah untuk QueueTable Table. Belum ada di JS file(?)
|
// Steph : coba tambah untuk QueueTable Table. Belum ada di JS file(?)
|
||||||
path("QueueTable"){
|
path("QueueTable"){
|
||||||
|
|
||||||
get("List"){
|
get("List"){
|
||||||
it.result(MariaDB.ArrayListtoString(db.queuetableDB.List))
|
it.result(MariaDB.ArrayListtoString(db.queuetableDB.List))
|
||||||
}
|
}
|
||||||
|
|
||||||
delete("List"){
|
delete("List"){
|
||||||
// truncate queue table
|
// truncate queue table
|
||||||
if (db.queuetableDB.Clear()) {
|
if (db.queuetableDB.Clear()) {
|
||||||
db.queuetableDB.Get()
|
db.queuetableDB.Get()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Clear Automatic Queue Table")
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate queue sound table")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate queue sound table")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete("DeleteByIndex/{index}") {
|
delete("DeleteByIndex/{index}") {
|
||||||
// delete by index
|
// delete by index
|
||||||
val index = it.pathParam("index").toUIntOrNull()
|
val index = it.pathParam("index").toUIntOrNull()
|
||||||
@@ -1258,6 +1482,7 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
|||||||
if (db.queuetableDB.DeleteByIndex(index.toInt())) {
|
if (db.queuetableDB.DeleteByIndex(index.toInt())) {
|
||||||
db.queuetableDB.Resort()
|
db.queuetableDB.Resort()
|
||||||
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
|
||||||
|
db.Add_Log("AAS", "Deleted Automatic Queue Table with index $index")
|
||||||
} else {
|
} else {
|
||||||
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete queue sound with index $index")))
|
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to delete queue sound with index $index")))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user