From ed99a543a53afe6700eed3180f4ab4bd9369656a Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Wed, 24 Oct 2018 10:23:11 +0200 Subject: [PATCH] moving things --- .../state/actions.ts => actions/appNotification.ts} | 2 +- public/app/core/angular_wrappers.ts | 2 +- .../components/AppNotifications/AppNotificationList.tsx | 2 +- .../reducers.test.ts => reducers/appNotification.test.ts} | 6 +++--- .../state/reducers.ts => reducers/appNotification.ts} | 4 ++-- public/app/store/configureStore.ts | 2 +- public/views/index.template.html | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename public/app/core/{components/AppNotifications/state/actions.ts => actions/appNotification.ts} (93%) rename public/app/core/{components/AppNotifications/state/reducers.test.ts => reducers/appNotification.test.ts} (84%) rename public/app/core/{components/AppNotifications/state/reducers.ts => reducers/appNotification.ts} (90%) diff --git a/public/app/core/components/AppNotifications/state/actions.ts b/public/app/core/actions/appNotification.ts similarity index 93% rename from public/app/core/components/AppNotifications/state/actions.ts rename to public/app/core/actions/appNotification.ts index c6cfe9c3e9e..009e99b1245 100644 --- a/public/app/core/components/AppNotifications/state/actions.ts +++ b/public/app/core/actions/appNotification.ts @@ -1,4 +1,4 @@ -import { AppNotification } from 'app/types'; +import { AppNotification } from 'app/types/'; export enum ActionTypes { AddAppNotification = 'ADD_APP_NOTIFICATION', diff --git a/public/app/core/angular_wrappers.ts b/public/app/core/angular_wrappers.ts index 14a0dcdb234..7be28272f11 100644 --- a/public/app/core/angular_wrappers.ts +++ b/public/app/core/angular_wrappers.ts @@ -10,7 +10,7 @@ import AppNotificationList from './components/AppNotifications/AppNotificationLi export function registerAngularDirectives() { react2AngularDirective('passwordStrength', PasswordStrength, ['password']); react2AngularDirective('sidemenu', SideMenu, []); - react2AngularDirective('pageAlertList', AppNotificationList, []); + react2AngularDirective('appNotificationsList', AppNotificationList, []); react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']); react2AngularDirective('emptyListCta', EmptyListCTA, ['model']); react2AngularDirective('searchResult', SearchResult, []); diff --git a/public/app/core/components/AppNotifications/AppNotificationList.tsx b/public/app/core/components/AppNotifications/AppNotificationList.tsx index 10b5997ed98..53c88a41155 100644 --- a/public/app/core/components/AppNotifications/AppNotificationList.tsx +++ b/public/app/core/components/AppNotifications/AppNotificationList.tsx @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import appEvents from 'app/core/app_events'; -import { addAppNotification, clearAppNotification } from './state/actions'; +import { addAppNotification, clearAppNotification } from '../../actions/appNotification'; import { connectWithStore } from 'app/core/utils/connectWithReduxStore'; import { AppNotification, AppNotificationSeverity, StoreState } from 'app/types'; diff --git a/public/app/core/components/AppNotifications/state/reducers.test.ts b/public/app/core/reducers/appNotification.test.ts similarity index 84% rename from public/app/core/components/AppNotifications/state/reducers.test.ts rename to public/app/core/reducers/appNotification.test.ts index b46955a087f..5098abc9e74 100644 --- a/public/app/core/components/AppNotifications/state/reducers.test.ts +++ b/public/app/core/reducers/appNotification.test.ts @@ -1,6 +1,6 @@ -import { appNotificationsReducer } from './reducers'; -import { ActionTypes } from './actions'; -import { AppNotificationSeverity } from 'app/types'; +import { appNotificationsReducer } from './appNotification'; +import { ActionTypes } from '../actions/appNotification'; +import { AppNotificationSeverity } from 'app/types/index'; describe('clear alert', () => { it('should filter alert', () => { diff --git a/public/app/core/components/AppNotifications/state/reducers.ts b/public/app/core/reducers/appNotification.ts similarity index 90% rename from public/app/core/components/AppNotifications/state/reducers.ts rename to public/app/core/reducers/appNotification.ts index 7887a91a616..8812546356a 100644 --- a/public/app/core/components/AppNotifications/state/reducers.ts +++ b/public/app/core/reducers/appNotification.ts @@ -1,5 +1,5 @@ -import { AppNotification, AppNotificationsState } from 'app/types'; -import { Action, ActionTypes } from './actions'; +import { AppNotification, AppNotificationsState } from 'app/types/index'; +import { Action, ActionTypes } from '../actions/appNotification'; export const initialState: AppNotificationsState = { appNotifications: [] as AppNotification[], diff --git a/public/app/store/configureStore.ts b/public/app/store/configureStore.ts index c1c6103bab9..6b3205dc53e 100644 --- a/public/app/store/configureStore.ts +++ b/public/app/store/configureStore.ts @@ -10,7 +10,7 @@ import dashboardReducers from 'app/features/dashboard/state/reducers'; import pluginReducers from 'app/features/plugins/state/reducers'; import dataSourcesReducers from 'app/features/datasources/state/reducers'; import usersReducers from 'app/features/users/state/reducers'; -import appNotificationReducers from 'app/core/components/AppNotifications/state/reducers'; +import appNotificationReducers from 'app/core/reducers/appNotification'; const rootReducers = { ...sharedReducers, diff --git a/public/views/index.template.html b/public/views/index.template.html index 597fc8d8f59..ced39d9af28 100644 --- a/public/views/index.template.html +++ b/public/views/index.template.html @@ -200,7 +200,7 @@ - +