# What this PR does - add link to docs for cloud users - use insightsDatasource from plugin metadata to support ops env - integrate filters with query strings ## Which issue(s) this PR fixes https://github.com/grafana/oncall-private/issues/2434 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import { AppRootProps as BaseAppRootProps, AppPluginMeta, CurrentUserDTO, PluginConfigPageProps } from '@grafana/data';
|
|
|
|
export type OnCallPluginMetaJSONData = {
|
|
stackId: number;
|
|
orgId: number;
|
|
onCallApiUrl: string;
|
|
insightsDatasource?: string;
|
|
license: string;
|
|
};
|
|
|
|
export type OnCallPluginMetaSecureJSONData = {
|
|
grafanaToken: string;
|
|
onCallApiToken: string;
|
|
};
|
|
|
|
export type AppRootProps = BaseAppRootProps<OnCallPluginMetaJSONData>;
|
|
|
|
// NOTE: it is possible that plugin.meta.jsonData is null (ex. on first-ever setup)
|
|
// the typing on AppPluginMeta does not seem correct atm..
|
|
export type OnCallAppPluginMeta = AppPluginMeta<null | OnCallPluginMetaJSONData>;
|
|
export type OnCallPluginConfigPageProps = PluginConfigPageProps<OnCallAppPluginMeta>;
|
|
|
|
// Extension points that other plugins can use to hook into the OnCall app.
|
|
export enum OnCallPluginExtensionPoints {
|
|
AlertGroupAction = 'plugins/grafana-oncall-app/alert-group/action',
|
|
}
|
|
|
|
declare global {
|
|
export interface Window {
|
|
// https://github.com/grafana/grafana/blob/78bef7a26a799209b5307d6bde8e25fcb4fbde7d/public/views/index-template.html#L251-L258
|
|
grafanaBootData: {
|
|
user: CurrentUserDTO;
|
|
settings: {
|
|
unifiedAlertingEnabled: boolean;
|
|
unifiedAlerting: { minInterval: string };
|
|
};
|
|
};
|
|
RECAPTCHA_SITE_KEY: string;
|
|
grecaptcha: any;
|
|
dataLayer: any;
|
|
mixpanel: any;
|
|
}
|
|
}
|