css and stuffs
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
<x-inputs.input id="destination.network" label="Docker Network" readonly />
|
||||
@endif
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteDestination = true">
|
||||
<x-inputs.button x-on:click.prevent="deleteDestination = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-inputs.select>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
|
||||
<x-inputs.input id="private_key.name" label="Name" required />
|
||||
<x-inputs.input id="private_key.description" label="Description" />
|
||||
<x-inputs.input type="textarea" rows="10" id="private_key.private_key" label="Private Key" required />
|
||||
<x-inputs.textarea rows="10" id="private_key.private_key" label="Private Key" required />
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deletePrivateKey = true">
|
||||
<x-inputs.button x-on:click.prevent="deletePrivateKey = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<x-inputs.input id="name" label="Name" required />
|
||||
<x-inputs.input id="description" label="Description" />
|
||||
<x-inputs.input type="textarea" id="value" label="Private Key" required />
|
||||
<x-inputs.button isBold type="submit" wire.click.prevent>
|
||||
<x-inputs.button type="submit" wire.click.prevent>
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<div x-data="{ deleteApplication: false }">
|
||||
<h2>Danger Zone</h2>
|
||||
<x-naked-modal show="deleteApplication" />
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteApplication = true">Delete this application</x-inputs.button>
|
||||
</div>
|
||||
@@ -1,15 +1,13 @@
|
||||
<div x-data="{ deleteApplication: false }" class="flex items-center gap-2">
|
||||
<x-naked-modal show="deleteApplication" />
|
||||
<div class="flex items-center gap-2">
|
||||
@if ($application->status === 'running')
|
||||
<x-inputs.button wire:click='start'>Rebuild</x-inputs.button>
|
||||
<x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
|
||||
<x-inputs.button isWarning wire:click='stop'>Stop</x-inputs.button>
|
||||
<x-inputs.button wire:click='stop'>Stop</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button wire:click='start'>Start</x-inputs.button>
|
||||
<x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
|
||||
@endif
|
||||
<x-inputs.button x-on:click.prevent="deleteApplication = true">
|
||||
Delete</x-inputs.button>
|
||||
|
||||
<span wire:poll.5000ms='pollingStatus'>
|
||||
@if ($application->status === 'running')
|
||||
<span class="text-xs text-pink-600" wire:loading.delay.longer>Loading current status...</span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h3>Destination</h3>
|
||||
<h2>Destination</h2>
|
||||
<p>Server Name: {{ data_get($destination, 'server.name') }}</p>
|
||||
@if (data_get($destination, 'server.description'))
|
||||
<p>Description: {{ data_get($destination, 'server.description') }}</p>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input noDirty id="key" label="Name" required />
|
||||
<x-inputs.input noDirty id="value" label="Value" required />
|
||||
<x-inputs.input noDirty type="checkbox" id="is_build_time" label="Build Variable?" />
|
||||
<x-inputs.checkbox noDirty class="flex-col items-center" id="is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Add
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<h3>Environment Variables</h3>
|
||||
<h2>Environment Variables</h2>
|
||||
@forelse ($application->environment_variables as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input label="Name" id="env.key" />
|
||||
<x-inputs.input label="Value" id="env.value" />
|
||||
<x-inputs.input type="checkbox" id="env.is_build_time" label="Build Variable?" />
|
||||
<x-inputs.checkbox disabled class="flex-col items-center" id="env.is_build_time" label="Build Variable?" />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Update
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteEnvironment = true" isWarning>
|
||||
<x-inputs.button x-on:click.prevent="deleteEnvironment = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<div>
|
||||
<h3>General</h3>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h2>General</h2>
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 pb-4">
|
||||
<x-inputs.input id="application.name" label="Name" required />
|
||||
<x-inputs.input id="application.fqdn" label="Domains" />
|
||||
<x-inputs.input id="application.install_command" label="Install Command" />
|
||||
<x-inputs.input id="application.build_command" label="Build Command" />
|
||||
<x-inputs.input id="application.start_command" label="Start Command" />
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input class="w-full" id="application.name" label="Name" required />
|
||||
<x-inputs.input class="w-full" id="application.fqdn" label="Domains" />
|
||||
</div>
|
||||
<x-inputs.select id="application.build_pack" label="Build Pack" required>
|
||||
<option value="nixpacks">Nixpacks</option>
|
||||
<option disabled value="docker">Docker</option>
|
||||
@@ -18,33 +22,38 @@
|
||||
<option disabled value="apache:alpine">apache:alpine</option>
|
||||
</x-inputs.select>
|
||||
@endif
|
||||
<x-inputs.input id="application.base_directory" label="Base Directory" />
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" required />
|
||||
@else
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" />
|
||||
@endif
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
|
||||
@endif
|
||||
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input id="application.install_command" label="Install Command" />
|
||||
<x-inputs.input id="application.build_command" label="Build Command" />
|
||||
<x-inputs.input id="application.start_command" label="Start Command" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-inputs.input id="application.base_directory" label="Base Directory" />
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" required />
|
||||
@else
|
||||
<x-inputs.input id="application.publish_directory" label="Publish Directory" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@if ($application->settings->is_static)
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
|
||||
@endif
|
||||
<x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<x-inputs.checkbox instantSave id="is_debug" label="Debug" />
|
||||
<x-inputs.checkbox instantSave id="is_static" label="Static website?" />
|
||||
<x-inputs.checkbox instantSave id="is_git_submodules_allowed" label="Git Submodules Allowed?" />
|
||||
<x-inputs.checkbox instantSave id="is_git_lfs_allowed" label="Git LFS Allowed?" />
|
||||
<x-inputs.checkbox instantSave id="is_auto_deploy" label="Auto Deploy?" />
|
||||
<x-inputs.checkbox instantSave id="is_previews" label="Previews?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_dual_cert" label="Dual Certs?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-inputs.checkbox disabled instantSave id="is_http2" label="Is Http2?" />
|
||||
</div>
|
||||
<x-inputs.button isBold type="submit">
|
||||
Submit
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
<div class="flex flex-col pt-4">
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_static" label="Static website?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_submodules_allowed"
|
||||
label="Git Submodules Allowed?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_git_lfs_allowed" label="Git LFS Allowed?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_debug" label="Debug" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_auto_deploy" label="Auto Deploy?" />
|
||||
<x-inputs.input noDirty instantSave type="checkbox" id="is_previews" label="Previews?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_dual_cert" label="Dual Certs?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-inputs.input disabled instantSave type="checkbox" id="is_http2" label="Is Http2?" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<div>
|
||||
<h2>Resource Limits</h2>
|
||||
<form wire:submit.prevent='submit'>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h2>Resource Limits</h2>
|
||||
<x-inputs.button type='submit'>Save</x-inputs.button>
|
||||
</div>
|
||||
<h3>Memory</h3>
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Limit" id="application.limits_memory" />
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Swap" id="application.limits_memory_swap" />
|
||||
@@ -8,13 +11,10 @@
|
||||
id="application.limits_memory_swappiness" />
|
||||
<x-inputs.input placeholder="69b or 420k or 1337m or 1g" label="Soft Limit"
|
||||
id="application.limits_memory_reservation" />
|
||||
<x-inputs.input type="checkbox" label="Is OOM Kill disabled?" id="application.limits_memory_oom_kill" />
|
||||
<x-inputs.checkbox label="Disable OOM kill" id="application.limits_memory_oom_kill" />
|
||||
<h3>CPU</h3>
|
||||
<x-inputs.input placeholder="1.5" label="Number of CPUs" id="application.limits_cpus" />
|
||||
<x-inputs.input placeholder="0-2" label="CPU set to use" id="application.limits_cpuset" />
|
||||
<x-inputs.input placeholder="1024" label="CPU Weight" id="application.limits_cpu_shares" />
|
||||
<div class="pt-4">
|
||||
<x-inputs.button isBold>Save</x-inputs.button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div x-init="$wire.loadImages">
|
||||
<h2>Revert</h2>
|
||||
<div>
|
||||
<x-inputs.button isBold wire:click='loadImages'>Refresh Images</x-inputs.button>
|
||||
<div class="flex gap-2">
|
||||
<h2>Rollback</h2>
|
||||
<x-inputs.button isHighlighted wire:click='loadImages'>Refresh Images</x-inputs.button>
|
||||
</div>
|
||||
<div wire:loading wire:target='loadImages'>
|
||||
<x-loading />
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<div>
|
||||
<h3>Source</h3>
|
||||
<h2>Source</h2>
|
||||
<div class="pb-8">{{ data_get($application, 'source.name') }}
|
||||
@if (data_get($application, 'source.is_public'))
|
||||
<span class="text-xs">public</span>
|
||||
@endif
|
||||
</div>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 w-max-fit">
|
||||
<x-inputs.input id="application.git_repository" label="Repository" readonly />
|
||||
<x-inputs.input id="application.git_branch" label=" Branch" readonly />
|
||||
<x-inputs.input id="application.git_repository" label="Repository" />
|
||||
<x-inputs.input id="application.git_branch" label=" Branch" />
|
||||
<x-inputs.input id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA" />
|
||||
<div>
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<a target="_blank" href="{{ $application->gitCommits }}">
|
||||
Commits <img class="inline-flex w-4 h-4" src="{{ asset('svgs/external-link.svg') }}">
|
||||
Commits
|
||||
<x-external-link />
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<x-inputs.input noDirty id="mount_path" label="Destination Path" required />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Add
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<h3>Storages</h3>
|
||||
<h2>Storages</h2>
|
||||
@forelse ($application->persistentStorages as $storage)
|
||||
<livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
@empty
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<x-inputs.input id="storage.mount_path" label="Destination Path" required />
|
||||
</div>
|
||||
<div class="pt-2">
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Update
|
||||
</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteStorage = true" isWarning>
|
||||
<x-inputs.button x-on:click.prevent="deleteStorage = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div x-data="{ deleteProject: false }">
|
||||
<x-naked-modal show="deleteProject" message='Are you sure you would like to delete this project?' />
|
||||
@if ($resource_count > 0)
|
||||
<x-inputs.button isWarning disabled="First delete all resources.">
|
||||
<x-inputs.button disabled="First delete all resources.">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteProject = true">
|
||||
<x-inputs.button x-on:click.prevent="deleteProject = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<x-inputs.button isBold type="submit">Run</x-inputs.button>
|
||||
<x-inputs.button type="submit">Run</x-inputs.button>
|
||||
</form>
|
||||
<div class="container w-full pt-10 mx-auto">
|
||||
<livewire:activity-monitor />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div x-data="{ deleteServer: false }">
|
||||
<h3>General</h3>
|
||||
<h2>General</h2>
|
||||
<x-naked-modal show="deleteServer" message='Are you sure you would like to delete this server?' />
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<div class="flex flex-col w-96">
|
||||
<x-inputs.input id="server.name" label="Name" required />
|
||||
<x-inputs.input id="server.description" label="Description" />
|
||||
<x-inputs.input disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
||||
<x-inputs.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
|
||||
label="Is it part of a Swarm cluster?" />
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
@@ -23,9 +23,9 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
|
||||
<x-inputs.button isBold wire:click.prevent='validateServer'>
|
||||
<x-inputs.button wire:click.prevent='validateServer'>
|
||||
@if ($server->settings->is_validated)
|
||||
Check Connection
|
||||
@else
|
||||
@@ -33,8 +33,8 @@
|
||||
@endif
|
||||
</x-inputs.button>
|
||||
|
||||
{{-- <x-inputs.button isBold wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteServer = true">
|
||||
{{-- <x-inputs.button wire:click.prevent='installDocker'>Install Docker</x-inputs.button> --}}
|
||||
<x-inputs.button x-on:click.prevent="deleteServer = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
{{ data_get($server, 'privateKey.uuid') }}
|
||||
</a>
|
||||
<a href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">
|
||||
<x-inputs.button isBold>Change</x-inputs.button>
|
||||
<x-inputs.button>Change</x-inputs.button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 py-4">
|
||||
@@ -71,7 +71,7 @@
|
||||
@endforeach
|
||||
</div>
|
||||
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
||||
<x-inputs.button isBold>Add</x-inputs.button>
|
||||
<x-inputs.button>Add</x-inputs.button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</x-inputs.select>
|
||||
<x-inputs.input instantSave noDirty type="checkbox" id="is_part_of_swarm"
|
||||
label="Is it part of a Swarm cluster?" />
|
||||
<x-inputs.button isBold type="submit">
|
||||
<x-inputs.button type="submit">
|
||||
Save
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
message='Are you sure you would like to stop the proxy? All resources will be unavailable.' />
|
||||
@if ($server->settings->is_validated)
|
||||
<div class="flex items-center gap-2 mb-4">
|
||||
<h3 class="pb-0">Proxy</h3>
|
||||
<h2>Proxy</h2>
|
||||
<div>{{ $server->extra_attributes->proxy_status }}</div>
|
||||
</div>
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
$server->extra_attributes->last_applied_proxy_settings &&
|
||||
$server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings)
|
||||
<div class="text-red-500">Configuration out of sync.</div>
|
||||
<x-inputs.button isBold wire:click="installProxy">
|
||||
<x-inputs.button wire:click="installProxy">
|
||||
Reconfigure
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
@if ($server->extra_attributes->proxy_status !== 'running')
|
||||
<x-inputs.button isBold wire:click="installProxy">
|
||||
<x-inputs.button wire:click="installProxy">
|
||||
Start
|
||||
</x-inputs.button>
|
||||
@else
|
||||
<x-inputs.button isWarning x-on:click.prevent="stopProxy = true">Stop
|
||||
<x-inputs.button x-on:click.prevent="stopProxy = true">Stop
|
||||
</x-inputs.button>
|
||||
@endif
|
||||
<div class="py-4">
|
||||
@@ -37,13 +37,14 @@
|
||||
@if ($selectedProxy->value === 'TRAEFIK_V2')
|
||||
<form wire:submit.prevent='saveConfiguration'>
|
||||
<div class="py-2 pb-8">
|
||||
<x-inputs.button isBold>Save</x-inputs.button>
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button wire:click.prevent="resetProxy">
|
||||
Reset Configuration
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<h4>traefik.conf</h4>
|
||||
<x-inputs.input noDirty type="textarea" wire:model.defer="proxy_settings" rows="30" />
|
||||
<x-inputs.textarea noDirty name="proxy_settings" wire:model.defer="proxy_settings"
|
||||
rows="30" />
|
||||
</form>
|
||||
@endif
|
||||
@endisset
|
||||
@@ -55,7 +56,7 @@
|
||||
{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}
|
||||
</option>
|
||||
</select>
|
||||
<x-inputs.button isBold wire:click="setProxy">Set Proxy</x-inputs.button>
|
||||
<x-inputs.button wire:click="setProxy">Set Proxy</x-inputs.button>
|
||||
@endif
|
||||
@else
|
||||
<p>Server is not validated. Validate first.</p>
|
||||
|
||||
@@ -1,6 +1,38 @@
|
||||
<div x-data="{ deleteSource: false }">
|
||||
<x-naked-modal show="deleteSource" message='Are you sure you would like to delete this source?' />
|
||||
<form wire:submit.prevent='submit'>
|
||||
<div class="flex items-center gap-2">
|
||||
<h1>GitHub App</h1>
|
||||
<div class="flex gap-2 ">
|
||||
@if ($github_app->app_id)
|
||||
<x-inputs.button type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
<a href="{{ $installation_url }}">
|
||||
<x-inputs.button>
|
||||
@if ($github_app->installation_id)
|
||||
Update Repositories
|
||||
<x-external-link />
|
||||
@else
|
||||
Install Repositories
|
||||
<x-external-link />
|
||||
@endif
|
||||
</x-inputs.button>
|
||||
</a>
|
||||
@else
|
||||
<x-inputs.button disabled type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
<form x-data>
|
||||
<x-inputs.button isHighlighted x-on:click.prevent="createGithubApp">Create GitHub Application
|
||||
</x-inputs.button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-inputs.input id="github_app.name" label="App Name" required />
|
||||
|
||||
@if ($github_app->app_id)
|
||||
@@ -20,21 +52,64 @@
|
||||
<x-inputs.input id="github_app.client_id" label="Client Id" type="password" disabled />
|
||||
<x-inputs.input id="github_app.client_secret" label="Client Secret" type="password" disabled />
|
||||
<x-inputs.input id="github_app.webhook_secret" label="Webhook Secret" type="password" disabled />
|
||||
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
|
||||
<div class="py-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
</div>
|
||||
<x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
|
||||
@else
|
||||
<x-inputs.input noDirty type="checkbox" label="System Wide?" instantSave id="is_system_wide" />
|
||||
<x-inputs.checkbox noDirty label="System Wide?" instantSave id="is_system_wide" />
|
||||
<div class="py-2">
|
||||
<x-inputs.button isBold type="submit">Save</x-inputs.button>
|
||||
<x-inputs.button isWarning x-on:click.prevent="deleteSource = true">
|
||||
Delete
|
||||
</x-inputs.button>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
@if (!$github_app->app_id)
|
||||
<script>
|
||||
function createGithubApp() {
|
||||
const {
|
||||
organization,
|
||||
uuid,
|
||||
html_url
|
||||
} = @json($github_app);
|
||||
let baseUrl = @js($host);
|
||||
const name = @js($name);
|
||||
const isDev = @js(config('app.env')) === 'local';
|
||||
const devWebhook = @js(config('coolify.dev_webhook'));
|
||||
if (isDev && devWebhook) {
|
||||
baseUrl = devWebhook;
|
||||
}
|
||||
const webhookBaseUrl = `${baseUrl}/webhooks`;
|
||||
const path = organization ? `organizations/${organization}/settings/apps/new` : 'settings/apps/new';
|
||||
const data = {
|
||||
name,
|
||||
url: baseUrl,
|
||||
hook_attributes: {
|
||||
url: `${webhookBaseUrl}/source/github/events`,
|
||||
active: true,
|
||||
},
|
||||
redirect_url: `${webhookBaseUrl}/source/github/redirect`,
|
||||
callback_urls: [`${baseUrl}/login/github/app`],
|
||||
public: false,
|
||||
request_oauth_on_install: false,
|
||||
setup_url: `${webhookBaseUrl}/source/github/install?source=${uuid}`,
|
||||
setup_on_update: true,
|
||||
default_permissions: {
|
||||
contents: 'read',
|
||||
metadata: 'read',
|
||||
pull_requests: 'read',
|
||||
emails: 'read'
|
||||
},
|
||||
default_events: ['pull_request', 'push']
|
||||
};
|
||||
const form = document.createElement('form');
|
||||
form.setAttribute('method', 'post');
|
||||
form.setAttribute('action', `${html_url}/${path}?state=${uuid}`);
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('id', 'manifest');
|
||||
input.setAttribute('name', 'manifest');
|
||||
input.setAttribute('type', 'hidden');
|
||||
input.setAttribute('value', JSON.stringify(data));
|
||||
form.appendChild(input);
|
||||
document.getElementsByTagName('body')[0].appendChild(form);
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<h3>Other Teams</h3>
|
||||
<div class="flex flex-col gap-2">
|
||||
@foreach (auth()->user()->otherTeams() as $team)
|
||||
<x-inputs.button isBold wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
|
||||
<x-inputs.button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch
|
||||
to:
|
||||
{{ $team->name }}</x-inputs.button>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user