Преглед изворни кода

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

Torkel Ödegaard пре 10 година
родитељ
комит
78598df96e

+ 1 - 1
public/app/core/services/alert_srv.js

@@ -72,7 +72,7 @@ function (angular, _, coreModule) {
       scope.noText = payload.noText || "Cancel";
 
       var confirmModal = $modal({
-        template: './app/partials/confirm_modal.html',
+        template: 'public/app/partials/confirm_modal.html',
         persist: false,
         modalClass: 'modal-no-header confirm-modal',
         show: false,

+ 1 - 1
public/app/features/annotations/editor_ctrl.js

@@ -31,7 +31,7 @@ function (angular, _, $) {
     };
 
     $scope.datasourceChanged = function() {
-      datasourceSrv.get($scope.currentAnnotation.datasource).then(function(ds) {
+      return datasourceSrv.get($scope.currentAnnotation.datasource).then(function(ds) {
         $scope.currentDatasource = ds;
         $scope.currentAnnotation.datasource = ds.name;
       });

+ 1 - 1
public/app/features/annotations/partials/editor.html

@@ -33,9 +33,9 @@
 			<i class="fa fa-remove"></i>
 		</button>
 	</div>
-
 	<div class="gf-box-body">
 
+
 		<div class="editor-row row" ng-if="mode === 'list'">
 			<div class="span6">
 				<div ng-if="annotations.length === 0">

+ 1 - 1
public/app/features/annotations/query_editor.ts

@@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) {
       annotation: "=",
       datasource: "="
     },
-    watchPath: "datasource.type",
+    watchPath: "annotation.datasource",
     directive: scope => {
       return System.import(scope.datasource.meta.module).then(function(dsModule) {
         return {

+ 1 - 1
public/app/features/dashboard/keybindings.js

@@ -21,7 +21,7 @@ function(angular, $) {
 
         helpModalScope = $rootScope.$new();
         var helpModal = $modal({
-          template: './app/partials/help_modal.html',
+          template: 'public/app/partials/help_modal.html',
           persist: false,
           show: false,
           scope: helpModalScope,

+ 1 - 0
public/app/features/panel/panel.ts

@@ -6,6 +6,7 @@ import {PanelCtrl} from './panel_ctrl';
 import {MetricsPanelCtrl} from './metrics_panel_ctrl';
 
 export class DefaultPanelCtrl extends PanelCtrl {
+  /** @ngInject */
   constructor($scope, $injector) {
     super($scope, $injector);
   }

+ 1 - 1
public/app/features/panel/panel_loader.ts

@@ -24,7 +24,7 @@ function panelLoader($compile, dynamicDirectiveSrv, $http, $q, $injector, $templ
         }
         var cached = $templateCache.get(directive.templateUrl);
         if (cached) {
-          return cached;
+          return $q.when(cached);
         }
         return $http.get(directive.templateUrl).then(res => {
           return res.data;

+ 1 - 0
public/app/plugins/datasource/elasticsearch/edit_view.ts

@@ -5,6 +5,7 @@ import _ from 'lodash';
 
 export class EditViewCtrl {
 
+  /** @ngInject */
   constructor($scope) {
     $scope.indexPatternTypes = [
       {name: 'No pattern',  value: undefined},

+ 1 - 1
public/less/timepicker.less

@@ -7,7 +7,7 @@
 }
 
 .gf-timepicker-dropdown {
-  margin: -5px -10px;
+  margin: -5px -10px 10px 5px;
   padding: 10px 20px;
   float: right;
   background-color: @grafanaPanelBackground;

+ 3 - 3
tasks/build_task.js

@@ -19,9 +19,9 @@ module.exports = function(grunt) {
     'ngAnnotate:build',
     'systemjs:build',
     'concat:js',
-    // 'filerev',
-    // 'remapFilerev',
-    // 'usemin',
+    'filerev',
+    'remapFilerev',
+    'usemin',
     'uglify:genDir'
   ]);
 

+ 1 - 0
tasks/options/ngtemplates.js

@@ -5,6 +5,7 @@ module.exports = function(config) {
       src:  ['app/**/*.html'],
       dest: '<%= genDir %>/app/core/partials.js',
       options: {
+        prefix: 'public/',
         bootstrap: function(module, script) {
           return "define('app/core/partials', ['app/core/core_module'], function(coreModule) { \n" +
             "coreModule.default.run(['$templateCache', function($templateCache) { \n" +