|
22 | 22 | </nav>
|
23 | 23 | <div class="flex flex-wrap order-first gap-2 items-center sm:order-last">
|
24 | 24 | @if (str($service->status())->contains('running'))
|
25 |
| - <button @click="$wire.dispatch('restartEvent')" class="gap-2 button"> |
| 25 | + <x-dropdown> |
| 26 | + <x-slot:title> |
| 27 | + Advanced |
| 28 | + </x-slot> |
| 29 | + <div class="dropdown-item" @click="$wire.dispatch('pullAndRestartEvent')"> |
| 30 | + <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5" |
| 31 | + stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 32 | + <path stroke="none" d="M0 0h24v24H0z" fill="none" /> |
| 33 | + <path |
| 34 | + d="M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" /> |
| 35 | + <path |
| 36 | + d="M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" /> |
| 37 | + <path d="M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" /> |
| 38 | + <path d="M3 3l18 18" /> |
| 39 | + </svg> |
| 40 | + Pull Latest Images & Restart |
| 41 | + </div> |
| 42 | + </x-dropdown> |
| 43 | + <x-forms.button title="Restart" @click="$wire.dispatch('restartEvent')"> |
26 | 44 | <svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
27 | 45 | <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
28 | 46 | stroke-width="2">
|
29 | 47 | <path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
|
30 | 48 | <path d="M20 4v5h-5" />
|
31 | 49 | </g>
|
32 | 50 | </svg>
|
33 |
| - Pull Latest Images & Restart |
34 |
| - </button> |
| 51 | + Restart |
| 52 | + </x-forms.button> |
35 | 53 | <x-modal-confirmation title="Confirm Service Stopping?" buttonTitle="Stop" submitAction="stop"
|
36 | 54 | :checkboxes="$checkboxes" :actions="[__('service.stop'), __('resource.non_persistent')]" :confirmWithText="false" :confirmWithPassword="false" step1ButtonText="Continue"
|
37 | 55 | step2ButtonText="Stop Service" :dispatchEvent="true" dispatchEventType="stopEvent">
|
|
135 | 153 | $wire.$call('start');
|
136 | 154 | });
|
137 | 155 | $wire.$on('restartEvent', () => {
|
138 |
| - $wire.$dispatch('info', 'Pulling new images.'); |
| 156 | + $wire.$dispatch('info', 'Service restart in progress.'); |
139 | 157 | $wire.$call('restart');
|
140 | 158 | });
|
| 159 | + $wire.$on('pullAndRestartEvent', () => { |
| 160 | + $wire.$dispatch('info', 'Pulling new images.'); |
| 161 | + $wire.$call('pullAndRestartEvent'); |
| 162 | + }); |
141 | 163 | $wire.on('imagePulled', () => {
|
142 | 164 | window.dispatchEvent(new CustomEvent('startservice'));
|
143 | 165 | $wire.$dispatch('info', 'Restarting service.');
|
|
0 commit comments