Skip to content

Commit

Permalink
don't autoexecute query on changing datasource
Browse files Browse the repository at this point in the history
fixes #2651
  • Loading branch information
alison985 authored and Allen Short committed Jan 30, 2019
1 parent d5afa18 commit 1b709b4
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 @@ -221,7 +221,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 @@ -118,6 +118,7 @@ function QueryViewCtrl(
return;
}

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

$scope.dataSourceChanged = false;
$scope.selectedTab = DEFAULT_TAB;
$scope.currentUser = currentUser;
$scope.dataSource = {};
Expand Down Expand Up @@ -326,7 +328,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 1b709b4

Please sign in to comment.