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