mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech(systemjs): more fixes for optmized build
This commit is contained in:
parent
dabd680d6b
commit
0a9f705308
@ -2,7 +2,6 @@
|
||||
'use strict';
|
||||
|
||||
System.import('app/app').then(function(app) {
|
||||
console.log(app);
|
||||
app.init();
|
||||
}).catch(function(err) {
|
||||
console.log('Loading app module failed: ', err);
|
||||
|
@ -8,7 +8,6 @@ import $ from 'jquery';
|
||||
import coreModule from '../core_module';
|
||||
|
||||
coreModule.controller('GrafanaCtrl', function($scope, alertSrv, utilSrv, $rootScope, $controller, contextSrv) {
|
||||
console.log('grafana ctrl');
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.contextSrv = contextSrv;
|
||||
|
@ -6,6 +6,7 @@ import coreModule from '../core_module';
|
||||
|
||||
export class SignUpCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(
|
||||
private $scope : any,
|
||||
private $location : any,
|
||||
|
@ -30,6 +30,7 @@ export class TimePickerCtrl {
|
||||
isOpen: boolean;
|
||||
isUtc: boolean;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $scope, private $rootScope, private timeSrv) {
|
||||
$scope.ctrl = this;
|
||||
|
||||
|
@ -17,9 +17,6 @@ import bootstrap = require('bootstrap');
|
||||
import kbn = require('app/core/utils/kbn');
|
||||
import config = require('app/core/config');
|
||||
|
||||
// import {Component} from 'angular2/core';
|
||||
// console.log(Component);
|
||||
|
||||
export class GrafanaApp {
|
||||
registerFunctions: any;
|
||||
ngModuleDependencies: any[];
|
||||
@ -46,7 +43,6 @@ export class GrafanaApp {
|
||||
app.constant('grafanaVersion', "@grafanaVersion@");
|
||||
|
||||
app.config(($locationProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) => {
|
||||
console.log('app config');
|
||||
this.registerFunctions.controller = $controllerProvider.register;
|
||||
this.registerFunctions.directive = $compileProvider.directive;
|
||||
this.registerFunctions.factory = $provide.factory;
|
||||
|
@ -34,6 +34,9 @@ System.config({
|
||||
vendor: {
|
||||
defaultExtension: 'js',
|
||||
},
|
||||
test: {
|
||||
defaultExtension: 'js',
|
||||
},
|
||||
},
|
||||
|
||||
map: {
|
||||
|
@ -19,10 +19,10 @@ module.exports = function(grunt) {
|
||||
'ngAnnotate:build',
|
||||
'systemjs:build',
|
||||
'concat:js',
|
||||
// 'filerev',
|
||||
// 'remapFilerev',
|
||||
'filerev',
|
||||
'remapFilerev',
|
||||
'usemin',
|
||||
// 'uglify:genDir'
|
||||
'uglify:genDir'
|
||||
]);
|
||||
|
||||
// task to add [[.AppSubUrl]] to reved path
|
||||
|
@ -14,7 +14,7 @@ module.exports = function(config) {
|
||||
dest: '<%= genDir %>/css'
|
||||
},
|
||||
js: {
|
||||
src: '<%= genDir %>/app/app.js',
|
||||
src: '<%= genDir %>/app/boot.js',
|
||||
dest: '<%= genDir %>/app'
|
||||
}
|
||||
};
|
||||
|
@ -13,10 +13,10 @@ module.exports = function(grunt) {
|
||||
var modules = [
|
||||
'app/app',
|
||||
'app/features/all',
|
||||
'app/plugins/panels/**/*',
|
||||
'app/plugins/datasource/graphite/**/*',
|
||||
'app/plugins/datasource/influxdb/**/*',
|
||||
'app/plugins/datasource/elasticsearch/**/*',
|
||||
'app/plugins/panels/**/module',
|
||||
'app/plugins/datasource/graphite/datasource',
|
||||
'app/plugins/datasource/influxdb/datasource',
|
||||
'app/plugins/datasource/elasticsearch/datasource',
|
||||
];
|
||||
|
||||
var expression = modules.join(' + ');
|
||||
@ -31,7 +31,7 @@ module.exports = function(grunt) {
|
||||
.catch(function(err) {
|
||||
console.log('Build error');
|
||||
console.log(err);
|
||||
done();
|
||||
done(false);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user