display cron errors

This commit is contained in:
Girish Ramakrishnan
2026-01-13 18:46:36 +01:00
parent 6bed5265e2
commit d4d6050862
+4 -1
View File
@@ -41,15 +41,17 @@ const crontabDefault = `# +------------------------ minute (0 - 59)
const busy = ref(false);
const crontab = ref('');
const submitError = ref({});
async function onSubmit() {
if (crontab.value === crontabDefault && !props.app.crontab) return;
if (crontab.value === props.app.crontab) return;
submitError.value = {};
busy.value = true;
const [error] = await appsModel.configure(props.app.id, 'crontab', { crontab: crontab.value });
if (error) return console.error(error);
if (error) submitError.value.generic = error.body?.message || JSON.stringify(error);
busy.value = false;
}
@@ -73,6 +75,7 @@ onMounted(() => {
</label>
<div description>{{ $t('app.cron.description') }}</div>
<textarea id="crontabInput" style="width: 100%; white-space: pre-wrap; font-family: monospace;" v-model="crontab" rows="10"></textarea>
<div class="error-label" v-show="submitError.generic">{{ submitError.generic }}</div>
</FormGroup>
</fieldset>
</form>