-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pelican-dev:main' into fix/eggtransformer
- Loading branch information
Showing
45 changed files
with
1,860 additions
and
327 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
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
51 changes: 51 additions & 0 deletions
51
app/Filament/Resources/DatabaseHostResource/RelationManagers/DatabasesRelationManager.php
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,51 @@ | ||
<?php | ||
|
||
namespace App\Filament\Resources\DatabaseHostResource\RelationManagers; | ||
|
||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\RelationManagers\RelationManager; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
|
||
class DatabasesRelationManager extends RelationManager | ||
{ | ||
protected static string $relationship = 'databases'; | ||
|
||
public function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('database')->columnSpanFull(), | ||
Forms\Components\TextInput::make('username'), | ||
Forms\Components\TextInput::make('password')->default('Soon™'), | ||
Forms\Components\TextInput::make('remote')->label('Connections From'), | ||
Forms\Components\TextInput::make('max_connections'), | ||
Forms\Components\TextInput::make('JDBC')->label('JDBC Connection String')->columnSpanFull()->default('Soon™'), | ||
Forms\Components\TextInput::make('created_at'), | ||
Forms\Components\TextInput::make('updated_at'), | ||
]); | ||
} | ||
|
||
public function table(Table $table): Table | ||
{ | ||
return $table | ||
->recordTitleAttribute('servers') | ||
->columns([ | ||
Tables\Columns\TextColumn::make('database'), | ||
Tables\Columns\TextColumn::make('username'), | ||
//Tables\Columns\TextColumn::make('password'), | ||
Tables\Columns\TextColumn::make('remote'), | ||
Tables\Columns\TextColumn::make('server_id') | ||
->label('Belongs To'), | ||
// TODO ->url(route('filament.admin.resources.servers.edit', ['record', ''])), | ||
Tables\Columns\TextColumn::make('max_connections'), | ||
Tables\Columns\TextColumn::make('created_at'), | ||
]) | ||
->actions([ | ||
Tables\Actions\DeleteAction::make(), | ||
Tables\Actions\ViewAction::make(), | ||
//Tables\Actions\EditAction::make(), | ||
]); | ||
} | ||
} |
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
42 changes: 42 additions & 0 deletions
42
app/Filament/Resources/EggResource/RelationManagers/ServersRelationManager.php
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,42 @@ | ||
<?php | ||
|
||
namespace App\Filament\Resources\EggResource\RelationManagers; | ||
|
||
use App\Models\Server; | ||
use Filament\Resources\RelationManagers\RelationManager; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
|
||
class ServersRelationManager extends RelationManager | ||
{ | ||
protected static string $relationship = 'servers'; | ||
|
||
public function table(Table $table): Table | ||
{ | ||
return $table | ||
->recordTitleAttribute('servers') | ||
->emptyStateDescription('No Servers')->emptyStateHeading('No servers are assigned this egg.') | ||
->searchable(false) | ||
->columns([ | ||
Tables\Columns\TextColumn::make('user.username') | ||
->label('Owner') | ||
->icon('tabler-user') | ||
->url(fn (Server $server): string => route('filament.admin.resources.users.edit', ['record' => $server->user])) | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('name') | ||
->icon('tabler-brand-docker') | ||
->url(fn (Server $server): string => route('filament.admin.resources.servers.edit', ['record' => $server])) | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('node.name') | ||
->icon('tabler-server-2') | ||
->url(fn (Server $server): string => route('filament.admin.resources.nodes.edit', ['record' => $server->node])), | ||
Tables\Columns\TextColumn::make('image') | ||
->label('Docker Image'), | ||
Tables\Columns\SelectColumn::make('allocation.id') | ||
->label('Primary Allocation') | ||
->options(fn ($state, Server $server) => [$server->allocation->id => $server->allocation->address]) | ||
->selectablePlaceholder(false) | ||
->sortable(), | ||
]); | ||
} | ||
} |
Oops, something went wrong.