diff --git a/public/app/features/alerting/unified/RuleEditor.test.tsx b/public/app/features/alerting/unified/RuleEditor.test.tsx index 53e330ce300..c3efcb61d44 100644 --- a/public/app/features/alerting/unified/RuleEditor.test.tsx +++ b/public/app/features/alerting/unified/RuleEditor.test.tsx @@ -83,8 +83,8 @@ const ui = { addLabel: byRole('button', { name: /Add label/ }), // alert type buttons grafanaManagedAlert: byRole('button', { name: /Grafana managed/ }), - lotexAlert: byRole('button', { name: /Cortex or Loki alert/ }), - lotexRecordingRule: byRole('button', { name: /Cortex or Loki recording rule/ }), + lotexAlert: byRole('button', { name: /Mimir or Loki alert/ }), + lotexRecordingRule: byRole('button', { name: /Mimir or Loki recording rule/ }), }, }; @@ -523,16 +523,15 @@ describe('RuleEditor', () => { mocks.getAllDataSources.mockReturnValue(Object.values(dataSources)); mocks.searchFolders.mockResolvedValue([]); - // render rule editor, select cortex/loki managed alerts + // render rule editor, select mimir/loki managed alerts await renderRuleEditor(); await waitFor(() => expect(mocks.searchFolders).toHaveBeenCalled()); + // wait for ui theck each datasource if it supports rule editing + await waitFor(() => expect(mocks.api.fetchRulerRulesGroup).toHaveBeenCalledTimes(4)); await ui.inputs.name.find(); userEvent.click(await ui.buttons.lotexAlert.get()); - // wait for ui theck each datasource if it supports rule editing - await waitFor(() => expect(mocks.api.fetchRulerRulesGroup).toHaveBeenCalledTimes(4)); - // check that only rules sources that have ruler available are there const dataSourceSelect = ui.inputs.dataSource.get(); userEvent.click(byRole('combobox').get(dataSourceSelect)); diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiAlert.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx similarity index 71% rename from public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiAlert.tsx rename to public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx index cca6a06050e..8130915525c 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiAlert.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx @@ -7,19 +7,19 @@ interface Props extends SharedProps { onClick: (value: RuleFormType) => void; } -const CortexFlavoredType: FC = ({ selected = false, disabled = false, onClick }) => { +const MimirFlavoredType: FC = ({ selected = false, disabled = false, onClick }) => { return ( - Use a Cortex or Loki datasource. + Use a Mimir, Loki or Cortex datasource.
Expressions are not supported. } - image="/public/img/alerting/cortex_logo.svg" + image="/public/img/alerting/mimir_logo.svg" selected={selected} disabled={disabled} value={RuleFormType.cloudAlerting} @@ -29,4 +29,4 @@ const CortexFlavoredType: FC = ({ selected = false, disabled = false, onC ); }; -export { CortexFlavoredType }; +export { MimirFlavoredType }; diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiRecordingRule.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx similarity index 87% rename from public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiRecordingRule.tsx rename to public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx index 23ba5fecb0d..d07836555e4 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/CortexOrLokiRecordingRule.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx @@ -7,7 +7,7 @@ const RecordingRuleType: FC = ({ selected = false, disabled = false return ( Precompute expressions. @@ -15,7 +15,7 @@ const RecordingRuleType: FC = ({ selected = false, disabled = false Should be combined with an alert rule. } - image="/public/img/alerting/cortex_logo_recording.svg" + image="/public/img/alerting/mimir_logo_recording.svg" selected={selected} disabled={disabled} value={RuleFormType.cloudRecording} diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx index 1801dd4bcd0..85e3365cd7f 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx @@ -4,8 +4,8 @@ import React, { FC } from 'react'; import { useRulesSourcesWithRuler } from '../../../hooks/useRuleSourcesWithRuler'; import { RuleFormType } from '../../../types/rule-form'; import { GrafanaManagedRuleType } from './GrafanaManagedAlert'; -import { CortexFlavoredType } from './CortexOrLokiAlert'; -import { RecordingRuleType } from './CortexOrLokiRecordingRule'; +import { MimirFlavoredType } from './MimirOrLokiAlert'; +import { RecordingRuleType } from './MimirOrLokiRecordingRule'; import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data/src'; import { Stack } from '@grafana/experimental'; @@ -25,7 +25,7 @@ const RuleTypePicker: FC = ({ selected, onChange }) => { <> - = ({ selected, onChange }) => { /> - Select “Grafana managed” unless you have a Cortex or Loki data source with the Ruler API enabled. + Select “Grafana managed” unless you have a Mimir, Loki or Cortex data source with the Ruler API + enabled. ); diff --git a/public/img/alerting/cortex_logo.svg b/public/img/alerting/cortex_logo.svg deleted file mode 100644 index 810b8ef3f2e..00000000000 --- a/public/img/alerting/cortex_logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/alerting/cortex_logo_recording.svg b/public/img/alerting/cortex_logo_recording.svg deleted file mode 100644 index 489b8cd3dd5..00000000000 --- a/public/img/alerting/cortex_logo_recording.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/alerting/mimir_logo.svg b/public/img/alerting/mimir_logo.svg new file mode 100644 index 00000000000..c530cb6cfa1 --- /dev/null +++ b/public/img/alerting/mimir_logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/alerting/mimir_logo_recording.svg b/public/img/alerting/mimir_logo_recording.svg new file mode 100644 index 00000000000..bc5c1e898f7 --- /dev/null +++ b/public/img/alerting/mimir_logo_recording.svg @@ -0,0 +1 @@ + \ No newline at end of file