Skip to content

Commit

Permalink
Don't execute query when changing data sources (fixes #29)
Browse files Browse the repository at this point in the history
Also: show query results for execution after changing data sources (fixes #774)
  • Loading branch information
Allen Short authored and Marina Samuel committed Nov 5, 2019
1 parent 73fe1e3 commit b8c36b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/app/pages/queries/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h3>
<!-- End of Query Execution Status -->

<!-- tabs and data -->
<div ng-if="showDataset" class="flex-fill p-relative">
<div ng-if="showDataset && !dataSourceChanged" class="flex-fill p-relative">
<div class="d-flex flex-column p-absolute static-position__mobile" style="left: 0; top: 0; right: 0; bottom: 0;">
<div class="p-10" ng-show="showLog">
<p>Log Information:</p>
Expand Down
4 changes: 3 additions & 1 deletion client/app/pages/queries/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ function QueryViewCtrl(
return;
}

$scope.dataSourceChanged = false;
getQueryResult(0, $scope.selectedQueryText);
$scope.lockButton(true);
$scope.cancelling = false;
Expand All @@ -136,6 +137,7 @@ function QueryViewCtrl(
Notifications.getPermissions();
};

$scope.dataSourceChanged = false;
$scope.selectedVisualization = DEFAULT_VISUALIZATION;
$scope.currentUser = currentUser;
$scope.dataSource = {};
Expand Down Expand Up @@ -377,7 +379,7 @@ function QueryViewCtrl(

$scope.dataSource = find($scope.dataSources, ds => ds.id === $scope.query.data_source_id);
getSchema();
$scope.executeQuery();
$scope.dataSourceChanged = true;
};

$scope.setVisualizationTab = (visualization) => {
Expand Down

0 comments on commit b8c36b8

Please sign in to comment.