Commit 9a53779b by Torkel Ödegaard

Default property that marks which datasource is default in config.js is now optional (Fixes #526)

parent 551771c6
...@@ -9,6 +9,7 @@ vNext ...@@ -9,6 +9,7 @@ vNext
- Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506)
- Series names and column name typeahead cache fix (Fixes #522) - Series names and column name typeahead cache fix (Fixes #522)
- Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504) - Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504)
- Default property that marks which datasource is default in config.js is now optional (Fixes #526)
# 1.6.0 (2014-06-16) # 1.6.0 (2014-06-16)
......
...@@ -15,6 +15,9 @@ function (angular, _, config) { ...@@ -15,6 +15,9 @@ function (angular, _, config) {
this.init = function() { this.init = function() {
var defaultDatasource = _.findWhere(_.values(config.datasources), { default: true }); var defaultDatasource = _.findWhere(_.values(config.datasources), { default: true });
if (!defaultDatasource) {
defaultDatasource = config.datasources[_.keys(config.datasources)[0]];
}
this.default = this.datasourceFactory(defaultDatasource); this.default = this.datasourceFactory(defaultDatasource);
}; };
......
...@@ -68,7 +68,7 @@ function (angular, _, kbn) { ...@@ -68,7 +68,7 @@ function (angular, _, kbn) {
} }
else { else {
var template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " + var template = "select [[group]][[group_comma]] [[func]]([[column]]) from [[series]] " +
"where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " + "where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " +
"group by time([[interval]])[[group_comma]] [[group]] order asc"; "group by time([[interval]])[[group_comma]] [[group]] order asc";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment