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

Add Ookla URL to the notification #1615

Merged
merged 2 commits into from
Jul 18, 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 @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => $event->result->downloadBits,
'upload' => $event->result->uploadBits,
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])
->doNotSign()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function handle(SpeedtestCompleted $event): void
'site_name' => config('app.name'),
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])
->doNotSign()
Expand Down
1 change: 1 addition & 0 deletions app/Listeners/Ntfy/SendSpeedtestCompletedNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render();

Expand Down
1 change: 1 addition & 0 deletions app/Listeners/Ntfy/SendSpeedtestThresholdNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
1 change: 1 addition & 0 deletions app/Listeners/Slack/SendSpeedtestCompletedNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
1 change: 1 addition & 0 deletions app/Listeners/Slack/SendSpeedtestThresholdNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2),
'packetLoss' => is_numeric($event->result->packet_loss) ? round($event->result->packet_loss, 2) : 'n/a',
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function handle(SpeedtestCompleted $event): void
'serverId' => $event->result->server_id,
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])->render();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function handle(SpeedtestCompleted $event): void
'download' => $event->result->downloadBits,
'upload' => $event->result->uploadBits,
'packetLoss' => $event->result->packet_loss,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])
->doNotSign()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function handle(SpeedtestCompleted $event): void
'site_name' => config('app.name'),
'isp' => $event->result->isp,
'metrics' => $failed,
'speedtest_url' => $event->result->result_url,
'url' => url('/admin/results'),
])
->doNotSign()
Expand Down
1 change: 1 addition & 0 deletions app/Mail/SpeedtestCompletedMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function content(): Content
'download' => Number::toBitRate(bits: $this->result->download_bits, precision: 2),
'upload' => Number::toBitRate(bits: $this->result->upload_bits, precision: 2),
'packetLoss' => is_numeric($this->result->packet_loss) ? $this->result->packet_loss : 'n/a',
'speedtest_url' => $this->result->result_url,
'url' => url('/admin/results'),
],
);
Expand Down
1 change: 1 addition & 0 deletions app/Mail/SpeedtestThresholdMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function content(): Content
'serverName' => $this->result->server_name,
'serverId' => $this->result->server_id,
'isp' => $this->result->isp,
'speedtest_url' => $this->result->result_url,
'url' => url('/admin/results'),
'metrics' => $this->metrics,
],
Expand Down
1 change: 1 addition & 0 deletions resources/views/discord/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- **Download:** {{ $download }}
- **Upload:** {{ $upload }}
- **Packet Loss:** {{ $packetLoss }} **%**
- **Ookla Speedtest:** {{ $speedtest_url }}
- **URL:** {{ $url }}
1 change: 1 addition & 0 deletions resources/views/discord/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@foreach ($metrics as $item)
- **{{ $item['name'] }}** {{ $item['threshold'] }}: {{ $item['value'] }}
@endforeach
- **Ookla Speedtest:** {{ $speedtest_url }}
- **URL:** {{ $url }}
7 changes: 6 additions & 1 deletion resources/views/emails/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@
| Ping | {{ $ping }} |
| Download | {{ $download }} |
| Upload | {{ $upload }} |
| Packet Loss | {{ $packetLoss }}**%** |
| Packet Loss | {{ $packetLoss }} **%** |


</x-mail::table>

<x-mail::button :url="$url">
View Results
</x-mail::button>

<x-mail::button :Ookla Speedtest="$speedtest_url">
View Results on Ookla
</x-mail::button>

Thanks,<br>
{{ config('app.name') }}
</x-mail::message>
4 changes: 4 additions & 0 deletions resources/views/emails/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
View Results
</x-mail::button>

<x-mail::button :Ookla Speedtest="$speedtest_url">
View Results on Ookla
</x-mail::button>

Thanks,<br>
{{ config('app.name') }}
</x-mail::message>
1 change: 1 addition & 0 deletions resources/views/gotify/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- Download: {{ $download }}
- Upload: {{ $upload }}
- Packet Loss: {{ $packetLoss }} %
- **Ookla Speedtest:** {{ $speedtest_url }}
- URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/gotify/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@foreach ($metrics as $item)
- {{ $item['name'] }} {{ $item['threshold'] }}: {{ $item['value'] }}
@endforeach
- **Ookla Speedtest:** {{ $speedtest_url }}
- URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/ntfy/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
Download: {{ $download }}
Upload: {{ $upload }}
Packet Loss: {{ $packetLoss }} %
Ookla Speedtest: {{ $speedtest_url }}
URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/ntfy/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@foreach ($metrics as $item)
- {{ $item['name'] }} {{ $item['threshold'] }}: {{ $item['value'] }}
@endforeach
- Ookla Speedtest: {{ $speedtest_url }}
- URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/pushover/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- Download: {{ $download }}
- Upload: {{ $upload }}
- Packet Loss: {{ $packetLoss }} %
- Ookla Speedtest: {{ $speedtest_url }}
- URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/pushover/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@foreach ($metrics as $item)
- {{ $item['name'] }} {{ $item['threshold'] }}: {{ $item['value'] }}
@endforeach
- Ookla Speedtest: {{ $speedtest_url }}
- URL: {{ $url }}
1 change: 1 addition & 0 deletions resources/views/slack/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- *Download:* {{ $download }}
- *Upload:* {{ $upload }}
- *Packet Loss:* {{ $packetLoss }} *%*
- **Ookla Speedtest:** {{ $speedtest_url }}
- *URL:* {{ $url }}
1 change: 1 addition & 0 deletions resources/views/telegram/speedtest-completed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- *Download:* {{ $download }}
- *Upload:* {{ $upload }}
- **Packet Loss:** {{ $packetLoss }}**%**
- **Ookla Speedtest:** {{ $speedtest_url }}
- **URL:** {{ $url }}
1 change: 1 addition & 0 deletions resources/views/telegram/speedtest-threshold.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@foreach ($metrics as $item)
- **{{ $item['name'] }}** {{ $item['threshold'] }}: {{ $item['value'] }}
@endforeach
- **Ookla Speedtest:** {{ $speedtest_url }}
- **URL:** {{ $url }}