forked from github-starred/komodo
fix core historical stats query filter: specify server_id
This commit is contained in:
@@ -486,7 +486,7 @@ impl State {
|
||||
"ts",
|
||||
limit,
|
||||
query.page as u64 * limit as u64,
|
||||
doc! { "ts": { "$mod": [ts_mod, 0] } },
|
||||
doc! { "server_id": server_id, "ts": { "$mod": [ts_mod, 0] } },
|
||||
projection,
|
||||
)
|
||||
.await
|
||||
|
||||
@@ -25,7 +25,7 @@ const Home: Component<{}> = (p) => {
|
||||
<Match when={width() >= 1200}>
|
||||
<Grid class={combineClasses(s.Home)}>
|
||||
<Servers />
|
||||
<Grid>
|
||||
<Grid style={{ height: "fit-content" }}>
|
||||
<Summary />
|
||||
<Updates />
|
||||
</Grid>
|
||||
|
||||
@@ -107,7 +107,7 @@ const Server: Component<{ id: string }> = (p) => {
|
||||
<Icon type="refresh" width="0.85rem" />
|
||||
</button>
|
||||
</Show>
|
||||
<A href={`/server/${p.id}/stats`} class="blue">
|
||||
<A href={`/server/${p.id}/stats`} class="blue" onClick={e => e.stopPropagation()}>
|
||||
<Icon type="timeline-line-chart" />
|
||||
</A>
|
||||
</Flex>
|
||||
|
||||
@@ -60,12 +60,12 @@ export const LoadChart: Component<{
|
||||
disableScroll?: boolean;
|
||||
}> = (p) => {
|
||||
const line = () => {
|
||||
return p.stats()?.filter(s => s.system_load !== undefined).map((s) => {
|
||||
return p.stats()?.map((s) => {
|
||||
return {
|
||||
time: convertTsMsToLocalUnixTsInSecs(
|
||||
(s as SystemStatsRecord).ts || (s as SystemStats).refresh_ts
|
||||
),
|
||||
value: s.system_load!,
|
||||
value: s.system_load || 0,
|
||||
};
|
||||
});
|
||||
};
|
||||
@@ -114,17 +114,14 @@ export const CpuFreqChart: Component<{
|
||||
disableScroll?: boolean;
|
||||
}> = (p) => {
|
||||
const line = () => {
|
||||
return p
|
||||
.stats()
|
||||
?.filter((s) => s.cpu_freq_mhz !== undefined)
|
||||
.map((s) => {
|
||||
return {
|
||||
time: convertTsMsToLocalUnixTsInSecs(
|
||||
(s as SystemStatsRecord).ts || (s as SystemStats).refresh_ts
|
||||
),
|
||||
value: s.cpu_freq_mhz! / 1000,
|
||||
};
|
||||
});
|
||||
return p.stats()?.map((s) => {
|
||||
return {
|
||||
time: convertTsMsToLocalUnixTsInSecs(
|
||||
(s as SystemStatsRecord).ts || (s as SystemStats).refresh_ts
|
||||
),
|
||||
value: (s.cpu_freq_mhz || 0) / 1000,
|
||||
};
|
||||
});
|
||||
};
|
||||
return (
|
||||
<SingleStatChart
|
||||
|
||||
Reference in New Issue
Block a user