stackdriver: make sure default template query editor state is propagted to parent angular scope

This commit is contained in:
Erik Sundell
2018-10-25 13:30:39 +02:00
parent 637b91ab8d
commit 4f7d3fccb7
3 changed files with 29 additions and 21 deletions

View File

@@ -106,6 +106,11 @@ export class VariableEditorCtrl {
});
};
$scope.onQueryChange = value => {
$scope.current.query = value;
$scope.runQuery();
};
$scope.edit = variable => {
$scope.current = variable;
$scope.currentIsNew = false;
@@ -173,8 +178,9 @@ export class VariableEditorCtrl {
};
$scope.datasourceChanged = async () => {
$scope.currentDatasource = await datasourceSrv.get($scope.current.datasource);
console.log($scope.currentDatasource);
datasourceSrv.get($scope.current.datasource).then(ds => {
$scope.currentDatasource = ds;
});
};
}
}