mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(templating): fix to datasource variable, was not updated on dashboard load, added unit test for case as well
This commit is contained in:
@@ -10,6 +10,7 @@ export class DatasourceVariable implements Variable {
|
||||
query: string;
|
||||
options: any;
|
||||
current: any;
|
||||
refresh: any;
|
||||
|
||||
defaults = {
|
||||
type: 'datasource',
|
||||
@@ -20,11 +21,13 @@ export class DatasourceVariable implements Variable {
|
||||
regex: '',
|
||||
options: [],
|
||||
query: '',
|
||||
refresh: 1,
|
||||
};
|
||||
|
||||
/** @ngInject **/
|
||||
constructor(private model, private datasourceSrv, private variableSrv) {
|
||||
assignModelProperties(this, model, this.defaults);
|
||||
this.refresh = 1;
|
||||
}
|
||||
|
||||
getModel() {
|
||||
|
||||
Reference in New Issue
Block a user