Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Temp suffix & 5v marker #448

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,15 @@ <h6>Power <span style="float: right;">{{info.power}} W</span></h6>
<div class="col-12">

<h6>Input Voltage <span style="float: right;">{{info.voltage}} V</span></h6>
<p-progressBar [value]="(info.voltage / 5.5) * 100" [style]="{ height: '6px' }" >
<ng-template pTemplate="content" let-value>
</ng-template>
</p-progressBar>
<div class="relative">
<p-progressBar [value]="(info.voltage / 5.5) * 100" [style]="{ height: '6px' }">
<ng-template pTemplate="content" let-value></ng-template>
</p-progressBar>
<!-- Add marker at 5.0V (90.91% of 5.5V) -->
<div class="absolute bg-white" style="left: 90.5%; top: 0; width: 3px; height: 6px;">
<small class="absolute text-white" style="top: -1.25rem; transform: translateX(-50%)">5.0</small>
</div>
</div>
<span class="danger" *ngIf="info.voltage < 4.8">&nbsp; Danger: Low voltage</span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class HomeComponent {
data: [],
fill: false,
backgroundColor: primaryColor + '30',
borderColor: primaryColor + '30',
borderColor: primaryColor + '60',
tension: 0,
pointRadius: 0,
borderWidth: 2,
Expand Down Expand Up @@ -103,7 +103,11 @@ export class HomeComponent {
if (label) {
label += ': ';
}
label += HashSuffixPipe.transform(tooltipItem.raw);
if (tooltipItem.dataset.label === 'ASIC Temp') {
label += tooltipItem.raw + '°C';
} else {
label += HashSuffixPipe.transform(tooltipItem.raw);
}
return label;
}
}
Expand Down Expand Up @@ -139,7 +143,8 @@ export class HomeComponent {
display: true,
position: 'right',
ticks: {
color: textColorSecondary
color: textColorSecondary,
callback: (value: number) => value + '°C'
},
grid: {
drawOnChartArea: false,
Expand Down
Loading