From 66cc80ae83377cbf62a537f26f420d8903bd4439 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Wed, 6 Nov 2024 10:33:24 +0530 Subject: [PATCH] Bug Fixes in Snapshot Policy: Schedule Editing and Index Expression Display Signed-off-by: Sandeep Kumawat --- .../components/CronSchedule/CronSchedule.tsx | 6 +++--- .../CreateSnapshotPolicy/CreateSnapshotPolicy.tsx | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx index bf07afd38..1475a947e 100644 --- a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx +++ b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx @@ -88,12 +88,12 @@ const CronSchedule = ({ function onDayOfWeekChange(dayOfWeek: string) { setWeek(dayOfWeek); - // changeCron({ dayOfWeek }); + changeCron({ dayOfWeek }); } function onDayOfMonthChange(dayOfMonth: number) { setMonth(dayOfMonth); - // changeCron({ dayOfMonth }); + changeCron({ dayOfMonth }); } function onStartTimeChange(date: moment.Moment) { @@ -101,7 +101,7 @@ const CronSchedule = ({ const hour = date.hour(); setMinute(minute); setHour(hour); - // changeCron({ minute, hour }); + changeCron({ minute, hour }); } function onTypeChange(e: ChangeEvent) { diff --git a/public/pages/CreateSnapshotPolicy/containers/CreateSnapshotPolicy/CreateSnapshotPolicy.tsx b/public/pages/CreateSnapshotPolicy/containers/CreateSnapshotPolicy/CreateSnapshotPolicy.tsx index 587192a34..b252bc330 100644 --- a/public/pages/CreateSnapshotPolicy/containers/CreateSnapshotPolicy/CreateSnapshotPolicy.tsx +++ b/public/pages/CreateSnapshotPolicy/containers/CreateSnapshotPolicy/CreateSnapshotPolicy.tsx @@ -477,7 +477,7 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent option.label).join(", ")), }); }; @@ -1002,6 +1002,10 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent) => { + this.setState({ policy: this.setPolicyHelper("snapshot_config.partial", e.target.checked) }); + }; + setPolicyHelper = (path: string, newValue: any) => { return _.set(this.state.policy, path, newValue); };