Merge branch '13739/alert-to-react'

This commit is contained in:
Torkel Ödegaard
2018-10-25 17:44:23 +02:00
20 changed files with 313 additions and 131 deletions

View 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[];
}

View File

@@ -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;
}