Added a default_route settings and updated to kibana's config.js

This commit is contained in:
Boaz Leskes 2013-12-23 20:16:51 +01:00
parent b00566113d
commit 78bc1fcaee
3 changed files with 74 additions and 49 deletions

View file

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

111
config.js
View file

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

View file

@ -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 %>',
}
]
},