make docker on separated navigation

This commit is contained in:
Bozhidar 2024-04-27 13:49:43 +03:00
parent 4d9048c097
commit 9ffc1cf1fa
8 changed files with 32 additions and 11 deletions

View file

@ -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';

View file

@ -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

View file

@ -20,13 +20,19 @@ use Modules\Docker\Filament\Clusters\DockerCluster;
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
{

View file

@ -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';
}

View file

@ -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"
],

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
<path fill="currentColor" d="M17 24h4v4h-4zm7 0h4v4h-4zm-7-7h4v4h-4zm7 0h4v4h-4z"></path>
<path fill="currentColor" d="M28 11h-6V7c0-1.7-1.3-3-3-3h-6c-1.7 0-3 1.3-3 3v4H4c-.6 0-1 .4-1 1v.2l1.9 12.1c.1 1 1 1.7 2 1.7H15v-2H6.9L5.2 13H28zM12 7c0-.6.4-1 1-1h6c.6 0 1 .4 1 1v4h-8z"></path>
</svg>

After

Width:  |  Height:  |  Size: 386 B

View file

@ -47,6 +47,7 @@ class AdminPanelProvider extends PanelProvider
// ->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')

View file

@ -2,5 +2,7 @@
"LetsEncrypt": true,
"Microweber": true,
"Docker": true,
"Customer": true
"Customer": true,
"Model": true,
"DockerTemplate": true
}