mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
24 lines
682 B
TypeScript
24 lines
682 B
TypeScript
import { SupportedPlugin } from '../types/pluginBridges';
|
|
|
|
import { alertingApi } from './alertingApi';
|
|
|
|
interface IncidentsPluginConfigDto {
|
|
isChatOpsInstalled: boolean;
|
|
isIncidentCreated: boolean;
|
|
}
|
|
|
|
const getProxyApiUrl = (path: string) => `/api/plugins/${SupportedPlugin.Incident}/resources${path}`;
|
|
|
|
export const incidentsApi = alertingApi.injectEndpoints({
|
|
endpoints: (build) => ({
|
|
getIncidentsPluginConfig: build.query<IncidentsPluginConfigDto, void>({
|
|
query: () => ({
|
|
url: getProxyApiUrl('/api/ConfigurationTrackerService.GetConfigurationTracker'),
|
|
data: {},
|
|
method: 'POST',
|
|
showErrorAlert: false,
|
|
}),
|
|
}),
|
|
}),
|
|
});
|