Skip to content

Commit

Permalink
make docker on separated navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Apr 27, 2024
1 parent 4d9048c commit 9ffc1cf
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ class DockerCatalog extends Page implements HasForms
{
use InteractsWithForms;

// protected static ?string $navigationGroup = 'Docker';
protected static ?string $navigationGroup = 'Docker';

protected static ?string $cluster = DockerCluster::class;
protected static ?string $navigationLabel = 'Catalog';

protected static ?string $navigationIcon = 'heroicon-o-cog';
protected static ?string $slug = 'docker/catalog';

protected static ?int $navigationSort = 1;
// protected static ?string $cluster = DockerCluster::class;

protected static ?string $navigationIcon = 'docker-catalog';

protected static ?int $navigationSort = 2;

protected static string $view = 'docker::filament.pages.docker-catalog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ class Settings extends BaseSettings
{
protected static ?string $navigationGroup = 'Docker';

protected static ?string $cluster = DockerCluster::class;
protected static ?string $navigationLabel = 'Settings';

// protected static ?string $cluster = DockerCluster::class;

protected static ?string $navigationIcon = 'heroicon-o-cog';

protected static ?string $slug = 'docker/settings';

protected static ?int $navigationSort = 3;

public function schema(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@

class DockerContainerResource extends Resource
{
protected static ?string $navigationGroup = 'Docker';

protected static ?string $navigationLabel = 'Containers';

protected static ?string $slug = 'docker/containers';

protected static ?string $model = DockerContainer::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'docker-logo';

protected static ?string $cluster = DockerCluster::class;
// protected static ?string $cluster = DockerCluster::class;

protected static ?int $navigationSort = 2;
protected static ?int $navigationSort = 1;

public static function form(Form $form): Form
{
Expand Down
2 changes: 1 addition & 1 deletion web/Modules/Docker/Filament/Clusters/DockerCluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class DockerCluster extends Cluster
{
protected static ?string $navigationIcon = 'docker-logo';

protected static ?string $navigationGroup = 'Server Management';
protected static ?string $navigationGroup = 'Docker';

}
2 changes: 1 addition & 1 deletion web/Modules/Docker/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"priority": 0,
"logoIcon": "docker-logo",
"category": "DevOps",
"adminUrl": "/admin/docker/docker-catalog",
"adminUrl": "/admin/docker/containers",
"providers": [
"Modules\\Docker\\App\\Providers\\DockerServiceProvider"
],
Expand Down
4 changes: 4 additions & 0 deletions web/Modules/Docker/resources/assets/docker-svg/catalog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function panel(Panel $panel): Panel
// ->brandLogo(fn () => view('filament.admin.logo'))
->navigationGroups([
'Hosting Services' => NavigationGroup::make()->label('Hosting Services'),
'Docker' => NavigationGroup::make()->label('Docker'),
'Server Management' => NavigationGroup::make()->label('Server Management'),
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
Expand Down
4 changes: 3 additions & 1 deletion web/modules_statuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"LetsEncrypt": true,
"Microweber": true,
"Docker": true,
"Customer": true
"Customer": true,
"Model": true,
"DockerTemplate": true
}

0 comments on commit 9ffc1cf

Please sign in to comment.