Rework the dashboard, environment topology view, header navigation, and status rendering, and standardise selects on a shadcn-vue component. Replace the thin database seeder with a SimulatedEnvironmentSeeder that builds a fully wired, mostly-running organisation (ACTIVE server fleet, managed + GHCR registries, Gitea source provider, ClipBin app with production/staging environments, services, slices, endpoints, managed variables, build artifacts, and a completed/in-progress/failed operations history) so the new UI renders against realistic data.
37 lines
967 B
PHP
37 lines
967 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\OrganisationRole;
|
|
use App\Enums\ProviderType;
|
|
use App\Models\Organisation;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class TestEnvironmentSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$user = User::factory()->create([
|
|
'name' => 'Harry',
|
|
'email' => 'harry@hjb.dev',
|
|
'password' => env('DEFAULT_PASSWORD') ?: Hash::make('password'),
|
|
]);
|
|
|
|
$organisation = Organisation::create([
|
|
'name' => 'Stratbucket',
|
|
'slug' => 'stratbucket',
|
|
'owner_id' => 1,
|
|
]);
|
|
|
|
$organisation->members()->attach($user, ['role' => OrganisationRole::ADMIN]);
|
|
|
|
$organisation->providers()->create([
|
|
'name' => 'Hetzner',
|
|
'type' => ProviderType::HETZNER,
|
|
'token' => env('HETZNER_KEY') ?: 'local-placeholder-token',
|
|
]);
|
|
}
|
|
}
|