mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech: minor progress on mobx state tree & react containers, working on unit testing
This commit is contained in:
@@ -16,7 +16,7 @@ function WrapInProvider(store, Component, props) {
|
||||
export function reactContainer($route) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: '<h2>hasad</h2>',
|
||||
template: '',
|
||||
link(scope, elem) {
|
||||
let component = $route.current.locals.component;
|
||||
let props = {};
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
export class BundleLoader {
|
||||
lazy: any;
|
||||
|
||||
constructor(bundleName) {
|
||||
var defer = null;
|
||||
|
||||
this.lazy = [
|
||||
'$q',
|
||||
'$route',
|
||||
'$rootScope',
|
||||
($q, $route, $rootScope) => {
|
||||
if (defer) {
|
||||
return defer.promise;
|
||||
}
|
||||
|
||||
defer = $q.defer();
|
||||
|
||||
System.import(bundleName).then(() => {
|
||||
defer.resolve();
|
||||
});
|
||||
|
||||
return defer.promise;
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import './dashboard_loaders';
|
||||
import './ReactContainer';
|
||||
import ServerStats from 'app/containers/ServerStats';
|
||||
import { ServerStats } from 'app/containers/ServerStats/ServerStats';
|
||||
|
||||
/** @ngInject **/
|
||||
export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
|
||||
Reference in New Issue
Block a user