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

View File

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