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('stroke', 'transparent')
.attr('stroke-width', 2)
.on('mouseenter', function () {
d3.select(this).attr('stroke', 'rgba(255,255,255,0.85)');
.on('mouseenter', function (ev, d) {
if (d.id !== graphSelectedId) {
d3.select(this).attr('stroke', 'rgba(255,255,255,0.6)');
}
})
.on('mouseleave', function () {
.on('mouseleave', function (ev, d) {
if (d.id !== graphSelectedId) {
d3.select(this).attr('stroke', 'transparent');
}
})
.on('click', (ev, d) => {
ev.stopPropagation();
@ -1599,6 +1603,8 @@ function renderIntelGraph() {
.force('link', d3.forceLink(edgesCopy).id(d => d.id).distance(80))
.force('charge', d3.forceManyBody().strength(-300))
.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));
sim.on('tick', () => {
@ -1665,6 +1671,10 @@ function applyGraphFilters() {
.style('display', d => visibleIds.has(d.id) ? null : 'none')
.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
.style('display', e => {
if (filter !== 'all' && e.type !== filter) return 'none';