From 612c0e5a2ea219375cfd65679c89e2ad70293651 Mon Sep 17 00:00:00 2001 From: Dominik Broj Date: Wed, 2 Oct 2024 12:34:21 +0200 Subject: [PATCH 1/7] chore: back merge irm (#5111) # What this PR does Back merge irm ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- grafana-plugin/CHANGELOG.md | 12 ++++++++ grafana-plugin/package.json | 2 +- .../components/Policy/EscalationPolicy.tsx | 30 +++++++++++++++++++ .../EscalationChainSteps.tsx | 1 + .../containers/RotationForm/RotationForm.tsx | 9 ++++-- .../RotationForm/ScheduleOverrideForm.tsx | 18 +++++++++-- .../RotationForm/parts/DeletionModal.tsx | 5 +++- .../src/models/alertgroup/alertgroup.types.ts | 14 +++++++++ .../escalation_policy/escalation_policy.ts | 13 ++++++++ .../escalation_policy.types.ts | 1 + .../src/models/loader/action-keys.ts | 3 ++ .../src/models/schedule/schedule.ts | 4 +++ .../src/pages/incident/Incident.tsx | 24 +++++++++++++++ grafana-plugin/src/version.ts | 2 +- 14 files changed, 130 insertions(+), 8 deletions(-) diff --git a/grafana-plugin/CHANGELOG.md b/grafana-plugin/CHANGELOG.md index f66f1b73de..585b848c9a 100644 --- a/grafana-plugin/CHANGELOG.md +++ b/grafana-plugin/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.9.28](https://github.com/grafana/irm/compare/grafana-oncall-app-v1.9.27...grafana-oncall-app-v1.9.28) (2024-10-01) + + +### Bug Fixes + +* disallow oncall schedule rotation layer/overrides CUD form submissions more than once ([#193](https://github.com/grafana/irm/issues/193)) ([73ae1c7](https://github.com/grafana/irm/commit/73ae1c7d78474b42b9eb4305416828afeb04fa3a)) + + +### Miscellaneous Chores + +* implement merged IRM module.tsx ([#182](https://github.com/grafana/irm/issues/182)) ([995b573](https://github.com/grafana/irm/commit/995b5732493aabc226cd62b9ca52a1e582ef5878)) + ## [1.9.27](https://github.com/grafana/irm/compare/grafana-oncall-app-v1.9.26...grafana-oncall-app-v1.9.27) (2024-09-26) diff --git a/grafana-plugin/package.json b/grafana-plugin/package.json index c4a9b55d26..a960904928 100644 --- a/grafana-plugin/package.json +++ b/grafana-plugin/package.json @@ -1,6 +1,6 @@ { "name": "grafana-oncall-app", - "version": "1.9.27", + "version": "1.9.28", "description": "Grafana OnCall Plugin", "scripts": { "lint": "eslint --ext .js,.jsx,.ts,.tsx --max-warnings=20 ./src ./e2e-tests", diff --git a/grafana-plugin/src/components/Policy/EscalationPolicy.tsx b/grafana-plugin/src/components/Policy/EscalationPolicy.tsx index 7f341eb94c..aee19dad1d 100644 --- a/grafana-plugin/src/components/Policy/EscalationPolicy.tsx +++ b/grafana-plugin/src/components/Policy/EscalationPolicy.tsx @@ -131,6 +131,8 @@ class _EscalationPolicy extends React.Component { return this.renderNumAlertsInWindow(); case 'num_minutes_in_window': return this.renderNumMinutesInWindowOptions(); + case 'severity': + return this.renderSeverities(); default: console.warn('Unknown escalation step placeholder'); return ''; @@ -248,6 +250,34 @@ class _EscalationPolicy extends React.Component { ); } + renderSeverities() { + const { + data, + isDisabled, + theme, + store: { escalationPolicyStore }, + } = this.props; + const styles = getEscalationPolicyStyles(theme); + const { severity } = data; + + return ( + +