Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added publish notification to query rename #3998

Merged
merged 2 commits into from
Jul 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/app/pages/queries/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ function QueryViewCtrl(
Events.record('edit_name', 'query', $scope.query.id);
if ($scope.query.is_draft && clientConfig.autoPublishNamedQueries && $scope.query.name !== 'New Query') {
$scope.query.is_draft = false;
notification.success('Query published');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will result in multiple notifications + might show a success notification while the query save actually fails.

How about we update the save notification to include a message about publishing the query? We can do a check in the saveQuery function to see if the publish state changed and update the message accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 997182b 👍

Screen Shot 2019-07-20 at 22 23 13

}

$scope.saveQuery(undefined, { name: $scope.query.name, is_draft: $scope.query.is_draft });
Expand Down