mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
moving things
This commit is contained in:
28
public/app/core/actions/appNotification.ts
Normal file
28
public/app/core/actions/appNotification.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AppNotification } from 'app/types/';
|
||||
|
||||
export enum ActionTypes {
|
||||
AddAppNotification = 'ADD_APP_NOTIFICATION',
|
||||
ClearAppNotification = 'CLEAR_APP_NOTIFICATION',
|
||||
}
|
||||
|
||||
interface AddAppNotificationAction {
|
||||
type: ActionTypes.AddAppNotification;
|
||||
payload: AppNotification;
|
||||
}
|
||||
|
||||
interface ClearAppNotificationAction {
|
||||
type: ActionTypes.ClearAppNotification;
|
||||
payload: number;
|
||||
}
|
||||
|
||||
export type Action = AddAppNotificationAction | ClearAppNotificationAction;
|
||||
|
||||
export const clearAppNotification = (appNotificationId: number) => ({
|
||||
type: ActionTypes.ClearAppNotification,
|
||||
payload: appNotificationId,
|
||||
});
|
||||
|
||||
export const addAppNotification = (alert: AppNotification) => ({
|
||||
type: ActionTypes.AddAppNotification,
|
||||
payload: alert,
|
||||
});
|
||||
Reference in New Issue
Block a user