feat(scheduling): resolve the issue discovery rule per organisation

This commit is contained in:
sam committed 2026-10-27 10:38:00 +11:00
1 parent b8e080301c
commit 8150df8d81
12 files changed
+168 -35

No files matched your search

+5 -1
View File
@@ -18,6 +18,7 @@ import {
} from "@/components/ui/number-field";
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { Section } from "@/components/ui/section";
import { useSessionStore } from "@/stores/session";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import { fieldInvalid } from "./settings-form";
@@ -32,6 +33,9 @@ interface SchedulingPolicy {
}
const store = useSettingsStore();
// Polling and the retry cap belong to the one daemon, so only the system
// org's admin sees them.
const instance = computed(() => useSessionStore().sections?.settings !== false);
const { catalog, catalogError } = storeToRefs(store);
onMounted(store.load);
@@ -121,7 +125,7 @@ const triggers = [
</FieldGroup>
</Section>
<Section title="Retries and polling">
<Section v-if="instance" title="Retries and polling">
<FieldGroup class="@container/field-group">
<form.Field v-slot="{ field }" name="max_retries">
<Field orientation="responsive">
+1 -1
View File
@@ -62,7 +62,7 @@ export function validateSchedulingPolicy(value: unknown): FieldIssue[] {
const policy = (value ?? {}) as SchedulingDraft;
const issues: FieldIssue[] = [];
const ms = parseGoDuration(policy.poll_interval ?? "");
if (ms === null || ms <= 0)
if (policy.poll_interval && (ms === null || ms <= 0))
issues.push({
path: "poll_interval",
label: "Poll interval",