Skip to content

Commit

Permalink
Don't execute query when changing data sources (fixes getredash#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Short authored and jezdez committed May 15, 2019
1 parent da69eac commit d47f80f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/app/pages/queries/query.html
Expand Up @@ -220,7 +220,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
3 changes: 2 additions & 1 deletion client/app/pages/queries/view.js
Expand Up @@ -136,6 +136,7 @@ function QueryViewCtrl(
Notifications.getPermissions();
};

$scope.dataSourceChanged = false;
$scope.selectedVisualization = DEFAULT_VISUALIZATION;
$scope.currentUser = currentUser;
$scope.dataSource = {};
Expand Down Expand Up @@ -360,7 +361,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 d47f80f

Please sign in to comment.