Leverage the IG mixin on the schedules model

Move associate/disassociate label methods into mixin

Move label/IG saving out to related endpoints off of a schedule
This commit is contained in:
mabashian
2022-08-31 10:39:53 -04:00
committed by Alan Rominger
parent 663ef2cc64
commit d5d24e421b
11 changed files with 422 additions and 116 deletions

View File

@@ -59,7 +59,7 @@ function ScheduleForm({
useCallback(async () => {
const { data } = await SchedulesAPI.readZoneInfo();
let creds;
let creds = [];
let allLabels;
if (schedule.id) {
if (
@@ -107,7 +107,7 @@ function ScheduleForm({
return {
zoneOptions: zones,
zoneLinks: data.links,
credentials: creds || [],
credentials: creds,
labels: allLabels || [],
};
}, [
@@ -467,7 +467,13 @@ function ScheduleForm({
},
}}
onSubmit={(values) => {
submitSchedule(values, launchConfig, surveyConfig, credentials);
submitSchedule(
values,
launchConfig,
surveyConfig,
credentials,
labels
);
}}
validate={validate}
>