Rename tag for combined alert rules

This commit is contained in:
Tom Ratcliffe 2024-03-28 15:30:08 +00:00 committed by Tom Ratcliffe
parent 1fcb264c87
commit d585a5bc88
2 changed files with 5 additions and 5 deletions

View File

@ -180,7 +180,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
transformResponse: (response: PromRulesResponse, _, args): RuleNamespace[] => {
return groupRulesByFileName(response.data.groups, args.ruleSourceName);
},
providesTags: ['AlertRulerRule'],
providesTags: ['CombinedAlertRule'],
}),
rulerRules: build.query<
@ -191,7 +191,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
const { path, params } = rulerUrlBuilder(rulerConfig).rules(filter);
return { url: path, params };
},
providesTags: ['AlertRulerRule'],
providesTags: ['CombinedAlertRule'],
}),
// TODO This should be probably a separate ruler API file
@ -203,7 +203,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
const { path, params } = rulerUrlBuilder(rulerConfig).namespaceGroup(namespace, group);
return { url: path, params };
},
providesTags: ['AlertRulerRule'],
providesTags: ['CombinedAlertRule'],
}),
exportRules: build.query<string, ExportRulesParams>({
@ -274,7 +274,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
method: 'POST',
showSuccessAlert: false,
}),
invalidatesTags: ['AlertRulerRule'],
invalidatesTags: ['CombinedAlertRule'],
}),
}),
});

View File

@ -38,7 +38,7 @@ export const alertingApi = createApi({
'OnCallIntegrations',
'OrgMigrationState',
'DataSourceSettings',
'AlertRulerRule',
'CombinedAlertRule',
],
endpoints: () => ({}),
});