feat(adhoc filters): good progress on ad hoc filters and sync from to url, #6038

This commit is contained in:
Torkel Ödegaard
2016-09-20 11:57:43 +02:00
parent cb522d58cd
commit 6e429b8575
14 changed files with 351 additions and 287 deletions

View File

@@ -9,13 +9,14 @@ export class DatasourceVariable implements Variable {
regex: any;
query: string;
options: any;
current: any;
defaults = {
type: 'datasource',
name: '',
hide: 0,
label: '',
current: {text: '', value: ''},
current: {},
regex: '',
options: [],
query: '',
@@ -73,6 +74,10 @@ export class DatasourceVariable implements Variable {
setValueFromUrl(urlValue) {
return this.variableSrv.setOptionFromUrl(this, urlValue);
}
getValueForUrl() {
return this.current.value;
}
}
variableTypes['datasource'] = {