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