mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Remove reference to query result when changing data source
This commit is contained in:
parent
e37fa7e5a0
commit
cea1a73ad6
@ -238,6 +238,19 @@
|
||||
$scope.dirty = (newHash !== pristineHash);
|
||||
});
|
||||
|
||||
$scope.updateDataSource = function() {
|
||||
$scope.query.latest_query_data = null;
|
||||
$scope.query.latest_query_data_id = null;
|
||||
Query.save({
|
||||
'id': $scope.query.id,
|
||||
'data_source_id': $scope.query.data_source_id,
|
||||
'latest_query_data_id': null
|
||||
});
|
||||
|
||||
$scope.executeQuery();
|
||||
|
||||
};
|
||||
|
||||
$scope.executeQuery = function () {
|
||||
$scope.queryResult = $scope.query.getQueryResult(0);
|
||||
$scope.lockButton(true);
|
||||
|
@ -309,7 +309,6 @@
|
||||
ttl = this.ttl;
|
||||
}
|
||||
|
||||
|
||||
var queryResult = null;
|
||||
if (this.latest_query_data && ttl != 0) {
|
||||
queryResult = new QueryResult({'query_result': this.latest_query_data});
|
||||
|
@ -115,7 +115,7 @@
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-hdd"></span>
|
||||
<span class="text-muted">Data Source</span>
|
||||
<select ng-disabled="!isOwner" ng-model="query.data_source_id" ng-options="ds.id as ds.name for ds in dataSources"></select>
|
||||
<select ng-disabled="!isOwner" ng-model="query.data_source_id" ng-change="updateDataSource()" ng-options="ds.id as ds.name for ds in dataSources"></select>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
Loading…
Reference in New Issue
Block a user