Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kibana/components/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define(function (require) {

var DocSource = Private(require('components/courier/data_source/doc_source'));
var doc = (new DocSource())
.index(configFile.kibanaIndex)
.index(configFile.kibana_index)
.type('config')
.id(kbnVersion);

Expand Down
8 changes: 4 additions & 4 deletions src/kibana/components/courier/saved_object/saved_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ define(function (require) {

// tell the docSource where to find the doc
docSource
.index(configFile.kibanaIndex)
.index(configFile.kibana_index)
.type(type)
.id(self.id);

Expand Down Expand Up @@ -217,7 +217,7 @@ define(function (require) {
})
.then(function () {
return es.indices.refresh({
index: configFile.kibanaIndex
index: configFile.kibana_index
});
})
.then(function () {
Expand All @@ -242,12 +242,12 @@ define(function (require) {
*/
self.delete = function () {
return es.delete({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: type,
id: this.id
}).then(function () {
return es.indices.refresh({
index: configFile.kibanaIndex
index: configFile.kibana_index
});
});
};
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/components/index_patterns/_get_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define(function (require) {
}

cachedPromise = es.search({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: 'index-pattern',
fields: [],
body: {
Expand All @@ -39,4 +39,4 @@ define(function (require) {

return getIds;
};
});
});
2 changes: 1 addition & 1 deletion src/kibana/components/index_patterns/_index_pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ define(function (require) {
self.init = function () {
// tell the docSource where to find the doc
docSource
.index(configFile.kibanaIndex)
.index(configFile.kibana_index)
.type(type)
.id(self.id);

Expand Down
4 changes: 2 additions & 2 deletions src/kibana/components/index_patterns/_mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ define(function (require) {

if (!skipIndexPatternCache) {
return es.get({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: 'index-pattern',
id: id,
_sourceInclude: ['fields']
Expand Down Expand Up @@ -83,4 +83,4 @@ define(function (require) {

return new Mapper();
};
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(function (require) {
return function (response) {
var fields = {};
_.each(response, function (index, indexName) {
if (indexName === configFile.kibanaIndex) return;
if (indexName === configFile.kibana_index) return;
_.each(index.mappings, function (mappings, typeName) {
_.each(mappings, function (field, name) {
var keys = Object.keys(field.mapping);
Expand Down Expand Up @@ -46,4 +46,4 @@ define(function (require) {
});
};
};
});
});
4 changes: 2 additions & 2 deletions src/kibana/components/index_patterns/index_patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define(function (require) {
self.getIds.clearCache();
patternCache.delete(pattern.id);
return es.delete({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: 'index-pattern',
id: pattern.id
});
Expand All @@ -45,4 +45,4 @@ define(function (require) {
self.fieldFormats = Private(require('components/index_patterns/_field_formats'));
self.IndexPattern = IndexPattern;
});
});
});
6 changes: 3 additions & 3 deletions src/kibana/components/setup/steps/check_for_kibana_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ define(function (require) {
return function checkForKibana() {
var complete = notify.lifecycle('kibana index check');
return es.indices.exists({
index: configFile.kibanaIndex
index: configFile.kibana_index
})
.catch(function (err) {
throw new SetupError('Unable to check for Kibana index "<%= configFile.kibanaIndex %>"', err);
throw new SetupError('Unable to check for Kibana index "<%= configFile.kibana_index %>"', err);
})
.then(complete, complete.failure);
};
};
});
});
10 changes: 5 additions & 5 deletions src/kibana/components/setup/steps/create_kibana_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define(function (require) {
var SetupError = Private(require('components/setup/_setup_error'));

return es.indices.create({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
body: {
settings: {
number_of_shards : 1,
Expand All @@ -15,18 +15,18 @@ define(function (require) {
}
})
.catch(function (err) {
throw new SetupError('Unable to create Kibana index "<%= configFile.kibanaIndex %>"', err);
throw new SetupError('Unable to create Kibana index "<%= configFile.kibana_index %>"', err);
})
.then(function () {
return es.cluster.health({
waitForStatus: 'yellow',
index: configFile.kibanaIndex
index: configFile.kibana_index
})
.catch(function (err) {
throw new SetupError('Waiting for Kibana index "<%= configFile.kibanaIndex %>" to come online failed', err);
throw new SetupError('Waiting for Kibana index "<%= configFile.kibana_index %>" to come online failed', err);
});
})
.then(complete, complete.failure);
};
};
});
});
4 changes: 2 additions & 2 deletions src/kibana/components/validate_query/validate_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ define(function (require) {
}

function useDefaults() {
index = configFile.kibanaIndex;
index = configFile.kibana_index;
type = '__kibanaQueryValidator';
}

Expand Down Expand Up @@ -122,4 +122,4 @@ define(function (require) {
}
};
});
});
});
2 changes: 1 addition & 1 deletion src/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ define(function (require) {
// setup routes
routes
.otherwise({
redirectTo: '/' + configFile.defaultAppId
redirectTo: '/' + configFile.default_app_id
});

// tell the modules util to add it's modules as requirements for kibana
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/plugins/dashboard/services/_saved_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define(function (require) {
function SavedDashboard(id) {
// Gives our SavedDashboard the properties of a SavedObject
courier.SavedObject.call(this, {
// this object will be saved at {{configFile.kibanaIndex}}/dashboard/{{id}}
// this object will be saved at {{configFile.kibana_index}}/dashboard/{{id}}
type: SavedDashboard.type,

// if this is null/undefined then the SavedObject will be assigned the defaults
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/plugins/dashboard/services/saved_dashboards.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define(function (require) {
}
}: { query: {match_all: {}}};
return es.search({
index: config.file.kibanaIndex,
index: config.file.kibana_index,
type: 'dashboard',
body: body,
size: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ define(function (require) {
}
}: { query: {match_all: {}}};
return es.search({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: 'search',
body: body,
size: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ define(function (require) {
return function RefreshKibanaIndexFn(es, configFile) {
return function () {
return es.indices.refresh({
index: configFile.kibanaIndex
index: configFile.kibana_index
});
};
};
});
});
8 changes: 4 additions & 4 deletions src/kibana/plugins/settings/sections/objects/_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ define(function (require) {
$scope.title = inflection.singularize(serviceObj.title);

es.get({
index: config.file.kibanaIndex,
index: config.file.kibana_index,
type: service.type,
id: $routeParams.id
})
Expand Down Expand Up @@ -127,7 +127,7 @@ define(function (require) {
*/
$scope.delete = function () {
es.delete({
index: config.file.kibanaIndex,
index: config.file.kibana_index,
type: service.type,
id: $routeParams.id
})
Expand Down Expand Up @@ -156,7 +156,7 @@ define(function (require) {
});

es.index({
index: config.file.kibanaIndex,
index: config.file.kibana_index,
type: service.type,
id: $routeParams.id,
body: source
Expand All @@ -169,7 +169,7 @@ define(function (require) {

function redirectHandler(action) {
return es.indices.refresh({
index: config.file.kibanaIndex
index: config.file.kibana_index
})
.then(function (resp) {
var msg = 'You successfully ' + action + ' the "' + $scope.obj._source.title + '" ' + $scope.title.toLowerCase() + ' object';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define(function (require) {
}
}: { query: {match_all: {}}};
return es.search({
index: config.file.kibanaIndex,
index: config.file.kibana_index,
type: 'visualization',
body: body,
size: 100,
Expand Down
6 changes: 3 additions & 3 deletions src/kibana/utils/mapping_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define(function () {
* @return {[type]} [description]
*/
var getKnownKibanaTypes = _.once(function () {
var indexName = configFile.kibanaIndex;
var indexName = configFile.kibana_index;
return es.indices.getFieldMapping({
// only concerned with types in this kibana index
index: indexName,
Expand Down Expand Up @@ -82,7 +82,7 @@ define(function () {
};

return es.indices.putMapping({
index: configFile.kibanaIndex,
index: configFile.kibana_index,
type: type,
body: body
}).then(function (resp) {
Expand All @@ -105,4 +105,4 @@ define(function () {
};
};

});
});
6 changes: 3 additions & 3 deletions src/server/config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ elasticsearch: "http://localhost:9200"

# Kibana uses an index in Elasticsearch to store saved searches, visualizations
# and dashboards. It will create a new index if it doesn't already exist.
kibanaIndex: ".kibana"
kibana_index: ".kibana"

# The default application to load.
defaultAppId: "discover"
default_app_id: "discover"

# Time in seconds to wait for responses from the back end or elasticsearch.
# Note this should always be higher than "shard_timeout".
Expand All @@ -26,4 +26,4 @@ shard_timeout: 30000

# Set to false to have a complete disregard for the validity of the SSL
# certificate.
verifySSL: true
verify_ssl: true
2 changes: 1 addition & 1 deletion src/server/routes/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Proxy < Base
config = settings.config
use Rack::ReverseProxy do
reverse_proxy_options timeout: config["request_timeout"]
@global_options[:verify_ssl] = config["verifySSL"].nil? ? true : config["verifySSL"]
@global_options[:verify_ssl] = config["verify_ssl"].nil? ? true : config["verify_ssl"]
reverse_proxy(/^\/elasticsearch(.*)$/, "#{config["elasticsearch"]}$1")
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/directives/validate_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define(function (require) {
});

$provide.constant('configFile', {
kibanaIndex: 'test-index'
kibana_index: 'test-index'
});
});

Expand Down