Commit 474185c9 by Torkel Ödegaard

Moved a few things around

parent ab812e73
import React from 'react'; import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { DashboardRow } from '../dashgrid/DashboardRow'; import { DashboardRow } from './DashboardRow';
import { PanelModel } from '../panel_model'; import { PanelModel } from '../../panel_model';
describe('DashboardRow', () => { describe('DashboardRow', () => {
let wrapper, panel, dashboardMock; let wrapper, panel, dashboardMock;
......
import React from 'react'; import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { PanelModel } from '../panel_model'; import { PanelModel } from '../../panel_model';
import { DashboardModel } from '../dashboard_model'; import { DashboardModel } from '../../dashboard_model';
import templateSrv from 'app/features/templating/template_srv'; import templateSrv from 'app/features/templating/template_srv';
import appEvents from 'app/core/app_events'; import appEvents from 'app/core/app_events';
......
export { DashboardRow } from './DashboardRow';
...@@ -5,10 +5,10 @@ import coreModule from 'app/core/core_module'; ...@@ -5,10 +5,10 @@ import coreModule from 'app/core/core_module';
import { removePanel } from 'app/features/dashboard/utils/panel'; import { removePanel } from 'app/features/dashboard/utils/panel';
// Services // Services
import { AnnotationsSrv } from '../annotations/annotations_srv'; import { AnnotationsSrv } from '../../annotations/annotations_srv';
// Types // Types
import { DashboardModel } from './dashboard_model'; import { DashboardModel } from '../dashboard_model';
export class DashboardCtrl { export class DashboardCtrl {
dashboard: DashboardModel; dashboard: DashboardModel;
......
...@@ -7,7 +7,7 @@ import { importPluginModule } from 'app/features/plugins/plugin_loader'; ...@@ -7,7 +7,7 @@ import { importPluginModule } from 'app/features/plugins/plugin_loader';
import { AddPanelWidget } from '../components/AddPanelWidget'; import { AddPanelWidget } from '../components/AddPanelWidget';
import { getPanelPluginNotFound } from './PanelPluginNotFound'; import { getPanelPluginNotFound } from './PanelPluginNotFound';
import { DashboardRow } from './DashboardRow'; import { DashboardRow } from '../components/DashboardRow';
import { PanelChrome } from './PanelChrome'; import { PanelChrome } from './PanelChrome';
import { PanelEditor } from '../panel_editor/PanelEditor'; import { PanelEditor } from '../panel_editor/PanelEditor';
......
import './dashboard_ctrl'; import './containers/DashboardCtrl';
import './time_srv'; import './time_srv';
import './dashgrid/DashboardGridDirective'; import './dashgrid/DashboardGridDirective';
......
...@@ -4,8 +4,6 @@ import { Provider } from 'react-redux'; ...@@ -4,8 +4,6 @@ import { Provider } from 'react-redux';
import coreModule from 'app/core/core_module'; import coreModule from 'app/core/core_module';
import { store } from 'app/store/store'; import { store } from 'app/store/store';
import { BackendSrv } from 'app/core/services/backend_srv';
import { DatasourceSrv } from 'app/features/plugins/datasource_srv';
import { ContextSrv } from 'app/core/services/context_srv'; import { ContextSrv } from 'app/core/services/context_srv';
function WrapInProvider(store, Component, props) { function WrapInProvider(store, Component, props) {
...@@ -20,8 +18,6 @@ function WrapInProvider(store, Component, props) { ...@@ -20,8 +18,6 @@ function WrapInProvider(store, Component, props) {
export function reactContainer( export function reactContainer(
$route, $route,
$location, $location,
backendSrv: BackendSrv,
datasourceSrv: DatasourceSrv,
contextSrv: ContextSrv contextSrv: ContextSrv
) { ) {
return { return {
...@@ -42,11 +38,7 @@ export function reactContainer( ...@@ -42,11 +38,7 @@ export function reactContainer(
component = component.default; component = component.default;
} }
const props = { const props = { };
backendSrv: backendSrv,
datasourceSrv: datasourceSrv,
routeParams: $route.current.params,
};
ReactDOM.render(WrapInProvider(store, component, props), elem[0]); ReactDOM.render(WrapInProvider(store, component, props), elem[0]);
......
...@@ -50,3 +50,4 @@ ...@@ -50,3 +50,4 @@
display: none; display: none;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment