add worker event tracking; implement worker rates display in admin panel

This commit is contained in:
ImBenji 2026-04-23 20:24:23 +01:00
parent fb7ffc7cf1
commit 53058ab94d

View file

@ -1560,11 +1560,15 @@ function renderIntelGraph() {
.attr('fill', d => SECTOR_COLOR[d.sector] || '#888') .attr('fill', d => SECTOR_COLOR[d.sector] || '#888')
.attr('stroke', 'transparent') .attr('stroke', 'transparent')
.attr('stroke-width', 2) .attr('stroke-width', 2)
.on('mouseenter', function () { .on('mouseenter', function (ev, d) {
d3.select(this).attr('stroke', 'rgba(255,255,255,0.85)'); if (d.id !== graphSelectedId) {
d3.select(this).attr('stroke', 'rgba(255,255,255,0.6)');
}
}) })
.on('mouseleave', function () { .on('mouseleave', function (ev, d) {
d3.select(this).attr('stroke', 'transparent'); if (d.id !== graphSelectedId) {
d3.select(this).attr('stroke', 'transparent');
}
}) })
.on('click', (ev, d) => { .on('click', (ev, d) => {
ev.stopPropagation(); ev.stopPropagation();
@ -1599,6 +1603,8 @@ function renderIntelGraph() {
.force('link', d3.forceLink(edgesCopy).id(d => d.id).distance(80)) .force('link', d3.forceLink(edgesCopy).id(d => d.id).distance(80))
.force('charge', d3.forceManyBody().strength(-300)) .force('charge', d3.forceManyBody().strength(-300))
.force('center', d3.forceCenter(width / 2, height / 2)) .force('center', d3.forceCenter(width / 2, height / 2))
.force('x', d3.forceX(width / 2).strength(0.07))
.force('y', d3.forceY(height / 2).strength(0.07))
.force('collide', d3.forceCollide(d => graphNodeRadius(d) + 4)); .force('collide', d3.forceCollide(d => graphNodeRadius(d) + 4));
sim.on('tick', () => { sim.on('tick', () => {
@ -1665,6 +1671,10 @@ function applyGraphFilters() {
.style('display', d => visibleIds.has(d.id) ? null : 'none') .style('display', d => visibleIds.has(d.id) ? null : 'none')
.style('opacity', d => (lit && !lit.has(d.id)) ? 0.15 : 1); .style('opacity', d => (lit && !lit.has(d.id)) ? 0.15 : 1);
nodeSel.select('circle')
.attr('stroke', d => d.id === graphSelectedId ? '#ffffff' : 'transparent')
.attr('stroke-width', d => d.id === graphSelectedId ? 2.5 : 2);
linkSel linkSel
.style('display', e => { .style('display', e => {
if (filter !== 'all' && e.type !== filter) return 'none'; if (filter !== 'all' && e.type !== filter) return 'none';