Allow to resubmit location info on pending location change task failure

This commit is contained in:
Johannes Zellner
2025-07-23 15:31:42 +02:00
parent 6c1045c545
commit f03ac0133f
+3 -3
View File
@@ -3,6 +3,7 @@
import { ref, onMounted, computed } from 'vue';
import { Button, SingleSelect, InputGroup, FormGroup, TextInput, Checkbox } from '@cloudron/pankow';
import { isValidDomain } from '@cloudron/pankow/utils';
import { ISTATES } from '../../constants.js';
import PortBindings from '../PortBindings.vue';
import AppsModel from '../../models/AppsModel.js';
import DomainsModel from '../../models/DomainsModel.js';
@@ -90,7 +91,6 @@ async function onSubmit() {
for (const d of redirects.value) checkForDomains.push({ domain: d.domain, subdomain: d.subdomain });
for (const d of checkForDomains) {
console.log('checking', d.subdomain, d.domain)
const [error, result] = await domainsModel.checkRecords(d.domain, d.subdomain);
if (error) {
errorMessage.value = error.body ? error.body.message : 'Internal error';
@@ -185,7 +185,7 @@ onMounted(async () => {
<div>
<form @submit.prevent="onSubmit()" autocomplete="off" novalidate>
<fieldset :disabled="busy">
<input type="submit" style="display: none;" :disabled="app.error || app.taskId || !formValid"/>
<input type="submit" style="display: none;" :disabled="(app.error && app.error.details?.installationState !== ISTATES.PENDING_LOCATION_CHANGE) || app.taskId || !formValid"/>
<FormGroup>
<label>{{ $t('app.location.location') }}</label>
@@ -253,6 +253,6 @@ onMounted(async () => {
<br/>
<Checkbox v-if="needsOverwriteDns" v-model="overwriteDns" :label="$t('app.location.dnsoverwrite')"/>
<Button @click="onSubmit()" :loading="busy" :disabled="busy || app.error || app.taskId || !formValid" v-tooltip="app.error ? 'App is in error state' : (app.taskId ? 'App is busy' : '')">{{ $t('app.location.saveAction') }}</Button>
<Button @click="onSubmit()" :loading="busy" :disabled="busy || (app.error && app.error.details?.installationState !== ISTATES.PENDING_LOCATION_CHANGE) || app.taskId || !formValid">{{ $t('app.location.saveAction') }}</Button>
</div>
</template>