From 3770cf5414f64066526ebaf1e28162a7e022db33 Mon Sep 17 00:00:00 2001 From: Maxim Mordasov Date: Wed, 30 Aug 2023 15:38:52 +0300 Subject: [PATCH] Fix dayOption NPE, add top boundary for rotation modal (#2920) # What this PR does ## Which issue(s) this PR fixes Fix: - Schedule race condition - No obvious way to close Rotation modal https://github.com/grafana/oncall/issues/2802 https://github.com/grafana/oncall/issues/2880 ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --- .../src/containers/RotationForm/RotationForm.tsx | 7 ++++++- grafana-plugin/src/models/schedule/schedule.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx index 1ef816ae..ed02dd3b 100644 --- a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx +++ b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx @@ -422,7 +422,12 @@ const RotationForm = observer((props: RotationFormProps) => { width="430px" onDismiss={onHide} contentElement={(props, children) => ( - +
{children}
)} diff --git a/grafana-plugin/src/models/schedule/schedule.ts b/grafana-plugin/src/models/schedule/schedule.ts index 392e2cf3..7fb49671 100644 --- a/grafana-plugin/src/models/schedule/schedule.ts +++ b/grafana-plugin/src/models/schedule/schedule.ts @@ -82,7 +82,7 @@ export class ScheduleStore extends BaseStore { } = {}; @observable - byDayOptions: SelectOption[]; + byDayOptions: SelectOption[] = []; @observable scheduleId: Schedule['id'];