wip
This commit is contained in:
parent
ffa8f40864
commit
97f0f34209
@ -13,6 +13,9 @@ public function environments()
|
||||
return redirect()->route('home');
|
||||
}
|
||||
$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]);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Secrets extends Component
|
||||
class EnvironmentVariables extends Component
|
||||
{
|
||||
public array $secrets = [];
|
||||
public array $envs = [];
|
||||
}
|
@ -20,10 +20,5 @@ public function run(): void
|
||||
'name' => 'production',
|
||||
'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 class="flex gap-4">
|
||||
<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 = 'destination'; window.location.hash = 'destination'" href="#">Destination
|
||||
</a>
|
||||
@ -12,8 +12,8 @@
|
||||
<div x-cloak x-show="tab === 'general'">
|
||||
<livewire:application.general :applicationId="$application->id" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'secrets'">
|
||||
<livewire:application.secrets />
|
||||
<div x-cloak x-show="tab === 'envs'">
|
||||
<livewire:application.environment-variables />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'source'">
|
||||
<livewire:application.source :applicationId="$application->id" />
|
||||
|
Loading…
Reference in New Issue
Block a user