From e23e23db5fe0f923d8760ab0f8bcde2066fdf19f Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 11 Mar 2024 22:36:45 -0400 Subject: [PATCH] BM1368 voltage dropdown, log scrolling, restart button --- .../axe-os/src/app/components/edit/edit.component.ts | 4 ++++ .../axe-os/src/app/components/home/home.component.ts | 10 +++++----- .../axe-os/src/app/components/logs/logs.component.html | 6 +++++- .../axe-os/src/app/components/logs/logs.component.ts | 5 +++++ .../axe-os/src/app/layout/app.menu.component.html | 3 +++ .../axe-os/src/app/layout/app.topbar.component.html | 2 +- .../axe-os/src/app/layout/styles/layout/_menu.scss | 6 ++++++ 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/main/http_server/axe-os/src/app/components/edit/edit.component.ts b/main/http_server/axe-os/src/app/components/edit/edit.component.ts index cb2dfbe7..21976098 100644 --- a/main/http_server/axe-os/src/app/components/edit/edit.component.ts +++ b/main/http_server/axe-os/src/app/components/edit/edit.component.ts @@ -68,6 +68,10 @@ export class EditComponent implements OnInit { { name: '1200', value: 1200 }, { name: '1250', value: 1250 }, { name: '1300', value: 1300 }, + { name: '1350', value: 1350 }, + { name: '1400', value: 1400 }, + { name: '1450', value: 1450 }, + { name: '1500', value: 1500 }, ]; public BM1366CoreVoltage = [ { name: '1100', value: 1100 }, 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 bd9debd7..dd4557c8 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 @@ -40,7 +40,7 @@ export class HomeComponent { datasets: [ { type: 'line', - label: '10 Minute', + label: 'Hashrate', data: [], fill: false, backgroundColor: primaryColor, @@ -135,14 +135,14 @@ export class HomeComponent { if (info.ASICModel === eASICModel.BM1366) { const version = parseInt(info.boardVersion); if (version >= 400 && version < 500) { - return (info.frequency * ((894 * 6) / 1000)) + return Math.floor(info.frequency * ((894 * 6) / 1000)) } else { - return (info.frequency * (894 / 1000)) + return Math.floor(info.frequency * (894 / 1000)) } } else if (info.ASICModel === eASICModel.BM1397) { - return (info.frequency * (672 / 1000)) + return Math.floor(info.frequency * (672 / 1000)) } else if (info.ASICModel === eASICModel.BM1368) { - return (info.frequency * (1276 / 1000)) + return Math.floor(info.frequency * (1276 / 1000)) } return undefined; diff --git a/main/http_server/axe-os/src/app/components/logs/logs.component.html b/main/http_server/axe-os/src/app/components/logs/logs.component.html index e3b4dfa1..eccb2aac 100644 --- a/main/http_server/axe-os/src/app/components/logs/logs.component.html +++ b/main/http_server/axe-os/src/app/components/logs/logs.component.html @@ -37,7 +37,11 @@
Overview

Realtime Logs

+ Logs + + +
₿ {{log | ANSI}}
diff --git a/main/http_server/axe-os/src/app/components/logs/logs.component.ts b/main/http_server/axe-os/src/app/components/logs/logs.component.ts index 3fa6a1ce..ca004f43 100644 --- a/main/http_server/axe-os/src/app/components/logs/logs.component.ts +++ b/main/http_server/axe-os/src/app/components/logs/logs.component.ts @@ -20,6 +20,8 @@ export class LogsComponent implements OnDestroy, AfterViewChecked { public showLogs = false; + public stopScroll: boolean = false; + constructor( private websocketService: WebsocketService, private systemService: SystemService @@ -65,6 +67,9 @@ export class LogsComponent implements OnDestroy, AfterViewChecked { } ngAfterViewChecked(): void { + if(this.stopScroll == true){ + return; + } if (this.scrollContainer?.nativeElement != null) { this.scrollContainer.nativeElement.scrollTo({ left: 0, top: this.scrollContainer.nativeElement.scrollHeight, behavior: 'smooth' }); } diff --git a/main/http_server/axe-os/src/app/layout/app.menu.component.html b/main/http_server/axe-os/src/app/layout/app.menu.component.html index 2171c9fb..889e3a92 100644 --- a/main/http_server/axe-os/src/app/layout/app.menu.component.html +++ b/main/http_server/axe-os/src/app/layout/app.menu.component.html @@ -4,4 +4,7 @@ + + + \ No newline at end of file diff --git a/main/http_server/axe-os/src/app/layout/app.topbar.component.html b/main/http_server/axe-os/src/app/layout/app.topbar.component.html index e89ae992..f9bb6f9c 100644 --- a/main/http_server/axe-os/src/app/layout/app.topbar.component.html +++ b/main/http_server/axe-os/src/app/layout/app.topbar.component.html @@ -9,7 +9,7 @@
- +
\ No newline at end of file diff --git a/main/http_server/axe-os/src/app/layout/styles/layout/_menu.scss b/main/http_server/axe-os/src/app/layout/styles/layout/_menu.scss index 297b4ac7..3db5ff7e 100644 --- a/main/http_server/axe-os/src/app/layout/styles/layout/_menu.scss +++ b/main/http_server/axe-os/src/app/layout/styles/layout/_menu.scss @@ -132,4 +132,10 @@ } } } +} + +#restart { + bottom: 2rem; + position: absolute; + left: 8rem; } \ No newline at end of file