Commit 78598df9 by Torkel Ödegaard

fixes(): fixes for changed app -> public/app paths and fixes for optimized build

parent e737dab5
...@@ -72,7 +72,7 @@ function (angular, _, coreModule) { ...@@ -72,7 +72,7 @@ function (angular, _, coreModule) {
scope.noText = payload.noText || "Cancel"; scope.noText = payload.noText || "Cancel";
var confirmModal = $modal({ var confirmModal = $modal({
template: './app/partials/confirm_modal.html', template: 'public/app/partials/confirm_modal.html',
persist: false, persist: false,
modalClass: 'modal-no-header confirm-modal', modalClass: 'modal-no-header confirm-modal',
show: false, show: false,
......
...@@ -31,7 +31,7 @@ function (angular, _, $) { ...@@ -31,7 +31,7 @@ function (angular, _, $) {
}; };
$scope.datasourceChanged = function() { $scope.datasourceChanged = function() {
datasourceSrv.get($scope.currentAnnotation.datasource).then(function(ds) { return datasourceSrv.get($scope.currentAnnotation.datasource).then(function(ds) {
$scope.currentDatasource = ds; $scope.currentDatasource = ds;
$scope.currentAnnotation.datasource = ds.name; $scope.currentAnnotation.datasource = ds.name;
}); });
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<i class="fa fa-remove"></i> <i class="fa fa-remove"></i>
</button> </button>
</div> </div>
<div class="gf-box-body"> <div class="gf-box-body">
<div class="editor-row row" ng-if="mode === 'list'"> <div class="editor-row row" ng-if="mode === 'list'">
<div class="span6"> <div class="span6">
<div ng-if="annotations.length === 0"> <div ng-if="annotations.length === 0">
......
...@@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) { ...@@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) {
annotation: "=", annotation: "=",
datasource: "=" datasource: "="
}, },
watchPath: "datasource.type", watchPath: "annotation.datasource",
directive: scope => { directive: scope => {
return System.import(scope.datasource.meta.module).then(function(dsModule) { return System.import(scope.datasource.meta.module).then(function(dsModule) {
return { return {
......
...@@ -21,7 +21,7 @@ function(angular, $) { ...@@ -21,7 +21,7 @@ function(angular, $) {
helpModalScope = $rootScope.$new(); helpModalScope = $rootScope.$new();
var helpModal = $modal({ var helpModal = $modal({
template: './app/partials/help_modal.html', template: 'public/app/partials/help_modal.html',
persist: false, persist: false,
show: false, show: false,
scope: helpModalScope, scope: helpModalScope,
......
...@@ -6,6 +6,7 @@ import {PanelCtrl} from './panel_ctrl'; ...@@ -6,6 +6,7 @@ import {PanelCtrl} from './panel_ctrl';
import {MetricsPanelCtrl} from './metrics_panel_ctrl'; import {MetricsPanelCtrl} from './metrics_panel_ctrl';
export class DefaultPanelCtrl extends PanelCtrl { export class DefaultPanelCtrl extends PanelCtrl {
/** @ngInject */
constructor($scope, $injector) { constructor($scope, $injector) {
super($scope, $injector); super($scope, $injector);
} }
......
...@@ -24,7 +24,7 @@ function panelLoader($compile, dynamicDirectiveSrv, $http, $q, $injector, $templ ...@@ -24,7 +24,7 @@ function panelLoader($compile, dynamicDirectiveSrv, $http, $q, $injector, $templ
} }
var cached = $templateCache.get(directive.templateUrl); var cached = $templateCache.get(directive.templateUrl);
if (cached) { if (cached) {
return cached; return $q.when(cached);
} }
return $http.get(directive.templateUrl).then(res => { return $http.get(directive.templateUrl).then(res => {
return res.data; return res.data;
......
...@@ -5,6 +5,7 @@ import _ from 'lodash'; ...@@ -5,6 +5,7 @@ import _ from 'lodash';
export class EditViewCtrl { export class EditViewCtrl {
/** @ngInject */
constructor($scope) { constructor($scope) {
$scope.indexPatternTypes = [ $scope.indexPatternTypes = [
{name: 'No pattern', value: undefined}, {name: 'No pattern', value: undefined},
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
} }
.gf-timepicker-dropdown { .gf-timepicker-dropdown {
margin: -5px -10px; margin: -5px -10px 10px 5px;
padding: 10px 20px; padding: 10px 20px;
float: right; float: right;
background-color: @grafanaPanelBackground; background-color: @grafanaPanelBackground;
......
...@@ -19,9 +19,9 @@ module.exports = function(grunt) { ...@@ -19,9 +19,9 @@ 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'
]); ]);
......
...@@ -5,6 +5,7 @@ module.exports = function(config) { ...@@ -5,6 +5,7 @@ module.exports = function(config) {
src: ['app/**/*.html'], src: ['app/**/*.html'],
dest: '<%= genDir %>/app/core/partials.js', dest: '<%= genDir %>/app/core/partials.js',
options: { options: {
prefix: 'public/',
bootstrap: function(module, script) { bootstrap: function(module, script) {
return "define('app/core/partials', ['app/core/core_module'], function(coreModule) { \n" + return "define('app/core/partials', ['app/core/core_module'], function(coreModule) { \n" +
"coreModule.default.run(['$templateCache', function($templateCache) { \n" + "coreModule.default.run(['$templateCache', function($templateCache) { \n" +
......
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