-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from vatsimnetwork/development
- Loading branch information
Showing
54 changed files
with
2,886 additions
and
22,603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,46 @@ | ||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p> | ||
<p align="center"><a href="https://nattrak.vatsim.net" target="_blank"><img src="https://github.com/vatsimnetwork/nattrak/blob/1ffe41ca2087844dab75cb0b33ed9f85f96a8c1c/public/images/natTrak_Logo_2000px.png?raw=true" width="200"></a></p> | ||
|
||
<p align="center"> | ||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a> | ||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a> | ||
</p> | ||
[//]: # (<p align="center">) | ||
|
||
## About Laravel | ||
[//]: # (<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>) | ||
|
||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: | ||
[//]: # (<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>) | ||
|
||
- [Simple, fast routing engine](https://laravel.com/docs/routing). | ||
- [Powerful dependency injection container](https://laravel.com/docs/container). | ||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. | ||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). | ||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations). | ||
- [Robust background job processing](https://laravel.com/docs/queues). | ||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). | ||
[//]: # (<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>) | ||
|
||
Laravel is accessible, powerful, and provides tools required for large, robust applications. | ||
[//]: # (<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>) | ||
|
||
## Learning Laravel | ||
[//]: # (</p>) | ||
|
||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. | ||
## About natTrak | ||
|
||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. | ||
natTrak is the web application used by the Atlantic oceanic controll areas of the [VATSIM](https://vatsim.net) network. Pilots submit oceanic clearance requests via the website, and controllers respond to those requests. | ||
|
||
## Laravel Sponsors | ||
This project is maintained by the VATSIM Tech Team. | ||
|
||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). | ||
natTrak is a [Laravel](https://laravel.com) application using Bootstrap 5.3, Livewire 3.0, and AlpineJS. It also makes use of Soketi for websocket support. | ||
|
||
### Premium Partners | ||
### Primary Developers | ||
|
||
- **[Vehikl](https://vehikl.com/)** | ||
- **[Tighten Co.](https://tighten.co)** | ||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** | ||
- **[64 Robots](https://64robots.com)** | ||
- **[Cubet Techno Labs](https://cubettech.com)** | ||
- **[Cyber-Duck](https://cyber-duck.co.uk)** | ||
- **[Many](https://www.many.co.uk)** | ||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** | ||
- **[DevSquad](https://devsquad.com)** | ||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** | ||
- **[OP.GG](https://op.gg)** | ||
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** | ||
- **[Lendio](https://lendio.com)** | ||
- [Liesel Downes](https://github.com/lieselwd) | ||
- [William McKinnerney](https://github.com/williammck) | ||
|
||
## Contributing | ||
### FAQs | ||
|
||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). | ||
#### How do I request new features? | ||
|
||
## Code of Conduct | ||
Create an Issue in this repository, or let one of us know via Discord if you're unable to. All ideas welcome! | ||
|
||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). | ||
#### Is natTrak compatible with Hoppies CPDLC? | ||
|
||
## Security Vulnerabilities | ||
Unfortunately it is not and there are no plans for this. | ||
|
||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed. | ||
#### Is there an API? | ||
|
||
## License | ||
Yes! The endpoints are: | ||
|
||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). | ||
- /api/clx-messages - Detailed oceanic clearance messages | ||
- /api/plugins-rcl - Simple oceanic clearance _request_ messages | ||
- /tracks - the tracks currently in use by natTrak. | ||
|
||
It is highly recommended that you use the clx-messages endpoint. In future more endpoints will be available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Enums\DatalinkAuthorities; | ||
use App\Enums\RclResponsesEnum; | ||
use App\Models\ClxMessage; | ||
use App\Models\RclMessage; | ||
use App\Services\CpdlcService; | ||
use Illuminate\Console\Command; | ||
|
||
class AutoAcknowledgeClearCommand extends Command | ||
{ | ||
protected $signature = 'rcl-messages:clear-auto-acknowledged'; | ||
|
||
protected $description = 'Move auto acknowledged RCL messages from pending list to processed list'; | ||
|
||
public function handle(): void | ||
{ | ||
$rclMessages = RclMessage::pending()->where('is_acknowledged', false)->get(); | ||
foreach ($rclMessages as $rclMessage) { | ||
// Don't interfere with clearances being edited | ||
if ($rclMessage->isEditLocked()) { | ||
continue; | ||
} | ||
$datalinkAuthority = DatalinkAuthorities::SYS; | ||
$cpdlcService = new CpdlcService(); | ||
$cpdlcService->sendMessage( | ||
author: $datalinkAuthority, | ||
recipient: $rclMessage->callsign, | ||
recipientAccount: $rclMessage->vatsimAccount, | ||
message: sprintf(RclResponsesEnum::AcknowledgeMoved->value, strtoupper($datalinkAuthority->description())), | ||
caption: RclResponsesEnum::Acknowledge->text() | ||
); | ||
|
||
$clxMessage = new ClxMessage([ | ||
'vatsim_account_id' => $rclMessage->vatsim_account_id, | ||
'rcl_message_id' => $rclMessage->id, | ||
'flight_level' => $rclMessage->flight_level, | ||
'upper_flight_level' => $rclMessage->upper_flight_level ? $rclMessage->upper_flight_level : null, | ||
'mach' => $rclMessage->mach, | ||
'entry_fix' => $rclMessage->entry_fix, | ||
'entry_time_restriction' => null, | ||
'raw_entry_time_restriction' => $rclMessage->entry_time, | ||
'free_text' => "** AUTO ACKNOWLEDGE **", | ||
'datalink_authority' => $datalinkAuthority, | ||
'is_concorde' => $rclMessage->is_concorde, | ||
'simple_datalink_message' => '** AUTO ACKNOWLEDGED REFER RCL REQUEST **', | ||
'datalink_message' => ['** AUTO ACKNOWLEDGED REFER RCL REQUEST **'], | ||
]); | ||
|
||
/** | ||
* Assign track or RR | ||
*/ | ||
if ($rclMessage->track) { | ||
$clxMessage->track_id = $rclMessage->track->id; | ||
$clxMessage->random_routeing = null; | ||
} elseif ($rclMessage->random_routeing) { | ||
$clxMessage->random_routeing = $rclMessage->random_routeing; | ||
$clxMessage->track_id = null; | ||
} | ||
|
||
/** | ||
* Save | ||
*/ | ||
$clxMessage->save(); | ||
|
||
/** | ||
* Assign Clx message to Rcl | ||
*/ | ||
$rclMessage->clx_message_id = $clxMessage->id; | ||
$rclMessage->save(); | ||
|
||
//ClxIssuedEvent::dispatch($rclMessage->vatsimAccount, $clxMessage); | ||
|
||
activity('datalink') | ||
->causedBy($clxMessage->vatsimAccount) | ||
->performedOn($rclMessage) | ||
->withProperties(['datalink' => $clxMessage->data_link_message]) | ||
->log('Pending Auto Acknowledge Move'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.