Skip to content

Commit b5c6eb6

Browse files
vhvyclaude
andauthored
fix: move proxy group filter from speedGroupByName to overview page (#1847) (#1877)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent d961367 commit b5c6eb6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pages/overview.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,17 @@ const globalStore = useGlobalStore()
2121
const connectionsStore = useConnectionsStore()
2222
const endpointStore = useEndpointStore()
2323
const configStore = useConfigStore()
24+
const proxiesStore = useProxiesStore()
2425
2526
const formatBytes = (bytes: number) => byteSize(bytes).toString()
2627
28+
// Ensure proxy data is available for isProxyGroup filtering in top proxies chart
29+
onMounted(() => {
30+
if (proxiesStore.proxies.length === 0) {
31+
proxiesStore.fetchProxies()
32+
}
33+
})
34+
2735
// Reactive theme colors - recomputes when theme changes
2836
const themeColors = computed(() => {
2937
// Access curTheme to create reactive dependency
@@ -230,8 +238,9 @@ const networkTypesChartOptions = computed<Highcharts.Options>(() => {
230238
const topProxiesChartOptions = computed<Highcharts.Options>(() => {
231239
const speedByName = connectionsStore.speedGroupByName
232240
233-
// Get top 5 proxies by speed
241+
// Get top 5 proxies by speed, excluding proxy groups
234242
const sortedProxies = Object.entries(speedByName)
243+
.filter(([name]) => !proxiesStore.isProxyGroup(name))
235244
.sort(([, a], [, b]) => b - a)
236245
.slice(0, 5)
237246

stores/connections.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,12 @@ export const useConnectionsStore = defineStore('connections', () => {
306306
dataUsageMap.value = updates
307307
}
308308

309-
// Computed: speed grouped by proxy name (excluding proxy groups)
309+
// Computed: speed grouped by proxy name
310310
const speedGroupByName = computed(() => {
311-
const proxiesStore = useProxiesStore()
312311
const returnMap: Record<string, number> = {}
313312

314313
activeConnections.value.forEach((c) => {
315314
c.chains.forEach((chain) => {
316-
if (proxiesStore.isProxyGroup(chain)) return
317-
318315
if (!returnMap[chain]) {
319316
returnMap[chain] = 0
320317
}

0 commit comments

Comments
 (0)