wip
This commit is contained in:
parent
ffa8f40864
commit
97f0f34209
@ -13,6 +13,9 @@ class ProjectController extends Controller
|
|||||||
return redirect()->route('home');
|
return redirect()->route('home');
|
||||||
}
|
}
|
||||||
$project->load(['environments']);
|
$project->load(['environments']);
|
||||||
|
if (count($project->environments) == 1) {
|
||||||
|
return redirect()->route('project.resources', ['project_uuid' => $project->uuid, 'environment_name' => $project->environments->first()->name]);
|
||||||
|
}
|
||||||
return view('project.environments', ['project' => $project]);
|
return view('project.environments', ['project' => $project]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ namespace App\Http\Livewire\Application;
|
|||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class Secrets extends Component
|
class EnvironmentVariables extends Component
|
||||||
{
|
{
|
||||||
public array $secrets = [];
|
public array $envs = [];
|
||||||
}
|
}
|
@ -20,10 +20,5 @@ class EnvironmentSeeder extends Seeder
|
|||||||
'name' => 'production',
|
'name' => 'production',
|
||||||
'project_id' => $project_1->id,
|
'project_id' => $project_1->id,
|
||||||
]);
|
]);
|
||||||
Environment::create([
|
|
||||||
'id' => 2,
|
|
||||||
'name' => 'staging',
|
|
||||||
'project_id' => $project_1->id,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<div>
|
||||||
|
@forelse ($envs as $env)
|
||||||
|
{{ dump($env) }}
|
||||||
|
@empty
|
||||||
|
<p>There are no environment variables for this application.</p>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
@ -1,7 +0,0 @@
|
|||||||
<div>
|
|
||||||
@forelse ($secrets as $secret)
|
|
||||||
{{ dump($secret) }}
|
|
||||||
@empty
|
|
||||||
<p>There are no secrets for this application.</p>
|
|
||||||
@endforelse
|
|
||||||
</div>
|
|
@ -2,7 +2,7 @@
|
|||||||
<div x-data="{ tab: window.location.hash ? window.location.hash.substring(1) : 'general' }">
|
<div x-data="{ tab: window.location.hash ? window.location.hash.substring(1) : 'general' }">
|
||||||
<div class="flex gap-4">
|
<div class="flex gap-4">
|
||||||
<a @click.prevent="tab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
<a @click.prevent="tab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||||
<a @click.prevent="tab = 'secrets'; window.location.hash = 'secrets'" href="#">Secrets</a>
|
<a @click.prevent="tab = 'envs'; window.location.hash = 'envs'" href="#">Environment Variables</a>
|
||||||
<a @click.prevent="tab = 'source'; window.location.hash = 'source'" href="#">Source</a>
|
<a @click.prevent="tab = 'source'; window.location.hash = 'source'" href="#">Source</a>
|
||||||
<a @click.prevent="tab = 'destination'; window.location.hash = 'destination'" href="#">Destination
|
<a @click.prevent="tab = 'destination'; window.location.hash = 'destination'" href="#">Destination
|
||||||
</a>
|
</a>
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<div x-cloak x-show="tab === 'general'">
|
<div x-cloak x-show="tab === 'general'">
|
||||||
<livewire:application.general :applicationId="$application->id" />
|
<livewire:application.general :applicationId="$application->id" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'secrets'">
|
<div x-cloak x-show="tab === 'envs'">
|
||||||
<livewire:application.secrets />
|
<livewire:application.environment-variables />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="tab === 'source'">
|
<div x-cloak x-show="tab === 'source'">
|
||||||
<livewire:application.source :applicationId="$application->id" />
|
<livewire:application.source :applicationId="$application->id" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user