Add graph filter by entity type/running state and fix duplicate API calls
- Add entity type toggle pills and running/stopped filter to graph filter bar - DataCache: return cached data if fresh, skip redundant fetches on page load - Entity events: use force-fetch instead of invalidate+fetch to avoid stale gap - Add no-cache middleware for static JS/CSS/JSON to prevent stale browser cache - Reduces API calls on page load from ~70 to ~30 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -704,21 +704,66 @@
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: none;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
background: var(--bg-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
padding: 8px 10px;
|
||||
z-index: 30;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
min-width: 260px;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.graph-filter.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.graph-filter-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.graph-filter-pills {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.graph-filter-pill {
|
||||
background: transparent;
|
||||
border: 1px solid var(--pill-color, var(--border-color));
|
||||
color: var(--pill-color, var(--text-muted));
|
||||
border-radius: 12px;
|
||||
padding: 2px 8px;
|
||||
font-size: 0.7rem;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.graph-filter-pill:hover {
|
||||
background: color-mix(in srgb, var(--pill-color, var(--border-color)) 15%, transparent);
|
||||
}
|
||||
|
||||
.graph-filter-pill.active {
|
||||
background: var(--pill-color, var(--primary-color));
|
||||
color: #fff;
|
||||
border-color: var(--pill-color, var(--primary-color));
|
||||
}
|
||||
|
||||
.graph-filter-sep {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
background: var(--border-color);
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.graph-filter-icon {
|
||||
flex-shrink: 0;
|
||||
stroke: var(--text-muted);
|
||||
|
||||
Reference in New Issue
Block a user