diff --git a/Gruntfile.js b/Gruntfile.js index e41ea0948cc5..1918013f0806 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,6 +13,10 @@ module.exports = function (grunt) { dev: '"'+ (grunt.option('es_port') || 9200) +'"', dist: "(window.location.port !== '' ? ':'+window.location.port : '')" }, + defaultRoute: { + dev: '/dashboard/file/marvel.overview.json', + dist: '/dashboard/elasticsearch/Marvel%20-%20Overview' + }, kibanaPort: grunt.option('port') || 5601, kibanaHost: 'localhost' diff --git a/config.js b/config.js index 6b746c940d37..8757271916d3 100644 --- a/config.js +++ b/config.js @@ -1,56 +1,69 @@ -/** - * These is the app's configuration, If you need to configure - * the default dashboard, please see dashboards/default +/** @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. */ define(['settings'], -function (Settings) { + function (Settings) { + "use strict"; - - return new Settings({ - - /** - * URL to your elasticsearch server. You almost certainly don't - * want 'http://localhost:9200' here. Even if Kibana and ES are on - * the same host - * - * By default this will attempt to reach ES at the same host you have - * elasticsearch installed on. You probably want to set it to the FQDN of your - * elasticsearch host - * @type {String} + /** @scratch /configuration/config.js/2 + * === Parameters */ - elasticsearch: "http://"+window.location.hostname+":"+@@port, + return new Settings({ - /** - * The default ES index to use for storing Kibana specific object - * such as stored dashboards - * @type {String} - */ - kibana_index: ".marvel-kibana", + /** @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://"+window.location.hostname+":"+@@port, - /** - * Panel modules available. Panels will only be loaded when they are defined in the - * dashboard, but this list is used in the "add panel" interface. - * @type {Array} - */ - panel_names: [ - 'histogram', - 'map', - 'pie', - 'table', - 'filtering', - 'timepicker', - 'text', - 'fields', - 'hits', - 'dashcontrol', - 'column', - 'derivequeries', - 'trends', - 'bettermap', - 'query', - 'terms', - 'sparklines', - 'marvel.stats_table' - ] + /** @scratch /configuration/config.js/5 + * ==== default_route + * + * This is the default landing page when you don't specify a dashboard to load. You can specify + * files, scripts or saved dashboards here. For example, if you had saved a dashboard called + * `WebLogs' to elasticsearch you might use: + * + * +default_route: '/dashboard/elasticsearch/WebLogs',+ + */ + default_route : '@@default_route', + + /** @scratch /configuration/config.js/5 + * ==== kibana-int + * + * The default ES index to use for storing Kibana specific object + * such as stored dashboards + */ + kibana_index: ".marvel-kibana", + + /** @scratch /configuration/config.js/5 + * ==== panel_name + * + * An array of panel modules available. Panels will only be loaded when they are defined in the + * dashboard, but this list is used in the "add panel" interface. + */ + panel_names: [ + 'histogram', + 'map', + 'pie', + 'table', + 'filtering', + 'timepicker', + 'text', + 'hits', + 'column', + 'trends', + 'bettermap', + 'query', + 'terms', + 'sparklines', + 'marvel.stats_table' + ] + }); }); -}); diff --git a/tasks/options/replace.js b/tasks/options/replace.js index 2016993ddaa3..ef1e90416eb0 100644 --- a/tasks/options/replace.js +++ b/tasks/options/replace.js @@ -7,6 +7,10 @@ module.exports = function (config) { { match: 'port', replacement: '<%= esPort.dev %>', + }, + { + match: 'default_route', + replacement: '<%= defaultRoute.dev %>', } ] }, @@ -20,6 +24,10 @@ module.exports = function (config) { { match: 'port', replacement: '<%= esPort.dist %>', + }, + { + match: 'default_route', + replacement: '<%= defaultRoute.dist %>', } ] },