Skip to content

Commit 86f8b07

Browse files
authored
Milliseconds should be indicated with "ms" and not "Ms" (alexjustesen#1185)
1 parent db06fd5 commit 86f8b07

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

app/Filament/Pages/Settings/ThresholdsPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function form(Form $form): Form
7878
->required(),
7979
Forms\Components\TextInput::make('absolute_ping')
8080
->label('Ping')
81-
->hint('Ms')
81+
->hint('ms')
8282
->helperText('Set to zero to disable this metric.')
8383
->default(0)
8484
->minValue(0)

app/Filament/Resources/ResultResource.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ public static function form(Form $form): Form
6767
$component->state(! blank($record->upload) ? Number::fileSizeBits(bits: $record->upload_bits, precision: 2, perSecond: true) : '');
6868
}),
6969
Forms\Components\TextInput::make('ping')
70-
->label('Ping (Ms)'),
70+
->label('Ping (ms)'),
7171
Forms\Components\TextInput::make('data.download.latency.jitter')
72-
->label('Download Jitter (Ms)'),
72+
->label('Download Jitter (ms)'),
7373
Forms\Components\TextInput::make('data.upload.latency.jitter')
74-
->label('Upload Jitter (Ms)'),
74+
->label('Upload Jitter (ms)'),
7575
Forms\Components\TextInput::make('data.ping.jitter')
76-
->label('Ping Jitter (Ms)'),
76+
->label('Ping Jitter (ms)'),
7777
Forms\Components\Textarea::make('data.message')
7878
->label('Error Message')
7979
->hint(new HtmlString('&#x1f517;<a href="https://docs.speedtest-tracker.dev/help/error-messages" target="_blank" rel="nofollow">Error Messages</a>'))

app/Filament/Widgets/StatsOverviewWidget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function getCards(): array
4949
->icon('heroicon-o-arrow-down-tray'),
5050
Stat::make('Latest upload', fn (): string => ! blank($this->result) ? Number::fileSizeBits(bits: $this->result->upload_bits, precision: 2, perSecond: true) : 'n/a')
5151
->icon('heroicon-o-arrow-up-tray'),
52-
Stat::make('Latest ping', fn (): string => ! blank($this->result) ? number_format($this->result->ping, 2).' Ms' : 'n/a')
52+
Stat::make('Latest ping', fn (): string => ! blank($this->result) ? number_format($this->result->ping, 2).' ms' : 'n/a')
5353
->icon('heroicon-o-clock'),
5454
];
5555
}
@@ -69,7 +69,7 @@ protected function getCards(): array
6969
->description($uploadChange > 0 ? $uploadChange.'% faster' : abs($uploadChange).'% slower')
7070
->descriptionIcon($uploadChange > 0 ? 'heroicon-m-arrow-trending-up' : 'heroicon-m-arrow-trending-down')
7171
->color($uploadChange > 0 ? 'success' : 'danger'),
72-
Stat::make('Latest ping', fn (): string => ! blank($this->result) ? number_format($this->result->ping, 2).' Ms' : 'n/a')
72+
Stat::make('Latest ping', fn (): string => ! blank($this->result) ? number_format($this->result->ping, 2).' ms' : 'n/a')
7373
->icon('heroicon-o-clock')
7474
->description($pingChange > 0 ? $pingChange.'% slower' : abs($pingChange).'% faster')
7575
->descriptionIcon($pingChange > 0 ? 'heroicon-m-arrow-trending-up' : 'heroicon-m-arrow-trending-down')

app/Listeners/Threshold/AbsoluteListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ protected function mailChannel(ResultCreated $event): void
146146
if (absolutePingThresholdFailed($this->thresholdSettings->absolute_ping, $event->result->ping)) {
147147
array_push($failedThresholds, [
148148
'name' => 'Ping',
149-
'threshold' => $this->thresholdSettings->absolute_ping.' Ms',
150-
'value' => round($event->result->ping, 2).' Ms',
149+
'threshold' => $this->thresholdSettings->absolute_ping.' ms',
150+
'value' => round($event->result->ping, 2).' ms',
151151
]);
152152
}
153153
}
@@ -198,8 +198,8 @@ protected function telegramChannel(ResultCreated $event): void
198198
if (absolutePingThresholdFailed($this->thresholdSettings->absolute_ping, $event->result->ping)) {
199199
array_push($failedThresholds, [
200200
'name' => 'Ping',
201-
'threshold' => $this->thresholdSettings->absolute_ping.' Ms',
202-
'value' => round($event->result->ping, 2).' Ms',
201+
'threshold' => $this->thresholdSettings->absolute_ping.' ms',
202+
'value' => round($event->result->ping, 2).' ms',
203203
]);
204204
}
205205
}

0 commit comments

Comments
 (0)