Skip to content

Commit 7c08514

Browse files
chore: sync dashboard UI from dashboard-ui@5a29729a1c26e8b81e8f2ef165ae6c1bbc827339
1 parent 2b84b4f commit 7c08514

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

apiforgepy/dashboard.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@
726726
}
727727
728728
// ─── Overview ─────────────────────────────────────────────────────────────────
729-
function Overview({ timeRange, setRoute, setParams }) {
729+
function Overview({ timeRange, setRoute, setParams, lastUpdated }) {
730730
const { ENDPOINTS, RELEASES, INSIGHTS, SUMMARY } = window.AF_DATA;
731731
const [globalTs, setGlobalTs] = useState(null);
732732
const hours = TIME_HOURS[timeRange] || 24;
@@ -735,7 +735,7 @@
735735
setGlobalTs(null);
736736
fetch(`/api/global-timeseries?hours=${hours}`)
737737
.then(r => r.json()).then(d => setGlobalTs(d)).catch(() => setGlobalTs([]));
738-
}, [hours]);
738+
}, [hours, lastUpdated]);
739739
740740
const chartData = globalTs ? tsBucketsToChart(globalTs, hours) : null;
741741
const points = Math.max(chartData?.p90?.length || 0, 2);
@@ -1057,7 +1057,7 @@
10571057
}
10581058
10591059
// ─── Endpoint detail ──────────────────────────────────────────────────────────
1060-
function EndpointDetail({ id, timeRange, setRoute, setParams }) {
1060+
function EndpointDetail({ id, timeRange, setRoute, setParams, lastUpdated }) {
10611061
const { ENDPOINTS, INSIGHTS } = window.AF_DATA;
10621062
const ep = ENDPOINTS.find(e => e.id === id) || ENDPOINTS[0];
10631063
const [tab, setTab] = useState('performance');
@@ -1072,7 +1072,7 @@
10721072
setTs(null);
10731073
fetch(`/api/timeseries?route=${encodeURIComponent(route)}&method=${encodeURIComponent(method)}&hours=${hours}`)
10741074
.then(r => r.json()).then(d => setTs(d)).catch(() => setTs([]));
1075-
}, [id, hours]);
1075+
}, [id, hours, lastUpdated]);
10761076
10771077
if (!ep) return <div className="empty-state">Endpoint not found.</div>;
10781078
@@ -1635,9 +1635,9 @@
16351635
lastUpdated={lastUpdated} onRefresh={() => fetchData.current()}/>
16361636
<div className="content">
16371637
<div className="content-inner">
1638-
{route === 'overview' && <Overview timeRange={timeRange} setRoute={setRoute} setParams={setParams}/>}
1638+
{route === 'overview' && <Overview timeRange={timeRange} setRoute={setRoute} setParams={setParams} lastUpdated={lastUpdated}/>}
16391639
{route === 'endpoints' && <Endpoints setRoute={setRoute} setParams={setParams}/>}
1640-
{route === 'endpoint' && <EndpointDetail id={params.id} timeRange={timeRange} setRoute={setRoute} setParams={setParams}/>}
1640+
{route === 'endpoint' && <EndpointDetail id={params.id} timeRange={timeRange} setRoute={setRoute} setParams={setParams} lastUpdated={lastUpdated}/>}
16411641
{route === 'insights' && <Insights setRoute={setRoute} setParams={setParams}/>}
16421642
{route === 'releases' && <Releases/>}
16431643
{route === 'settings' && <Settings/>}

0 commit comments

Comments
 (0)