diff --git a/main/http_server/axe-os/src/app/components/swarm/swarm.component.html b/main/http_server/axe-os/src/app/components/swarm/swarm.component.html index d5b4684d5..62d2a6afb 100644 --- a/main/http_server/axe-os/src/app/components/swarm/swarm.component.html +++ b/main/http_server/axe-os/src/app/components/swarm/swarm.component.html @@ -1,192 +1,154 @@ -
-
- {{metric.label}}: {{metric.value}} -
-
+
+

Swarm

-
- - - - - - - - - - - - - - - - - - - - - - - - -
+
+
-
- {{field.label}} - +
+ {{metric.label}} +
{{metric.value}}
-
EditRestartRemove
- {{axe.IP}} - {{axe.hostname}}{{axe.hashRate * 1000000000 | hashSuffix}} -
- {{axe.sharesAccepted | number: '1.0-0'}} -
-
- {{axe.sharesRejected | number: '1.0-0'}} -
-
-
- {{axe.bestDiff}} -
-
- {{axe.bestSessionDiff}} -
-
{{axe.uptimeSeconds | dateAgo: {intervals: 2} }}{{axe.power | number: '1.1-1'}} W -
- {{axe.temp | number: '1.0-1'}} °C -
-
- {{axe.vrTemp | number: '1.0-1'}} °C -
-
{{axe.poolDifficulty}}{{axe.version}}
- -
-
- - {{ item.deviceModel || 'Other' }} ({{item.asicCount > 1 ? item.asicCount + 'x ' : ''}}{{item.ASICModel}}) -
-
- -
- -
-
-
- -
- - - - -
-
-
-
-
- - -
-
- - - - {{refreshTimeSet}} s -
-
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ {{field.label}} + +
+
+ + {{axe.hostname}} + + + {{axe.IP}} + {{axe.hashRate * 1000000000 | hashSuffix}} +

+ {{axe.sharesAccepted | number: '1.0-0'}} +

+

+ {{axe.sharesRejected | number: '1.0-0'}} +

+
+

+ {{axe.bestDiff}} +

+

+ {{axe.bestSessionDiff}} +

+
+ {{axe.uptimeSeconds | dateAgo: {intervals: 1} }} + {{axe.power | number: '1.1-1'}} W +

+ {{axe.temp | number: '1.0-1'}} °C +

+

+ {{axe.vrTemp | number: '1.0-1'}} °C +

+
{{axe.poolDifficulty}}{{axe.version}} + + + +
+
- - - +
+
+ + {{ item.deviceModel || 'Other' }} ({{ item.asicCount > 1 ? item.asicCount + 'x ' : '' }}{{ item.ASICModel }}) +
+
+ + + +

+ Scan your network for devices or add a device manually by using its IP address. +

+
+ +
+ + +
+ +
+ + {{refreshTimeSet}} s +
+
+ +
+ + + + +
+
+ + + + +
diff --git a/main/http_server/axe-os/src/app/components/swarm/swarm.component.scss b/main/http_server/axe-os/src/app/components/swarm/swarm.component.scss index f8e73168e..63642731e 100644 --- a/main/http_server/axe-os/src/app/components/swarm/swarm.component.scss +++ b/main/http_server/axe-os/src/app/components/swarm/swarm.component.scss @@ -1,75 +1,41 @@ table { - width: 100%; - border: 1px solid #304562; + border-collapse: collapse; } - -th { - text-align: left; - background-color: #1f2d40; - padding: 0; - - > div { - height: 100%; - padding: 0.5rem 1rem; - gap: 0.75rem; - } - - .pi { - opacity: 0.7; - height: 1em; - line-height: 1; - - &.pi-sort-amount-up-alt, - &.pi-sort-amount-down { - opacity: 1; - } - } -} - th, td { - border-bottom: 1px solid #304562; -} + padding: 0 0.5rem 0.5rem; + white-space: nowrap; + text-align: left; + vertical-align: top; + &:first-child { + padding-left: 0; + } + &:last-child { + padding-right: 0; + text-align: right; + } +} td { - padding: 1rem; + padding-top: 0.5rem; + + p { + line-height: 1.4; + } } +tbody tr { + border-top: 1px solid var(--surface-border); -th > div { - min-width: 100px; - padding-right: 0.5rem; -} - -a { - color: white; -} - -.table-container { - width: 100%; - overflow-x: auto; - margin: 0; - - table { - min-width: 100%; - white-space: nowrap; - - th, td { - padding: 0.5rem; - text-align: left; - } + &:last-child td { + padding-bottom: 0; } } -.refresh-button { - display: grid; - place-items: center; - - > span:first-child { - visibility: hidden; - grid-area: 1 / 1; - } - - > span:last-child { - grid-area: 1 / 1; - } +.button-text { + min-width: 8rem; } +::ng-deep .p-button.button-icon { + width: 2.2rem; + height: 2.2rem; + margin-top: 0.25rem; +} \ No newline at end of file diff --git a/main/http_server/axe-os/src/app/components/swarm/swarm.component.ts b/main/http_server/axe-os/src/app/components/swarm/swarm.component.ts index f9c699f9e..36f231288 100644 --- a/main/http_server/axe-os/src/app/components/swarm/swarm.component.ts +++ b/main/http_server/axe-os/src/app/components/swarm/swarm.component.ts @@ -83,7 +83,7 @@ export class SwarmComponent implements OnInit, OnDestroy { } this.refreshIntervalRef = window.setInterval(() => { - if (!this.scanning && !this.isRefreshing) { + if (!this.scanning && !this.isRefreshing && this.swarm.length) { this.refreshIntervalTime--; if (this.refreshIntervalTime <= 0) { this.refreshList(false); @@ -132,6 +132,7 @@ export class SwarmComponent implements OnInit, OnDestroy { }, complete: () => { this.scanning = false; + this.refreshIntervalTime = this.refreshTimeSet; } }); } @@ -316,7 +317,7 @@ export class SwarmComponent implements OnInit, OnDestroy { .reduce((max, curr) => this.compareBestDiff(max, curr), '0'); } - get getFamilies(): SwarmDevice[] { + get deviceFamilies(): SwarmDevice[] { return this.swarm.filter((v, i, a) => a.findIndex(({ deviceModel, ASICModel, asicCount }) => v.deviceModel === deviceModel &&