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

This commit is contained in:
Torkel Ödegaard 2016-02-01 19:00:40 +01:00
parent e737dab5ca
commit 78598df96e
11 changed files with 13 additions and 10 deletions

View File

@ -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,

View File

@ -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;
});

View File

@ -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">

View File

@ -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 {

View File

@ -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,

View File

@ -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);
}

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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" +