refactor(ui): remove deploy confirmation modals (#11023)
This commit is contained in:
commit
1fc294b908
7 changed files with 101 additions and 183 deletions
|
|
@ -4,13 +4,7 @@
|
||||||
</x-slot>
|
</x-slot>
|
||||||
@if ($application->status === 'running')
|
@if ($application->status === 'running')
|
||||||
@can('deploy', $application)
|
@can('deploy', $application)
|
||||||
<x-modal-confirmation title="Confirm Application Force Deployment?" buttonTitle="Force deploy"
|
<div class="dropdown-iteme" wire:click="force_deploy_without_cache">
|
||||||
submitAction="force_deploy_without_cache" :actions="[
|
|
||||||
'This application will be force deployed without build cache.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:content>
|
|
||||||
<div class="dropdown-iteme">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
|
||||||
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
|
@ -24,8 +18,6 @@
|
||||||
Force deploy (without
|
Force deploy (without
|
||||||
cache)
|
cache)
|
||||||
</div>
|
</div>
|
||||||
</x-slot:content>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
@else
|
@else
|
||||||
<div class="dropdown-iteme" data-disabled>
|
<div class="dropdown-iteme" data-disabled>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
|
||||||
|
|
@ -44,13 +36,7 @@
|
||||||
@endcan
|
@endcan
|
||||||
@else
|
@else
|
||||||
@can('deploy', $application)
|
@can('deploy', $application)
|
||||||
<x-modal-confirmation title="Confirm Application Force Deployment?" buttonTitle="Force deploy"
|
<div class="dropdown-item" wire:click="deploy(true)">
|
||||||
submitAction="deploy(true)" :actions="[
|
|
||||||
'This application will be force deployed without build cache.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:content>
|
|
||||||
<div class="dropdown-item">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" viewBox="0 0 24 24" stroke-width="1.5"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" viewBox="0 0 24 24" stroke-width="1.5"
|
||||||
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
|
@ -64,8 +50,6 @@
|
||||||
Force deploy (without
|
Force deploy (without
|
||||||
cache)
|
cache)
|
||||||
</div>
|
</div>
|
||||||
</x-slot:content>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
@else
|
@else
|
||||||
<div class="dropdown-item" data-disabled>
|
<div class="dropdown-item" data-disabled>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" viewBox="0 0 24 24" stroke-width="1.5"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" viewBox="0 0 24 24" stroke-width="1.5"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
Pull Latest Images & Restart
|
Pull Latest Images & Restart
|
||||||
</div>
|
</div>
|
||||||
@elseif (str($service->status)->contains('degraded'))
|
@elseif (str($service->status)->contains('degraded'))
|
||||||
<div class="dropdown-item" @if(!auth()->user()->can('deploy', $service)) data-disabled @endif @click="document.getElementById('service-forceDeploy-trigger')?.click()">
|
<div class="dropdown-item" @if(!auth()->user()->can('deploy', $service)) data-disabled @endif @click="$wire.dispatch('forceDeployEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
stroke-linecap="round" stroke-linejoin="round" data-darkreader-inline-stroke=""
|
stroke-linecap="round" stroke-linejoin="round" data-darkreader-inline-stroke=""
|
||||||
style="--darkreader-inline-stroke: currentColor;" class="w-6 h-6" stroke-width="2">
|
style="--darkreader-inline-stroke: currentColor;" class="w-6 h-6" stroke-width="2">
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
Force Restart
|
Force Restart
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="dropdown-item" @if(!auth()->user()->can('deploy', $service)) data-disabled @endif @click="document.getElementById('service-forceDeploy-trigger')?.click()">
|
<div class="dropdown-item" @if(!auth()->user()->can('deploy', $service)) data-disabled @endif @click="$wire.dispatch('forceDeployEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
stroke-linecap="round" stroke-linejoin="round" data-darkreader-inline-stroke=""
|
stroke-linecap="round" stroke-linejoin="round" data-darkreader-inline-stroke=""
|
||||||
style="--darkreader-inline-stroke: currentColor;" class="w-4 h-4" stroke-width="2">
|
style="--darkreader-inline-stroke: currentColor;" class="w-4 h-4" stroke-width="2">
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,7 @@
|
||||||
<div class="flex flex-nowrap items-center gap-2 overflow-x-auto">
|
<div class="flex flex-nowrap items-center gap-2 overflow-x-auto">
|
||||||
@if (!str($application->status)->startsWith('exited'))
|
@if (!str($application->status)->startsWith('exited'))
|
||||||
@if (!$application->destination->server->isSwarm())
|
@if (!$application->destination->server->isSwarm())
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0" wire:click="deploy">
|
||||||
@click="document.getElementById('application-mobile-deploy-trigger')?.click()">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
||||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -193,8 +192,7 @@
|
||||||
@endif
|
@endif
|
||||||
@if ($application->build_pack !== 'dockercompose')
|
@if ($application->build_pack !== 'dockercompose')
|
||||||
@if ($application->destination->server->isSwarm())
|
@if ($application->destination->server->isSwarm())
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0" wire:click="deploy">
|
||||||
@click="document.getElementById('application-mobile-deploy-trigger')?.click()">
|
|
||||||
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" stroke="currentColor" stroke-linecap="round"
|
<g fill="none" stroke="currentColor" stroke-linecap="round"
|
||||||
|
|
@ -238,8 +236,7 @@
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0" wire:click="deploy">
|
||||||
@click="document.getElementById('application-mobile-deploy-trigger')?.click()">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -251,8 +248,7 @@
|
||||||
@endif
|
@endif
|
||||||
@if (!$application->destination->server->isSwarm())
|
@if (!$application->destination->server->isSwarm())
|
||||||
@if ($application->status === 'running')
|
@if ($application->status === 'running')
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0" wire:click="force_deploy_without_cache">
|
||||||
@click="document.getElementById('application-mobile-force-deploy-trigger')?.click()">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -262,8 +258,7 @@
|
||||||
Force deploy (without cache)
|
Force deploy (without cache)
|
||||||
</button>
|
</button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0" wire:click="deploy(true)">
|
||||||
@click="document.getElementById('application-mobile-deploy-force-trigger')?.click()">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -404,15 +399,6 @@
|
||||||
<button id="application-mobile-stop-trigger" type="button" class="hidden">Stop</button>
|
<button id="application-mobile-stop-trigger" type="button" class="hidden">Stop</button>
|
||||||
</x-slot:trigger>
|
</x-slot:trigger>
|
||||||
</x-modal-confirmation>
|
</x-modal-confirmation>
|
||||||
<x-modal-confirmation title="Confirm Application Deployment?" buttonTitle="Deploy"
|
|
||||||
submitAction="deploy" :actions="[
|
|
||||||
'This application will be deployed.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="application-mobile-deploy-trigger" type="button" class="hidden">Deploy</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
<x-modal-confirmation title="Confirm Application Restart?" buttonTitle="Restart"
|
<x-modal-confirmation title="Confirm Application Restart?" buttonTitle="Restart"
|
||||||
submitAction="restart" :actions="[
|
submitAction="restart" :actions="[
|
||||||
'This application will be restarted without rebuilding.',
|
'This application will be restarted without rebuilding.',
|
||||||
|
|
@ -422,24 +408,6 @@
|
||||||
<button id="application-mobile-restart-trigger" type="button" class="hidden">Restart</button>
|
<button id="application-mobile-restart-trigger" type="button" class="hidden">Restart</button>
|
||||||
</x-slot:trigger>
|
</x-slot:trigger>
|
||||||
</x-modal-confirmation>
|
</x-modal-confirmation>
|
||||||
<x-modal-confirmation title="Confirm Application Force Deployment?" buttonTitle="Force deploy"
|
|
||||||
submitAction="force_deploy_without_cache" :actions="[
|
|
||||||
'This application will be force deployed without build cache.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="application-mobile-force-deploy-trigger" type="button" class="hidden">Force deploy</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
<x-modal-confirmation title="Confirm Application Force Deployment?" buttonTitle="Force deploy"
|
|
||||||
submitAction="deploy(true)" :actions="[
|
|
||||||
'This application will be force deployed without build cache.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="application-mobile-deploy-force-trigger" type="button" class="hidden">Force deploy</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav
|
<nav
|
||||||
|
|
@ -492,14 +460,7 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
@if (!str($application->status)->startsWith('exited'))
|
@if (!str($application->status)->startsWith('exited'))
|
||||||
@if (!$application->destination->server->isSwarm())
|
@if (!$application->destination->server->isSwarm())
|
||||||
|
<x-forms.button canGate="deploy" :canResource="$application" title="With rolling update if possible" wire:click="deploy">
|
||||||
<x-modal-confirmation title="Confirm Application Deployment?" buttonTitle="Redeploy"
|
|
||||||
submitAction="deploy" :actions="[
|
|
||||||
'This application will be redeployed.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:content>
|
|
||||||
<x-forms.button canGate="deploy" :canResource="$application" title="With rolling update if possible">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
||||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -511,18 +472,10 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
</svg>
|
</svg>
|
||||||
Redeploy
|
Redeploy
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</x-slot:content>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
@endif
|
@endif
|
||||||
@if ($application->build_pack !== 'dockercompose')
|
@if ($application->build_pack !== 'dockercompose')
|
||||||
@if ($application->destination->server->isSwarm())
|
@if ($application->destination->server->isSwarm())
|
||||||
<x-modal-confirmation title="Confirm Application Deployment?" buttonTitle="Update Service"
|
<x-forms.button canGate="deploy" :canResource="$application" title="Redeploy Swarm Service (rolling update)" wire:click="deploy">
|
||||||
submitAction="deploy" :actions="[
|
|
||||||
'This Swarm service will be updated with a rolling deployment.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:content>
|
|
||||||
<x-forms.button canGate="deploy" :canResource="$application" title="Redeploy Swarm Service (rolling update)">
|
|
||||||
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" stroke="currentColor" stroke-linecap="round"
|
<g fill="none" stroke="currentColor" stroke-linecap="round"
|
||||||
|
|
@ -534,8 +487,6 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
</svg>
|
</svg>
|
||||||
Update Service
|
Update Service
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</x-slot:content>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
@else
|
@else
|
||||||
<x-modal-confirmation title="Confirm Application Restart?" buttonTitle="Restart"
|
<x-modal-confirmation title="Confirm Application Restart?" buttonTitle="Restart"
|
||||||
submitAction="restart" :actions="[
|
submitAction="restart" :actions="[
|
||||||
|
|
@ -582,14 +533,7 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
</x-slot:button-title>
|
</x-slot:button-title>
|
||||||
</x-modal-confirmation>
|
</x-modal-confirmation>
|
||||||
@else
|
@else
|
||||||
|
<x-forms.button canGate="deploy" :canResource="$application" wire:click="deploy">
|
||||||
<x-modal-confirmation title="Confirm Application Deployment?" buttonTitle="Deploy"
|
|
||||||
submitAction="deploy" :actions="[
|
|
||||||
'This application will be deployed.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false"
|
|
||||||
step2ButtonText="Confirm">
|
|
||||||
<x-slot:content>
|
|
||||||
<x-forms.button canGate="deploy" :canResource="$application">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
|
@ -598,9 +542,6 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
</svg>
|
</svg>
|
||||||
Deploy
|
Deploy
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</x-slot:content>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('database-start-trigger')?.click()">
|
@click="$wire.dispatch('startEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -234,7 +234,7 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@else
|
@else
|
||||||
<x-forms.button canGate="manage" :canResource="$database" @click="document.getElementById('database-start-trigger')?.click()" class="gap-2">
|
<x-forms.button canGate="manage" :canResource="$database" @click="$wire.dispatch('startEvent')" class="gap-2">
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
|
|
@ -286,15 +286,6 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
<button id="database-stop-trigger" type="button" class="hidden">Stop</button>
|
<button id="database-stop-trigger" type="button" class="hidden">Stop</button>
|
||||||
</x-slot:trigger>
|
</x-slot:trigger>
|
||||||
</x-modal-confirmation>
|
</x-modal-confirmation>
|
||||||
<x-modal-confirmation title="Confirm Database Start?" buttonTitle="Start" submitAction="startEvent"
|
|
||||||
:actions="[
|
|
||||||
'This database will be started.',
|
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Start Database"
|
|
||||||
:dispatchAction="true">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="database-start-trigger" type="button" class="hidden">Start</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('service-forceDeploy-trigger')?.click()">
|
@click="$wire.dispatch('forceDeployEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -179,7 +179,7 @@
|
||||||
</button>
|
</button>
|
||||||
@elseif (str($service->status)->contains('exited'))
|
@elseif (str($service->status)->contains('exited'))
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('service-start-trigger')?.click()">
|
@click="$wire.dispatch('startEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
Deploy
|
Deploy
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('service-forceDeploy-trigger')?.click()">
|
@click="$wire.dispatch('forceDeployEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -228,7 +228,7 @@
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('service-start-trigger')?.click()">
|
@click="$wire.dispatch('startEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -238,7 +238,7 @@
|
||||||
Deploy
|
Deploy
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="button shrink-0"
|
<button type="button" class="button shrink-0"
|
||||||
@click="document.getElementById('service-forceDeploy-trigger')?.click()">
|
@click="$wire.dispatch('forceDeployEvent')">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
|
|
@ -422,7 +422,7 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@elseif (str($service->status)->contains('exited'))
|
@elseif (str($service->status)->contains('exited'))
|
||||||
<x-forms.button canGate="deploy" :canResource="$service" @click="document.getElementById('service-start-trigger')?.click()" class="gap-2">
|
<x-forms.button canGate="deploy" :canResource="$service" @click="$wire.dispatch('startEvent')" class="gap-2">
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
|
|
@ -447,7 +447,7 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
</svg>
|
</svg>
|
||||||
Stop
|
Stop
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<x-forms.button canGate="deploy" :canResource="$service" @click="document.getElementById('service-start-trigger')?.click()" class="gap-2">
|
<x-forms.button canGate="deploy" :canResource="$service" @click="$wire.dispatch('startEvent')" class="gap-2">
|
||||||
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
|
|
@ -471,13 +471,6 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@if ($service->isDeployable)
|
@if ($service->isDeployable)
|
||||||
<x-modal-confirmation title="Confirm Service Deployment?" buttonTitle="Deploy"
|
|
||||||
submitAction="startEvent" :dispatchAction="true" :actions="['This service will be deployed.']"
|
|
||||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="service-start-trigger" type="button" class="hidden">Deploy</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
<x-modal-confirmation title="Confirm Service Restart?" buttonTitle="Restart"
|
<x-modal-confirmation title="Confirm Service Restart?" buttonTitle="Restart"
|
||||||
submitAction="restartEvent" :dispatchAction="true" :actions="['This service will be restarted.']"
|
submitAction="restartEvent" :dispatchAction="true" :actions="['This service will be restarted.']"
|
||||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
||||||
|
|
@ -492,13 +485,6 @@ class="scrollbar hidden min-h-10 w-full flex-nowrap items-center gap-6 overflow-
|
||||||
<button id="service-stop-trigger" type="button" class="hidden">Stop</button>
|
<button id="service-stop-trigger" type="button" class="hidden">Stop</button>
|
||||||
</x-slot:trigger>
|
</x-slot:trigger>
|
||||||
</x-modal-confirmation>
|
</x-modal-confirmation>
|
||||||
<x-modal-confirmation title="Confirm Service Force Deployment?" buttonTitle="Force Deploy"
|
|
||||||
submitAction="forceDeployEvent" :dispatchAction="true" :actions="['This service will be force deployed.']"
|
|
||||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
|
||||||
<x-slot:trigger>
|
|
||||||
<button id="service-forceDeploy-trigger" type="button" class="hidden">Force Deploy</button>
|
|
||||||
</x-slot:trigger>
|
|
||||||
</x-modal-confirmation>
|
|
||||||
<x-modal-confirmation title="Confirm Pull Latest Images & Restart?" buttonTitle="Pull Latest Images & Restart"
|
<x-modal-confirmation title="Confirm Pull Latest Images & Restart?" buttonTitle="Pull Latest Images & Restart"
|
||||||
submitAction="pullAndRestartEvent" :dispatchAction="true" :actions="['Latest images will be pulled and the service will be restarted.']"
|
submitAction="pullAndRestartEvent" :dispatchAction="true" :actions="['Latest images will be pulled and the service will be restarted.']"
|
||||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Confirm">
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,12 @@
|
||||||
->toContain("value.startsWith('location|')")
|
->toContain("value.startsWith('location|')")
|
||||||
->toContain('window.location.href = url')
|
->toContain('window.location.href = url')
|
||||||
->toContain('application-mobile-stop-trigger')
|
->toContain('application-mobile-stop-trigger')
|
||||||
->toContain('application-mobile-deploy-trigger')
|
|
||||||
->toContain('application-mobile-restart-trigger')
|
->toContain('application-mobile-restart-trigger')
|
||||||
->toContain('application-mobile-force-deploy-trigger')
|
->toContain('wire:click="deploy"')
|
||||||
|
->toContain('wire:click="force_deploy_without_cache"')
|
||||||
|
->not->toContain('application-mobile-deploy-trigger')
|
||||||
|
->not->toContain('application-mobile-force-deploy-trigger')
|
||||||
|
->not->toContain('Confirm Application Deployment?')
|
||||||
->not->toContain('<optgroup label="Actions">');
|
->not->toContain('<optgroup label="Actions">');
|
||||||
|
|
||||||
expect($applicationMobileActions)
|
expect($applicationMobileActions)
|
||||||
|
|
@ -51,7 +54,9 @@
|
||||||
->toContain('x-model="selected"')
|
->toContain('x-model="selected"')
|
||||||
->toContain('database-restart-trigger')
|
->toContain('database-restart-trigger')
|
||||||
->toContain('database-stop-trigger')
|
->toContain('database-stop-trigger')
|
||||||
->toContain('database-start-trigger')
|
->toContain("\$wire.dispatch('startEvent')")
|
||||||
|
->not->toContain('database-start-trigger')
|
||||||
|
->not->toContain('Confirm Database Start?')
|
||||||
->toContain('scrollbar hidden min-h-10')
|
->toContain('scrollbar hidden min-h-10')
|
||||||
->not->toContain('<optgroup label="Links">')
|
->not->toContain('<optgroup label="Links">')
|
||||||
->not->toContain('<optgroup label="Actions">')
|
->not->toContain('<optgroup label="Actions">')
|
||||||
|
|
@ -86,8 +91,13 @@
|
||||||
->toContain('x-model="selected"')
|
->toContain('x-model="selected"')
|
||||||
->toContain('service-restart-trigger')
|
->toContain('service-restart-trigger')
|
||||||
->toContain('service-stop-trigger')
|
->toContain('service-stop-trigger')
|
||||||
->toContain('service-forceDeploy-trigger')
|
->toContain("\$wire.dispatch('startEvent')")
|
||||||
|
->toContain("\$wire.dispatch('forceDeployEvent')")
|
||||||
->toContain('service-pullAndRestart-trigger')
|
->toContain('service-pullAndRestart-trigger')
|
||||||
|
->not->toContain('service-start-trigger')
|
||||||
|
->not->toContain('service-forceDeploy-trigger')
|
||||||
|
->not->toContain('Confirm Service Deployment?')
|
||||||
|
->not->toContain('Confirm Service Force Deployment?')
|
||||||
->toContain('scrollbar hidden min-h-10')
|
->toContain('scrollbar hidden min-h-10')
|
||||||
->toContain('mb-4 w-full md:mb-0 md:hidden')
|
->toContain('mb-4 w-full md:mb-0 md:hidden')
|
||||||
->toContain('hidden flex-wrap items-center gap-2 md:flex')
|
->toContain('hidden flex-wrap items-center gap-2 md:flex')
|
||||||
|
|
|
||||||
|
|
@ -98,12 +98,18 @@
|
||||||
$response->assertSee('value="navigate|configuration|', false);
|
$response->assertSee('value="navigate|configuration|', false);
|
||||||
$response->assertSee('window.Livewire?.navigate ? window.Livewire.navigate(url) : window.location.href = url', false);
|
$response->assertSee('window.Livewire?.navigate ? window.Livewire.navigate(url) : window.location.href = url', false);
|
||||||
$response->assertSee('application-mobile-stop-trigger');
|
$response->assertSee('application-mobile-stop-trigger');
|
||||||
$response->assertSee('application-mobile-deploy-trigger');
|
|
||||||
$response->assertSee('application-mobile-restart-trigger');
|
$response->assertSee('application-mobile-restart-trigger');
|
||||||
$response->assertSee('application-mobile-force-deploy-trigger');
|
$response->assertSee('wire:click="deploy"', false);
|
||||||
$response->assertSee('Confirm Application Deployment?');
|
$response->assertSee('Force deploy (without cache)');
|
||||||
|
expect(
|
||||||
|
str_contains($response->getContent(), 'wire:click="force_deploy_without_cache"')
|
||||||
|
|| str_contains($response->getContent(), 'wire:click="deploy(true)"')
|
||||||
|
)->toBeTrue();
|
||||||
|
$response->assertDontSee('Confirm Application Deployment?');
|
||||||
$response->assertSee('Confirm Application Restart?');
|
$response->assertSee('Confirm Application Restart?');
|
||||||
$response->assertSee('Confirm Application Force Deployment?');
|
$response->assertDontSee('Confirm Application Force Deployment?');
|
||||||
|
$response->assertDontSee('application-mobile-deploy-trigger');
|
||||||
|
$response->assertDontSee('application-mobile-force-deploy-trigger');
|
||||||
$response->assertSee('sub-menu-wrapper hidden md:flex', false);
|
$response->assertSee('sub-menu-wrapper hidden md:flex', false);
|
||||||
$response->assertSee('scrollbar hidden min-h-10', false);
|
$response->assertSee('scrollbar hidden min-h-10', false);
|
||||||
$response->assertSee(route('project.application.deployment.index', [
|
$response->assertSee(route('project.application.deployment.index', [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue