mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Clean up, and set default in config to false
This commit is contained in:
committed by
Torkel Ödegaard
parent
6f4520254b
commit
2e59587c8e
@@ -13,12 +13,13 @@ function (_, crypto) {
|
||||
* @type {Object}
|
||||
*/
|
||||
var defaults = {
|
||||
elasticsearch : "http://"+window.location.hostname+":9200",
|
||||
graphiteUrl : "http://"+window.location.hostname+":8080",
|
||||
panel_names : [],
|
||||
default_route : '/dashboard/file/default.json',
|
||||
grafana_index : 'grafana-dash',
|
||||
timezoneOffset : null,
|
||||
elasticsearch : "http://"+window.location.hostname+":9200",
|
||||
graphiteUrl : "http://"+window.location.hostname+":8080",
|
||||
panel_names : [],
|
||||
default_route : '/dashboard/file/default.json',
|
||||
grafana_index : 'grafana-dash',
|
||||
elasticsearch_all_disabled : false,
|
||||
timezoneOffset : null,
|
||||
};
|
||||
|
||||
// This initializes a new hash on purpose, to avoid adding parameters to
|
||||
|
||||
@@ -387,13 +387,13 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
|
||||
|
||||
this.elasticsearch_list = function(query,count) {
|
||||
var request = ejs.Request().indices(config.grafana_index).types('dashboard');
|
||||
var q = null;
|
||||
if(config.elasticsearch_all_disabled==true){
|
||||
q = ('title:' + (query || '*'))
|
||||
}else{
|
||||
q = (query || '*')
|
||||
}
|
||||
return request.query(
|
||||
var q = null;
|
||||
if(config.elasticsearch_all_disabled){
|
||||
q = ('title:' + (query || '*'))
|
||||
}else{
|
||||
q = (query || '*')
|
||||
}
|
||||
ejs.QueryStringQuery(q)
|
||||
).size(count).doSearch(
|
||||
// Success
|
||||
|
||||
@@ -15,6 +15,10 @@ function (Settings) {
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
|
||||
/**
|
||||
If you have _all query disabled on Elastic search then this must be set to true
|
||||
https://github.com/torkelo/grafana/issues/24
|
||||
**/
|
||||
elasticsearch_all_disabled: false,
|
||||
/**
|
||||
* graphite-web url:
|
||||
|
||||
Reference in New Issue
Block a user