proejct wildcard domain
This commit is contained in:
parent
d8adea734f
commit
6aa7cbade0
@ -105,6 +105,7 @@ public function generateGlobalRandomDomain()
|
||||
$scheme = $url->getScheme();
|
||||
$this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path;
|
||||
$this->application->save();
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
}
|
||||
public function generateProjectRandomDomain()
|
||||
{
|
||||
@ -115,6 +116,7 @@ public function generateProjectRandomDomain()
|
||||
$scheme = $url->getScheme();
|
||||
$this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path;
|
||||
$this->application->save();
|
||||
$this->emit('success', 'Application settings updated!');
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
|
@ -8,14 +8,22 @@
|
||||
class Edit extends Component
|
||||
{
|
||||
public Project $project;
|
||||
public string|null $wildcard_domain = null;
|
||||
protected $rules = [
|
||||
'project.name' => 'required|min:3|max:255',
|
||||
'project.description' => 'nullable|string|max:255',
|
||||
'wildcard_domain' => 'nullable|string|max:255',
|
||||
];
|
||||
public function mount()
|
||||
{
|
||||
$this->wildcard_domain = $this->project->settings->wildcard_domain;
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
try {
|
||||
$this->project->settings->wildcard_domain = $this->wildcard_domain;
|
||||
$this->project->settings->save();
|
||||
$this->project->save();
|
||||
$this->emit('saved');
|
||||
} catch (\Exception $e) {
|
||||
|
@ -12,21 +12,19 @@
|
||||
<x-forms.input id="application.name" label="Name" required />
|
||||
<x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
|
||||
helper="You can specify one domain with path or more with comma.<br><span class='text-helper'>Example</span>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3" />
|
||||
|
||||
@if ($wildcard_domain)
|
||||
<div class="flex flex-row gap-2">
|
||||
@if ($global_wildcard_domain)
|
||||
<x-forms.button wire:click="generateGlobalRandomDomain">Global Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@if ($project_wildcard_domain)
|
||||
<x-forms.button wire:click="generateProjectRandomDomain">Project Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($wildcard_domain)
|
||||
<div class="pb-6">
|
||||
<div class="">Set Random Domain</div>
|
||||
@if ($global_wildcard_domain)
|
||||
<x-forms.button wire:click="generateGlobalRandomDomain">Global Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@if ($project_wildcard_domain)
|
||||
<x-forms.button wire:click="generateProjectRandomDomain">Project Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<x-forms.select id="application.build_pack" label="Build Pack" required>
|
||||
<option value="nixpacks">Nixpacks</option>
|
||||
<option disabled value="docker">Docker</option>
|
||||
|
@ -1,9 +1,14 @@
|
||||
<div>
|
||||
<h1>{{ data_get($project, 'name') }}</h1>
|
||||
<div class="pt-2 pb-10">Edit project details</div>
|
||||
<form wire:submit.prevent='submit' class="flex items-end gap-2 ">
|
||||
<x-forms.input label="Name" id="project.name" />
|
||||
<x-forms.input label="Description" id="project.description" />
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 ">
|
||||
<div class="flex items-end gap-2">
|
||||
<h1>Project: {{ data_get($project, 'name') }}</h1>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
</div>
|
||||
<div class="pb-10">Edit project details here.</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="Name" id="project.name" />
|
||||
<x-forms.input label="Description" id="project.description" />
|
||||
<x-forms.input label="Wildcard Domain" id="wildcard_domain" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user