fix: should be able to reset labels in read-only mode with manual click
This commit is contained in:
parent
bfd6923ba6
commit
c338eef57b
2 changed files with 3 additions and 3 deletions
|
|
@ -274,10 +274,10 @@ public function getWildcardDomain()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resetDefaultLabels()
|
public function resetDefaultLabels($manualReset = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($this->application->settings->is_container_label_readonly_enabled) {
|
if ($this->application->settings->is_container_label_readonly_enabled && ! $manualReset) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->customLabels = str(implode('|coolify|', generateLabelsApplication($this->application)))->replace('|coolify|', "\n");
|
$this->customLabels = str(implode('|coolify|', generateLabelsApplication($this->application)))->replace('|coolify|', "\n");
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
||||||
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
|
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
|
||||||
</div>
|
</div>
|
||||||
<x-modal-confirmation title="Confirm Labels Reset to Coolify Defaults?"
|
<x-modal-confirmation title="Confirm Labels Reset to Coolify Defaults?"
|
||||||
buttonTitle="Reset Labels to Coolify Defaults" buttonFullWidth submitAction="resetDefaultLabels"
|
buttonTitle="Reset Labels to Defaults" buttonFullWidth submitAction="resetDefaultLabels(true)"
|
||||||
:actions="[
|
:actions="[
|
||||||
'All your custom proxy labels will be lost.',
|
'All your custom proxy labels will be lost.',
|
||||||
'Proxy labels (traefik, caddy, etc) will be reset to the coolify defaults.',
|
'Proxy labels (traefik, caddy, etc) will be reset to the coolify defaults.',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue