mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Bug fixes (#155)
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Auto Deployment") }}
|
||||
<x-heroicon name="o-chevron-down" class="ml-1 h-4 w-4" />
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
|
@ -12,6 +12,8 @@ class="p-6"
|
||||
{{ __("Deployment Script") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">A bash script that will be executed when you run the deployment process.</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="script" :value="__('Script')" />
|
||||
<x-textarea id="script" name="script" class="mt-1 min-h-[400px] w-full">
|
||||
|
@ -19,6 +19,7 @@
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Manage") }}
|
||||
<x-heroicon name="o-chevron-down" class="ml-1 h-4 w-4" />
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
|
@ -10,7 +10,7 @@
|
||||
runUrl: '{{ route("servers.console.run", ["server" => $server]) }}',
|
||||
async run() {
|
||||
this.running = true
|
||||
this.output = 'Running...\n'
|
||||
this.output = this.command + '\n'
|
||||
const fetchOptions = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -23,6 +23,7 @@
|
||||
}),
|
||||
}
|
||||
|
||||
this.command = ''
|
||||
const response = await fetch(this.runUrl, fetchOptions)
|
||||
const reader = response.body.getReader()
|
||||
const decoder = new TextDecoder('utf-8')
|
||||
|
@ -38,6 +38,17 @@ class="p-6"
|
||||
@endif
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
<x-input-help>
|
||||
Check
|
||||
<a
|
||||
href="https://vitodeploy.com/settings/source-controls.html"
|
||||
class="text-primary-500"
|
||||
target="_blank"
|
||||
>
|
||||
here
|
||||
</a>
|
||||
to see what permissions you need
|
||||
</x-input-help>
|
||||
@error("provider")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
@include("site-settings.partials.change-php-version")
|
||||
|
||||
@if ($site->source_control_id)
|
||||
@include("site-settings.partials.update-source-control")
|
||||
@endif
|
||||
|
||||
@include("site-settings.partials.update-v-host")
|
||||
|
||||
<x-card>
|
||||
|
@ -0,0 +1,32 @@
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Update Source Control") }}</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __("You can switch the source control profile (token) in case of token expiration. Keep in mind that it must be the same account and provider") }}
|
||||
</x-slot>
|
||||
|
||||
<form
|
||||
id="update-source-control"
|
||||
hx-post="{{ route("servers.sites.settings.source-control", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#update-source-control"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-update-source-control"
|
||||
class="space-y-6"
|
||||
>
|
||||
@include(
|
||||
"sites.partials.create.fields.source-control",
|
||||
[
|
||||
"sourceControls" => \App\Models\SourceControl::query()
|
||||
->where("provider", $site->sourceControl()?->provider)
|
||||
->get(),
|
||||
]
|
||||
)
|
||||
</form>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-primary-button id="btn-update-source-control" form="update-source-control" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
</x-card>
|
15
resources/views/sites/installing.blade.php
Normal file
15
resources/views/sites/installing.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
<x-site-layout :site="$site">
|
||||
<x-slot name="pageTitle">{{ $site->domain }}</x-slot>
|
||||
|
||||
<x-live id="site">
|
||||
@if ($site->status === \App\Enums\SiteStatus::INSTALLING)
|
||||
@include("sites.partials.installing", ["site" => $site])
|
||||
@endif
|
||||
|
||||
@if ($site->status === \App\Enums\SiteStatus::INSTALLATION_FAILED)
|
||||
@include("sites.partials.installation-failed", ["site" => $site])
|
||||
@endif
|
||||
</x-live>
|
||||
|
||||
@include("server-logs.partials.logs-list", ["server" => $site->server, "site" => $site])
|
||||
</x-site-layout>
|
@ -6,7 +6,7 @@
|
||||
@foreach ($sourceControls as $sourceControl)
|
||||
<option
|
||||
value="{{ $sourceControl->id }}"
|
||||
@if($sourceControl->id === old('source_control')) selected @endif
|
||||
@if($sourceControl->id == old('source_control', isset($site) ? $site->source_control_id : null)) selected @endif
|
||||
>
|
||||
{{ $sourceControl->profile }}
|
||||
({{ $sourceControl->provider }})
|
||||
|
@ -1,17 +0,0 @@
|
||||
<div>
|
||||
@if ($site->status === \App\Enums\SiteStatus::INSTALLING)
|
||||
@include("sites.partials.installing", ["site" => $site])
|
||||
|
||||
@include("server-logs.partials.logs-list", ["server" => $site->server, "site" => $site])
|
||||
@endif
|
||||
|
||||
@if ($site->status === \App\Enums\SiteStatus::INSTALLATION_FAILED)
|
||||
@include("sites.partials.installation-failed", ["site" => $site])
|
||||
|
||||
@include("server-logs.partials.logs-list", ["server" => $site->server, "site" => $site])
|
||||
@endif
|
||||
|
||||
@if ($site->status === \App\Enums\SiteStatus::READY)
|
||||
@include("application." . $site->type . "-app", ["site" => $site])
|
||||
@endif
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
<x-site-layout :site="$site">
|
||||
<x-slot name="pageTitle">{{ $site->domain }}</x-slot>
|
||||
|
||||
@include("sites.partials.show-site")
|
||||
@include("application." . $site->type . "-app", ["site" => $site])
|
||||
</x-site-layout>
|
||||
|
Reference in New Issue
Block a user