Skip to content

Commit

Permalink
Watch enablement
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Dec 6, 2024
1 parent eb03262 commit 6c7235a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions api/web/src/components/Layer/LayerConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
</template>

<script setup lang='ts'>
import { ref, onMounted } from 'vue';
import { ref, watch, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { std, humanSeconds } from '../../../src/std.ts';
import type { ETLTaskVersions } from '../../../src/types.ts';
Expand Down Expand Up @@ -434,7 +434,7 @@ const config = ref<{
task: string,
timeout: number,
memory: number,
cron: string | number,
cron: string | null,
stale: number,
alarm_period: number,
alarm_evals: number,
Expand All @@ -457,6 +457,14 @@ const config = ref<{
alarm_threshold: 0
});
watch(config, () => {
if (cronEnabled.value) {
config.value.cron = '0/15 * * * ? *';
} else {
config.value.cron = null;
}
});
onMounted(() => {
reload();
loading.value.init = false;
Expand Down

0 comments on commit 6c7235a

Please sign in to comment.