From e8c11251dea1adb961e933735507316922dea3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 9 Jun 2014 16:59:53 +0200 Subject: [PATCH 1/2] fix for build step that replaces @grafanaVersion@ with correct version string --- src/app/components/require.config.js | 2 +- tasks/build_task.js | 35 +++++++++------------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/app/components/require.config.js b/src/app/components/require.config.js index 37b91735e35..2b554e8a04f 100644 --- a/src/app/components/require.config.js +++ b/src/app/components/require.config.js @@ -3,7 +3,7 @@ */ require.config({ baseUrl: 'app', - // urlArgs: 'r=@REV@', + paths: { config: ['../config', '../config.sample'], settings: 'components/settings', diff --git a/tasks/build_task.js b/tasks/build_task.js index afee147d16e..3a96c5bf985 100644 --- a/tasks/build_task.js +++ b/tasks/build_task.js @@ -11,40 +11,27 @@ module.exports = function(grunt) { 'htmlmin:build', 'ngtemplates', 'cssmin:build', + 'build:grafanaVersion', 'ngmin:build', 'requirejs:build', 'concat:js', 'filerev', 'usemin', 'clean:temp', - 'build:write_revision', 'uglify:dest' ]); - // run a string replacement on the require config, using the latest revision number as the cache buster - grunt.registerTask('build:write_revision', function() { - grunt.event.once('git-describe', function (desc) { - grunt.config('string-replace.config', { - files: { - '<%= destDir %>/app/components/require.config.js': '<%= destDir %>/app/components/require.config.js', - '<%= destDir %>/app/app.js': '<%= destDir %>/app/app.js' - }, - options: { - replacements: [ - { - pattern: /@REV@/g, - replacement: desc.object - }, - { - pattern: /@grafanaVersion@/g, - replacement: '<%= pkg.version %>' - } - ] - } - }); - grunt.task.run('string-replace:config'); + grunt.registerTask('build:grafanaVersion', function() { + grunt.config('string-replace.config', { + files: { + '<%= tempDir %>/app/app.js': '<%= tempDir %>/app/app.js' + }, + options: { + replacements: [{ pattern: /@grafanaVersion@/g, replacement: '<%= pkg.version %>' }] + } }); - grunt.task.run('git-describe'); + grunt.task.run('string-replace:config'); }); + }; From 77bfaa4245adde494e2c400fd814d888b428a9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 Jun 2014 08:07:18 +0200 Subject: [PATCH 2/2] fixed default dashboard json editable flag, accidentally set to to false --- src/app/dashboards/default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dashboards/default.json b/src/app/dashboards/default.json index e0d048ad8bb..c0e58b154e0 100644 --- a/src/app/dashboards/default.json +++ b/src/app/dashboards/default.json @@ -90,7 +90,7 @@ "notice": false } ], - "editable": false, + "editable": true, "failover": false, "panel_hints": true, "style": "dark",