';
rowHtml += '' + row.id + ' | ';
rowHtml += '' + row.C_RNTI + ' | ';
rowHtml += '' + row.GNB_DU_UE_F1AP_ID + ' | ';
rowHtml += '' + row.GNB_CU_UE_F1AP_ID + ' | ';
rowHtml += '' + row.GNB_CU_CP_UE_E1AP_ID + ' | ';
rowHtml += '' + row.GNB_CU_UP_UE_E1AP_ID + ' | ';
rowHtml += '' + row.RAN_UE_NGAP_ID + ' | ';
rowHtml += '' + row.AMF_UE_NGAP_ID + ' | ';
rowHtml += '' + row.XNAP_SRC_RAN_ID + ' | ';
rowHtml += '' + row.XNAP_TRGT_RAN_ID + ' | ';
rowHtml += '' + row.pci + ' | ';
rowHtml += '
';
table.append(rowHtml);
}
$('#main-table tbody tr').click(function () {
var mainId = $(this).data('main-id');
var url = 'draw-sequence/' + mainId + '/';
// Fetch associated data based on the main ID and display it
window.location.href = url;
});
});
}
function streamingView() {
fetchData();
}
// Add click event listener to the refresh button
$('#refresh-btn').click(function () {
fetchData();
});
setInterval(streamingView, 5000000);
// Get the input element and table
const input = document.getElementById('search-input');
const table = document.getElementById('main-table');
const rows = table.getElementsByTagName('tr');
// Get the input field, table, and checkboxes
const filterInput = document.getElementById('filterInput');
const mainTable = document.getElementById('main-table');
const tableRows = mainTable.getElementsByTagName('tr');
const filterCheckboxes = document.querySelectorAll('.filter-checkbox');
// Add an input event listener to the filter input field
filterInput.addEventListener('input', updateTableFilter);
// Add click event listeners to the filter checkboxes
filterCheckboxes.forEach(checkbox => {
checkbox.addEventListener('click', updateTableFilter);
});
function updateTableFilter() {
const filterValue = filterInput.value.toLowerCase();
const checkedColumns = [...filterCheckboxes].filter(checkbox => checkbox.checked).map(checkbox => parseInt(checkbox.getAttribute('data-col')));
// Iterate through the rows and hide/show them based on the filter value and checked columns
for (let i = 1; i < tableRows.length; i++) { // Start from 1 to skip the header row
const row = tableRows[i];
let foundMatch = false;
// Iterate through the cells in the row
for (let j = 0; j < row.cells.length; j++) {
if (checkedColumns.includes(j)) {
const cell = row.cells[j];
if (cell) {
const cellText = cell.textContent || cell.innerText;
if (cellText.toLowerCase().includes(filterValue)) {
foundMatch = true;
break;
}
}
}
}
// Show or hide the row based on the filter result
if (foundMatch) {
row.style.display = '';
} else {
row.style.display = 'none';
}
}
}
streamingView()
{% endblock js %}