-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'liberu-control-panel:main' into main
- Loading branch information
Showing
26 changed files
with
849 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources; | ||
|
||
use App\Filament\Admin\Resources\DnsSettingResource\Pages; | ||
use App\Filament\Admin\Resources\DnsSettingResource\RelationManagers; | ||
use App\Models\DnsSetting; | ||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class DnsSettingResource extends Resource | ||
{ | ||
protected static ?string $model = DnsSetting::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('domain_id') | ||
->required() | ||
->numeric(), | ||
Forms\Components\TextInput::make('record_type') | ||
->required() | ||
->maxLength(255), | ||
Forms\Components\TextInput::make('name') | ||
->required() | ||
->maxLength(255), | ||
Forms\Components\TextInput::make('value') | ||
->required() | ||
->maxLength(255), | ||
Forms\Components\TextInput::make('ttl') | ||
->required() | ||
->numeric(), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('domain_id') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('record_type') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('name') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('value') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('ttl') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('created_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
Tables\Columns\TextColumn::make('updated_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
]) | ||
->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\ListDnsSettings::route('/'), | ||
'create' => Pages\CreateDnsSetting::route('/create'), | ||
'edit' => Pages\EditDnsSetting::route('/{record}/edit'), | ||
]; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/Filament/Admin/Resources/DnsSettingResource/Pages/CreateDnsSetting.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,12 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DnsSettingResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DnsSettingResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\CreateRecord; | ||
|
||
class CreateDnsSetting extends CreateRecord | ||
{ | ||
protected static string $resource = DnsSettingResource::class; | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Admin/Resources/DnsSettingResource/Pages/EditDnsSetting.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,19 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DnsSettingResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DnsSettingResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\EditRecord; | ||
|
||
class EditDnsSetting extends EditRecord | ||
{ | ||
protected static string $resource = DnsSettingResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\DeleteAction::make(), | ||
]; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Admin/Resources/DnsSettingResource/Pages/ListDnsSettings.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,19 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DnsSettingResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DnsSettingResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\ListRecords; | ||
|
||
class ListDnsSettings extends ListRecords | ||
{ | ||
protected static string $resource = DnsSettingResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources; | ||
|
||
use App\Filament\Admin\Resources\DomainResource\Pages; | ||
use App\Filament\Admin\Resources\DomainResource\RelationManagers; | ||
use App\Models\Domain; | ||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class DomainResource extends Resource | ||
{ | ||
protected static ?string $model = Domain::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('user_id') | ||
->required() | ||
->numeric(), | ||
Forms\Components\TextInput::make('domain_name') | ||
->required() | ||
->maxLength(255), | ||
Forms\Components\DatePicker::make('registration_date') | ||
->required(), | ||
Forms\Components\DatePicker::make('expiration_date') | ||
->required(), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('user_id') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('domain_name') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('registration_date') | ||
->date() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('expiration_date') | ||
->date() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('created_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
Tables\Columns\TextColumn::make('updated_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
]) | ||
->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\ListDomains::route('/'), | ||
'create' => Pages\CreateDomain::route('/create'), | ||
'edit' => Pages\EditDomain::route('/{record}/edit'), | ||
]; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/Filament/Admin/Resources/DomainResource/Pages/CreateDomain.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,12 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DomainResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DomainResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\CreateRecord; | ||
|
||
class CreateDomain extends CreateRecord | ||
{ | ||
protected static string $resource = DomainResource::class; | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Admin/Resources/DomainResource/Pages/EditDomain.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,19 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DomainResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DomainResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\EditRecord; | ||
|
||
class EditDomain extends EditRecord | ||
{ | ||
protected static string $resource = DomainResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\DeleteAction::make(), | ||
]; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Admin/Resources/DomainResource/Pages/ListDomains.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,19 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources\DomainResource\Pages; | ||
|
||
use App\Filament\Admin\Resources\DomainResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\ListRecords; | ||
|
||
class ListDomains extends ListRecords | ||
{ | ||
protected static string $resource = DomainResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
|
||
namespace App\Filament\Admin\Resources; | ||
|
||
use App\Filament\Admin\Resources\HostingPlanResource\Pages; | ||
use App\Filament\Admin\Resources\HostingPlanResource\RelationManagers; | ||
use App\Models\HostingPlan; | ||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class HostingPlanResource extends Resource | ||
{ | ||
protected static ?string $model = HostingPlan::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('name') | ||
->required() | ||
->maxLength(255), | ||
Forms\Components\Textarea::make('description') | ||
->columnSpanFull(), | ||
Forms\Components\TextInput::make('disk_space') | ||
->required() | ||
->numeric(), | ||
Forms\Components\TextInput::make('bandwidth') | ||
->required() | ||
->numeric(), | ||
Forms\Components\TextInput::make('price') | ||
->required() | ||
->numeric() | ||
->prefix('$'), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('name') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('disk_space') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('bandwidth') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('price') | ||
->money() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('created_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
Tables\Columns\TextColumn::make('updated_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
]) | ||
->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\ListHostingPlans::route('/'), | ||
'create' => Pages\CreateHostingPlan::route('/create'), | ||
'edit' => Pages\EditHostingPlan::route('/{record}/edit'), | ||
]; | ||
} | ||
} |
Oops, something went wrong.