';
rowHtml += '' + (row.gnb_id !== 'nan' ? row.gnb_id : '') + ' | ';
rowHtml += '' + (row.c_rnti !== 'nan' ? row.c_rnti : '') + ' | ';
rowHtml += '' + (row.gnb_du_ue_f1ap_id !== 'nan' ? row.gnb_du_ue_f1ap_id : '') + ' | ';
rowHtml += '' + (row.gnb_cu_ue_f1ap_id !== 'nan' ? row.gnb_cu_ue_f1ap_id : '') + ' | ';
rowHtml += '' + (row.gnb_cu_cp_ue_e1ap_id !== 'nan' ? row.gnb_cu_cp_ue_e1ap_id : '') + ' | ';
rowHtml += '' + (row.gnb_cu_up_ue_e1ap_id !== 'nan' ? row.gnb_cu_up_ue_e1ap_id : '') + ' | ';
rowHtml += '' + (row.ran_ue_ngap_id !== 'nan' ? row.ran_ue_ngap_id : '') + ' | ';
rowHtml += '' + (row.amf_ue_ngap_id !== 'nan' ? row.amf_ue_ngap_id : '') + ' | ';
rowHtml += '' + (row.xnap_src_ran_id !== 'nan' ? row.xnap_src_ran_id : '') + ' | ';
rowHtml += '' + (row.xnap_trgt_ran_id !== 'nan' ? row.xnap_trgt_ran_id : '') + ' | ';
rowHtml += '' + (row.pci !== 'nan' ? row.pci : '') + ' | ';
rowHtml += '' + (row.f1ap_cause !== null ? row.f1ap_cause : '') + ' | ';
rowHtml += '' + (row.ngap_cause !== null ? row.ngap_cause : '') + ' | ';
rowHtml += '
';
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()
document.title = "List View"
{% endblock js %}