From cb6fe5ced9aea7dd77fe8883263dae5df945d229 Mon Sep 17 00:00:00 2001 From: mrv777 Date: Tue, 8 Oct 2024 17:31:42 -0500 Subject: [PATCH 1/4] fix: Add isUsingFallbackStratum & test hash random --- main/http_server/axe-os/src/app/services/system.service.ts | 3 ++- main/http_server/axe-os/src/models/ISystemInfo.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main/http_server/axe-os/src/app/services/system.service.ts b/main/http_server/axe-os/src/app/services/system.service.ts index 500e43b91..68cae8f38 100644 --- a/main/http_server/axe-os/src/app/services/system.service.ts +++ b/main/http_server/axe-os/src/app/services/system.service.ts @@ -26,7 +26,7 @@ export class SystemService { current: 2237.5, temp: 60, vrTemp: 45, - hashRate: 475, + hashRate: Math.floor(Math.random() * (350 - 300 + 1)) + 300, bestDiff: "0", bestSessionDiff: "0", freeHeap: 200504, @@ -49,6 +49,7 @@ export class SystemService { fallbackStratumPort: 21497, stratumUser: "bc1q99n3pu025yyu0jlywpmwzalyhm36tg5u37w20d.bitaxe-U1", fallbackStratumUser: "bc1q99n3pu025yyu0jlywpmwzalyhm36tg5u37w20d.bitaxe-U1", + isUsingFallbackStratum: true, frequency: 485, version: "2.0", boardVersion: "204", diff --git a/main/http_server/axe-os/src/models/ISystemInfo.ts b/main/http_server/axe-os/src/models/ISystemInfo.ts index 25e37208e..8209f06b3 100644 --- a/main/http_server/axe-os/src/models/ISystemInfo.ts +++ b/main/http_server/axe-os/src/models/ISystemInfo.ts @@ -28,6 +28,7 @@ export interface ISystemInfo { stratumPort: number, fallbackStratumURL: string, fallbackStratumPort: number, + isUsingFallbackStratum: boolean, stratumUser: string, fallbackStratumUser: string, frequency: number, From 781cbb63f99f5d267f50fc34ac961cc6ee9b98f4 Mon Sep 17 00:00:00 2001 From: mrv777 Date: Tue, 8 Oct 2024 17:32:11 -0500 Subject: [PATCH 2/4] fix: Add fallback server link --- .../src/app/components/home/home.component.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/main/http_server/axe-os/src/app/components/home/home.component.ts b/main/http_server/axe-os/src/app/components/home/home.component.ts index 1a152ec57..5db7d65de 100644 --- a/main/http_server/axe-os/src/app/components/home/home.component.ts +++ b/main/http_server/axe-os/src/app/components/home/home.component.ts @@ -15,6 +15,7 @@ export class HomeComponent { public info$: Observable; public quickLink$: Observable; + public fallbackQuickLink$: Observable; public expectedHashRate$: Observable; @@ -186,6 +187,26 @@ export class HomeComponent { }) ) + this.fallbackQuickLink$ = this.info$.pipe( + map(info => { + if (info.fallbackStratumURL.includes('public-pool.io')) { + const address = info.fallbackStratumUser.split('.')[0] + return `https://web.public-pool.io/#/app/${address}`; + } else if (info.fallbackStratumURL.includes('ocean.xyz')) { + const address = info.fallbackStratumUser.split('.')[0] + return `https://ocean.xyz/stats/${address}`; + } else if (info.fallbackStratumURL.includes('solo.d-central.tech')) { + const address = info.fallbackStratumUser.split('.')[0] + return `https://solo.d-central.tech/#/app/${address}`; + } else if (/solo[46]?.ckpool.org/.test(info.fallbackStratumURL)) { + const address = info.fallbackStratumUser.split('.')[0] + return `https://solo.ckpool.org/users/${address}`; + } else { + return undefined; + } + }) + ) + } private calculateAverage(data: number[]): number { From 56a39facf886eb3a330e2cd211a38f47178691b4 Mon Sep 17 00:00:00 2001 From: mrv777 Date: Tue, 8 Oct 2024 17:32:43 -0500 Subject: [PATCH 3/4] fix: Just show active pool & cleanup --- .../app/components/home/home.component.html | 68 ++++++++++--------- .../app/components/home/home.component.scss | 2 +- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html index 31884518c..604700b43 100644 --- a/main/http_server/axe-os/src/app/components/home/home.component.html +++ b/main/http_server/axe-os/src/app/components/home/home.component.html @@ -205,39 +205,41 @@
Performance
-
-
Pool Information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
Pool Information ({{info.isUsingFallbackStratum ? 'Fallback' : 'Primary' }})
+
Quick Link: - {{quickLink}} -
URL:{{info.stratumURL}}
Port:{{info.stratumPort}}
User:{{info.stratumUser}}
Fallback URL:{{info.fallbackStratumURL}}
Fallback Port:{{info.fallbackStratumPort}}
Fallback User:{{info.fallbackStratumUser}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
URL: + {{info.stratumURL}} +
Port:{{info.stratumPort}}
User:{{info.stratumUser}}
URL: + {{info.fallbackStratumURL}} +
Port:{{info.fallbackStratumPort}}
User:{{info.fallbackStratumUser}}
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.scss b/main/http_server/axe-os/src/app/components/home/home.component.scss index 05c1ae970..b35057d5d 100644 --- a/main/http_server/axe-os/src/app/components/home/home.component.scss +++ b/main/http_server/axe-os/src/app/components/home/home.component.scss @@ -5,4 +5,4 @@ .card { min-height: 100%; -} \ No newline at end of file +} From 68927ab32449986b2fa941a3f2bb9bd9312eb4be Mon Sep 17 00:00:00 2001 From: mrv777 Date: Wed, 9 Oct 2024 10:50:11 -0500 Subject: [PATCH 4/4] fix: Set back to static hashrate for repo --- main/http_server/axe-os/src/app/services/system.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/http_server/axe-os/src/app/services/system.service.ts b/main/http_server/axe-os/src/app/services/system.service.ts index 68cae8f38..a863f687a 100644 --- a/main/http_server/axe-os/src/app/services/system.service.ts +++ b/main/http_server/axe-os/src/app/services/system.service.ts @@ -26,7 +26,7 @@ export class SystemService { current: 2237.5, temp: 60, vrTemp: 45, - hashRate: Math.floor(Math.random() * (350 - 300 + 1)) + 300, + hashRate: 475, bestDiff: "0", bestSessionDiff: "0", freeHeap: 200504,