Files
firewallissues/web/js/script.js
T
aaron.axvig cf56445915
Test and deploy / deploy (push) Successful in 31s
Fixes for scatterplot
2026-07-29 10:06:39 -05:00

41 lines
1.3 KiB
JavaScript

import { loadIssuesForCheckedPaths } from './issues.js';
import {
getCheckedFileRefs,
initializeTree,
renderProductTree,
restoreTreeState,
selectAddressedRelease
} from './tree.js';
import { applyIssueSearchFilter, getIssueTypeFilters, initializeUI } from './ui.js';
import { expandFilePrefixLevel } from './product-tree-model.js';
document.addEventListener('DOMContentLoaded', () => {
initializeUI({ onSelectionChange: refreshIssuesForCurrentSelection });
initializeTree('product-tree', refreshIssuesForCurrentSelection);
loadProductTree();
});
let productsData = {};
function refreshIssuesForCurrentSelection() {
loadIssuesForCheckedPaths({
issueTypeFilters: getIssueTypeFilters(),
checkedFileRefs: getCheckedFileRefs(),
applyIssueSearchFilter
});
}
function loadProductTree() {
fetch('data/products.json')
.then(response => response.json())
.then(async data => {
productsData = expandFilePrefixLevel(data);
await renderProductTree(productsData);
restoreTreeState();
const params = new URLSearchParams(window.location.search);
selectAddressedRelease(params.get('product'), params.get('release'));
refreshIssuesForCurrentSelection();
})
.catch(error => console.error('Error loading products:', error));
}