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

Implement Webhooks #548

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fc1c51e
feat: First Webhook PoC draft
PascaleBeier Apr 21, 2024
ca1004d
feat: Dispatch Webhooks PoC
PascaleBeier Apr 21, 2024
b710dd7
fix: typo in webhook configuration scope
PascaleBeier Apr 21, 2024
b458612
Update 2024_04_21_162552_create_webhooks_table.php
PascaleBeier Apr 21, 2024
72a2c3c
Update 2024_04_21_162552_create_webhooks_table.php
PascaleBeier Apr 21, 2024
cd4aaf6
Update 2024_04_21_162544_create_webhook_configurations_table.php
PascaleBeier Apr 21, 2024
b66ca7a
Update 2024_04_21_162544_create_webhook_configurations_table.php
PascaleBeier Apr 21, 2024
4e1ecac
Update DispatchWebhooks.php
PascaleBeier Apr 21, 2024
db7ffd4
Update DispatchWebhooksJob.php
PascaleBeier Apr 21, 2024
73507f2
Update DispatchWebhookForConfiguration.php
PascaleBeier Apr 21, 2024
e5d08d9
Update DispatchWebhookForConfiguration.php
PascaleBeier Apr 21, 2024
538d46f
Update DispatchWebhookForConfiguration.php
PascaleBeier Apr 21, 2024
dcfe61a
Update DispatchWebhooksJob.php
PascaleBeier Apr 21, 2024
afeb81a
Update DispatchWebhooksJob.php
PascaleBeier Apr 21, 2024
c7667e3
Update DispatchWebhooksJob.php
PascaleBeier Apr 21, 2024
f0e1f75
chore: Implement Webhook Event Discovery
PascaleBeier Apr 30, 2024
ebe40d1
we got a test working for webhooks
go-vehikl Aug 1, 2024
74b6085
WIP
go-vehikl Aug 9, 2024
63c917d
Something is working!
go-vehikl Aug 9, 2024
ad638d9
Merge branch 'pelican-dev:main' into feat-webhooks
colindecarlo Aug 14, 2024
a20bd83
More tests
go-vehikl Aug 16, 2024
323647b
clean up the tests now that they are passing
go-vehikl Aug 16, 2024
28131a8
WIP
go-vehikl Aug 16, 2024
9e123a9
Don't use model specific events
go-vehikl Sep 6, 2024
0f1ec58
WIP
go-vehikl Sep 12, 2024
b451959
WIP
go-vehikl Sep 12, 2024
d6c74d3
WIP
go-vehikl Sep 12, 2024
25006f0
WIP
go-vehikl Sep 12, 2024
90d6440
WIP
go-vehikl Sep 12, 2024
d48ee2c
Do it sync
go-vehikl Sep 20, 2024
66b6b1e
Reset these
go-vehikl Sep 20, 2024
10412b1
Don't need restored event type
go-vehikl Sep 20, 2024
2a5ba13
Deleted some unused jobs
go-vehikl Sep 20, 2024
afd8fc8
Find custom Events
go-vehikl Sep 20, 2024
7fbd8c4
Remove observers
go-vehikl Sep 26, 2024
5d2fd99
Add custom event test
go-vehikl Sep 26, 2024
32c9fdf
Run Pint
go-vehikl Sep 26, 2024
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
19 changes: 0 additions & 19 deletions app/Events/Server/Created.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Creating.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Deleted.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Deleting.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Saved.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Saving.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Updated.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Server/Updating.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Subuser/Created.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Subuser/Creating.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Subuser/Deleted.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/Subuser/Deleting.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/User/Created.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/User/Creating.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/User/Deleted.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Events/User/Deleting.php

This file was deleted.

71 changes: 71 additions & 0 deletions app/Filament/Resources/WebhookResource.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

namespace App\Filament\Resources;

use App\Filament\Resources\WebhookResource\Pages;
use App\Models\WebhookConfiguration;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;

class WebhookResource extends Resource
{
protected static ?string $model = WebhookConfiguration::class;

protected static ?string $navigationIcon = 'tabler-webhook';

protected static ?string $label = 'Webhooks';

public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('endpoint')->activeUrl()->required(),
Forms\Components\TextInput::make('description')->nullable(),
Forms\Components\CheckboxList::make('events')->lazy()->options(
fn () => WebhookConfiguration::filamentCheckboxList()
)
->columns(3)
->columnSpanFull()
->gridDirection('row')
->required(),
]);
}

public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}

public static function getRelations(): array
{
return [
//
];
}

public static function getPages(): array
{
return [
'index' => Pages\ListWebhookConfigurations::route('/'),
'create' => Pages\CreateWebhookConfiguration::route('/create'),
'edit' => Pages\EditWebhookConfiguration::route('/{record}/edit'),
];
}
}
Loading
Loading