mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch '13739/alert-to-react'
This commit is contained in:
25
public/app/types/appNotifications.ts
Normal file
25
public/app/types/appNotifications.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface AppNotification {
|
||||
id?: number;
|
||||
severity: AppNotificationSeverity;
|
||||
icon: string;
|
||||
title: string;
|
||||
text: string;
|
||||
timeout: AppNotificationTimeout;
|
||||
}
|
||||
|
||||
export enum AppNotificationSeverity {
|
||||
Success = 'success',
|
||||
Warning = 'warning',
|
||||
Error = 'error',
|
||||
Info = 'info',
|
||||
}
|
||||
|
||||
export enum AppNotificationTimeout {
|
||||
Warning = 5000,
|
||||
Success = 3000,
|
||||
Error = 7000,
|
||||
}
|
||||
|
||||
export interface AppNotificationsState {
|
||||
appNotifications: AppNotification[];
|
||||
}
|
||||
@@ -22,6 +22,12 @@ import {
|
||||
} from './series';
|
||||
import { PanelProps } from './panel';
|
||||
import { PluginDashboard, PluginMeta, Plugin, PluginsState } from './plugins';
|
||||
import {
|
||||
AppNotification,
|
||||
AppNotificationSeverity,
|
||||
AppNotificationsState,
|
||||
AppNotificationTimeout,
|
||||
} from './appNotifications';
|
||||
|
||||
export {
|
||||
Team,
|
||||
@@ -70,6 +76,10 @@ export {
|
||||
DataQueryResponse,
|
||||
DataQueryOptions,
|
||||
PluginDashboard,
|
||||
AppNotification,
|
||||
AppNotificationsState,
|
||||
AppNotificationSeverity,
|
||||
AppNotificationTimeout,
|
||||
};
|
||||
|
||||
export interface StoreState {
|
||||
@@ -82,4 +92,5 @@ export interface StoreState {
|
||||
dashboard: DashboardState;
|
||||
dataSources: DataSourcesState;
|
||||
users: UsersState;
|
||||
appNotifications: AppNotificationsState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user