mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
commit
3ed1600b90
@ -15,6 +15,7 @@
|
|||||||
* **Cloudwatch**: Correctly obtain IAM roles within ECS container tasks [#7892](https://github.com/grafana/grafana/issues/7892) thx [@gomlgs](https://github.com/gomlgs)
|
* **Cloudwatch**: Correctly obtain IAM roles within ECS container tasks [#7892](https://github.com/grafana/grafana/issues/7892) thx [@gomlgs](https://github.com/gomlgs)
|
||||||
* **Units**: New number format: Scientific notation [#7781](https://github.com/grafana/grafana/issues/7781) thx [@cadnce](https://github.com/cadnce)
|
* **Units**: New number format: Scientific notation [#7781](https://github.com/grafana/grafana/issues/7781) thx [@cadnce](https://github.com/cadnce)
|
||||||
* **Oauth**: Add common type for oauth authorization errors [#6428](https://github.com/grafana/grafana/issues/6428) thx [@amenzhinsky](https://github.com/amenzhinsky)
|
* **Oauth**: Add common type for oauth authorization errors [#6428](https://github.com/grafana/grafana/issues/6428) thx [@amenzhinsky](https://github.com/amenzhinsky)
|
||||||
|
* **Templating**: Data source variable now supports multi value and panel repeats [#7030](https://github.com/grafana/grafana/issues/7030) thx [@mtanda](https://github.com/mtanda)
|
||||||
|
|
||||||
# 4.2.0 (2017-03-22)
|
# 4.2.0 (2017-03-22)
|
||||||
## Minor Enhancements
|
## Minor Enhancements
|
||||||
|
@ -60,14 +60,14 @@ cert_key =
|
|||||||
#################################### Database ############################
|
#################################### Database ############################
|
||||||
[database]
|
[database]
|
||||||
# You can configure the database connection by specifying type, host, name, user and password
|
# You can configure the database connection by specifying type, host, name, user and password
|
||||||
# as seperate properties or as on string using the url propertie.
|
# as separate properties or as on string using the url property.
|
||||||
|
|
||||||
# Either "mysql", "postgres" or "sqlite3", it's your choice
|
# Either "mysql", "postgres" or "sqlite3", it's your choice
|
||||||
type = sqlite3
|
type = sqlite3
|
||||||
host = 127.0.0.1:3306
|
host = 127.0.0.1:3306
|
||||||
name = grafana
|
name = grafana
|
||||||
user = root
|
user = root
|
||||||
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
|
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
|
||||||
password =
|
password =
|
||||||
# Use either URL or the previous fields to configure the database
|
# Use either URL or the previous fields to configure the database
|
||||||
# Example: mysql://user:secret@host:port/database
|
# Example: mysql://user:secret@host:port/database
|
||||||
@ -132,7 +132,7 @@ logging = false
|
|||||||
reporting_enabled = true
|
reporting_enabled = true
|
||||||
|
|
||||||
# Set to false to disable all checks to https://grafana.com
|
# Set to false to disable all checks to https://grafana.com
|
||||||
# for new vesions (grafana itself and plugins), check is used
|
# for new versions (grafana itself and plugins), check is used
|
||||||
# in some UI views to notify that grafana or plugin update exists
|
# in some UI views to notify that grafana or plugin update exists
|
||||||
# This option does not cause any auto updates, nor send any information
|
# This option does not cause any auto updates, nor send any information
|
||||||
# only a GET request to https://grafana.com to get latest versions
|
# only a GET request to https://grafana.com to get latest versions
|
||||||
|
@ -232,7 +232,7 @@ Get all tags of dashboards
|
|||||||
Status Codes:
|
Status Codes:
|
||||||
|
|
||||||
- **query** – Search Query
|
- **query** – Search Query
|
||||||
- **tags** – Tags to use
|
- **tag** – Tag to use
|
||||||
- **starred** – Flag indicating if only starred Dashboards should be returned
|
- **starred** – Flag indicating if only starred Dashboards should be returned
|
||||||
- **tagcloud** - Flag indicating if a tagcloud should be returned
|
- **tagcloud** - Flag indicating if a tagcloud should be returned
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ function (angular, _, coreModule, config) {
|
|||||||
this.datasources = {};
|
this.datasources = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
this.get = function(name) {
|
this.get = function(name, scopedDsVars) {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return this.get(config.defaultDatasource);
|
return this.get(config.defaultDatasource);
|
||||||
}
|
}
|
||||||
|
|
||||||
name = templateSrv.replace(name);
|
name = templateSrv.replace(name, scopedDsVars || {});
|
||||||
|
|
||||||
if (name === 'default') {
|
if (name === 'default') {
|
||||||
return this.get(config.defaultDatasource);
|
return this.get(config.defaultDatasource);
|
||||||
|
@ -92,7 +92,7 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|||||||
|
|
||||||
// load datasource service
|
// load datasource service
|
||||||
this.setTimeQueryStart();
|
this.setTimeQueryStart();
|
||||||
this.datasourceSrv.get(this.panel.datasource)
|
this.datasourceSrv.get(this.panel.datasource, this.panel.scopedVars)
|
||||||
.then(this.updateTimeRange.bind(this))
|
.then(this.updateTimeRange.bind(this))
|
||||||
.then(this.issueQueries.bind(this))
|
.then(this.issueQueries.bind(this))
|
||||||
.then(this.handleQueryResult.bind(this))
|
.then(this.handleQueryResult.bind(this))
|
||||||
|
@ -10,6 +10,8 @@ export class DatasourceVariable implements Variable {
|
|||||||
query: string;
|
query: string;
|
||||||
options: any;
|
options: any;
|
||||||
current: any;
|
current: any;
|
||||||
|
multi: boolean;
|
||||||
|
includeAll: boolean;
|
||||||
refresh: any;
|
refresh: any;
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
@ -21,6 +23,8 @@ export class DatasourceVariable implements Variable {
|
|||||||
regex: '',
|
regex: '',
|
||||||
options: [],
|
options: [],
|
||||||
query: '',
|
query: '',
|
||||||
|
multi: false,
|
||||||
|
includeAll: false,
|
||||||
refresh: 1,
|
refresh: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -71,9 +75,16 @@ export class DatasourceVariable implements Variable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
if (this.includeAll) {
|
||||||
|
this.addAllOption();
|
||||||
|
}
|
||||||
return this.variableSrv.validateVariableSelectionState(this);
|
return this.variableSrv.validateVariableSelectionState(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addAllOption() {
|
||||||
|
this.options.unshift({text: 'All', value: "$__all"});
|
||||||
|
}
|
||||||
|
|
||||||
dependsOn(variable) {
|
dependsOn(variable) {
|
||||||
if (this.regex) {
|
if (this.regex) {
|
||||||
return containsVariable(this.regex, variable.name);
|
return containsVariable(this.regex, variable.name);
|
||||||
@ -86,6 +97,9 @@ export class DatasourceVariable implements Variable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getValueForUrl() {
|
getValueForUrl() {
|
||||||
|
if (this.current.text === 'All') {
|
||||||
|
return 'All';
|
||||||
|
}
|
||||||
return this.current.value;
|
return this.current.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,5 +107,6 @@ export class DatasourceVariable implements Variable {
|
|||||||
variableTypes['datasource'] = {
|
variableTypes['datasource'] = {
|
||||||
name: 'Datasource',
|
name: 'Datasource',
|
||||||
ctor: DatasourceVariable,
|
ctor: DatasourceVariable,
|
||||||
|
supportsMulti: true,
|
||||||
description: 'Enabled you to dynamically switch the datasource for multiple panels',
|
description: 'Enabled you to dynamically switch the datasource for multiple panels',
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user