From 7304ade3a6d59a750475d86446bdb698f2378b5b Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Wed, 8 Oct 2014 15:36:35 -0700 Subject: [PATCH] remove old config file and reference from Grunt task --- Gruntfile.js | 2 ++ src/kibana/config.js | 45 --------------------------------------- tasks/config/copy.js | 14 ++++++------ tasks/config/requirejs.js | 2 +- 4 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 src/kibana/config.js diff --git a/Gruntfile.js b/Gruntfile.js index e462cc521b2a..15a48895bfbb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,8 +8,10 @@ module.exports = function (grunt) { src: __dirname + '/src', // unbuild version of build build: __dirname + '/build', // copy of source, but optimized app: __dirname + '/src/kibana', // source directory for the app + server: __dirname + '/src/server', // source directory for the server target: __dirname + '/target', // location of the compressed build targets buildApp: __dirname + '/build/kibana', // build directory for the app + configFile: __dirname + '/src/server/config/kibana.yml', jrubyVersion: '1.7.14', jrubyPath: __dirname + '/.jruby', diff --git a/src/kibana/config.js b/src/kibana/config.js deleted file mode 100644 index 9dbfb3df69d0..000000000000 --- a/src/kibana/config.js +++ /dev/null @@ -1,45 +0,0 @@ -/** @scratch /configuration/config.js/1 - * == Configuration - * config.js is where you will find the core Kibana configuration. This file contains parameter that - * must be set before kibana is run for the first time. - */ - -/** @scratch /configuration/config.js/2 - * === Parameters - */ -define(function () { - return { - /** @scratch /configuration/config.js/5 - * ==== elasticsearch - * - * The URL to your elasticsearch server. You almost certainly don't - * want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on - * the same host. By default this will attempt to reach ES at the same host you have - * kibana installed on. You probably want to set it to the FQDN of your - * elasticsearch host - */ - // elasticsearch: 'http://' + location.hostname + ':9200', - - /** @scratch /configuration/config.js/5 - * ==== kibana-int - * - * The default ES index to use for storing Kibana specific object - * such as stored dashboards - */ - kibanaIndex: 'kibana4-int', - - /** - * A list of apps that can be loaded by Kibana. The id's need to match the - * directory name in which the app lives, ie. src/kibana/apps/{{id}} - * @type {Array} - */ - apps: [ - { id: 'discover', name: 'Discover' }, - { id: 'visualize', name: 'Visualize' }, - { id: 'dashboard', name: 'Dashboard' }, - { id: 'settings', name: 'Settings' } - ], - - defaultAppId: 'discover' - }; -}); \ No newline at end of file diff --git a/tasks/config/copy.js b/tasks/config/copy.js index 382cc49fd256..ef6a132902e0 100644 --- a/tasks/config/copy.js +++ b/tasks/config/copy.js @@ -12,32 +12,32 @@ module.exports = function (grunt) { server_src: { files: [ { - src: '<%= src %>/server/Gemfile', + src: '<%= server %>/Gemfile', dest: '<%= build %>/kibana/Gemfile' }, { - src: '<%= src %>/server/Gemfile.lock', + src: '<%= server %>/Gemfile.lock', dest: '<%= build %>/kibana/Gemfile.lock' }, { - src: '<%= src %>/server/bin/initialize', + src: '<%= server %>/bin/initialize', dest: '<%= build %>/kibana/bin/initialize' }, { expand: true, - cwd: '<%= src %>/server/config/', + cwd: '<%= server %>/config/', src: '**', dest: '<%= build %>/kibana/config' }, { expand: true, - cwd: '<%= src %>/server/lib/', + cwd: '<%= server %>/lib/', src: '**', dest: '<%= build %>/kibana/lib' }, { expand: true, - cwd: '<%= src %>/server/routes/', + cwd: '<%= server %>/routes/', src: '**', dest: '<%= build %>/kibana/routes' } @@ -55,7 +55,7 @@ module.exports = function (grunt) { }, { expand: true, - cwd: '<%= src %>/server/config/', + cwd: '<%= server %>/config/', src: 'kibana.yml', dest: '<%= build %>/dist/kibana/config/' } diff --git a/tasks/config/requirejs.js b/tasks/config/requirejs.js index 3e2702dae1b8..4c3ea6bb0ca4 100644 --- a/tasks/config/requirejs.js +++ b/tasks/config/requirejs.js @@ -61,7 +61,7 @@ module.exports = function (grunt) { // include each app var main = config.build.options.modules[0]; - var configFile = require('requirejs')(grunt.config.get('app') + '/config.js'); + var configFile = grunt.file.readYAML(grunt.config.get('configFile')); configFile.apps.forEach(function (app) { main.include.push('apps/' + app.id + '/index'); });