Commit 0dd7fb73 by Torkel Ödegaard

tech(systemjs): most things work

parent d34ba416
define([
'./app2'
], function(app) {
'use strict';
// backward compatability hack;
return app.default;
});
define([
'./time_series2'
], function(timeSeries) {
'use strict';
// backward compatability hack;
return timeSeries.default;
});
......@@ -20,6 +20,7 @@ function (angular, $, config) {
elem.append(panelEl);
$compile(panelEl)(scope);
}).catch(function(err) {
console.log('Failed to load panel:', err);
scope.appEvent('alert-error', ['Panel Load Error', 'Failed to load panel ' + panelType + ', ' + err]);
});
}
......
......@@ -60,6 +60,7 @@ export class GrafanaApp {
'grafana',
'pasvaz.bindonce',
'ui.bootstrap.tabs',
'ui.bootstrap.tpls',
];
var module_types = ['controllers', 'directives', 'factories', 'services', 'filters', 'routes'];
......
......@@ -14,7 +14,6 @@ function (angular, _, $, config, dateMath) {
var module = angular.module('grafana.services');
console.log('module.factory(GraphiteDatasource');
module.factory('GraphiteDatasource', function($q, backendSrv, templateSrv) {
function GraphiteDatasource(datasource) {
......
......@@ -110,7 +110,7 @@ function (_, TableModel) {
};
p.getTable = function() {
var table = new TableModel();
var table = new TableModel.default();
var self = this;
var i, j;
......
......@@ -9,7 +9,7 @@ function (angular, app, _, config, PanelMeta) {
'use strict';
var module = angular.module('grafana.panels.dashlist', []);
app.default.useModule(module);
app.useModule(module);
module.directive('grafanaPanelDashlist', function() {
return {
......
......@@ -7,7 +7,7 @@ define([
'use strict';
var module = angular.module('grafana.panels.graph', []);
app.default.useModule(module);
app.useModule(module);
module.controller('SeriesOverridesCtrl', function($scope, $element, popoverSrv) {
$scope.overrideMenu = [];
......
......@@ -11,7 +11,7 @@ function (angular, app, _, kbn, TimeSeries, PanelMeta) {
'use strict';
var module = angular.module('grafana.panels.singlestat');
app.default.useModule(module);
app.useModule(module);
module.directive('grafanaPanelSinglestat', function() {
return {
......
......@@ -9,7 +9,7 @@ function (angular, app, _, $) {
'use strict';
var module = angular.module('grafana.panels.singlestat', []);
app.default.useModule(module);
app.useModule(module);
module.directive('singlestatPanel', function($location, linkSrv, $timeout, templateSrv) {
......
......@@ -3,7 +3,7 @@
import moment = require('moment');
import _ = require('lodash');
import flatten from '../../../core/utils/flatten';
import TimeSeries from '../../../core/time_series';
import TimeSeries from '../../../core/time_series2';
import TableModel from '../../../core/table_model';
var transformers = {};
......
......@@ -11,7 +11,7 @@ function (angular, app, _, require, PanelMeta) {
var converter;
var module = angular.module('grafana.panels.text', []);
app.default.useModule(module);
app.useModule(module);
module.directive('grafanaPanelText', function() {
return {
......
......@@ -69,7 +69,7 @@
<script>
System.import('app/app').then(function(app) {
app.default.init();
app.init();
}).catch(function(err) {
console.log('Loading app module failed: ', err);
});
......
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