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

[Management] Update saved objects client usage to attributes instead of _source #13223

Merged

Conversation

chrisronline
Copy link
Contributor

@chrisronline chrisronline commented Jul 31, 2017

Fixes #13186

Summary

We recently introduced a saved objects client to replace direct courier usage, but it looks we missed an area that needed to be updated to handle part of the breaking changes.

This PR refactors old usage of _source to updated attributes since this page uses the saved objects client directly.

Also, there seemed to be an improper "safe" apply happening that was introduced awhile ago

Testing

Try editing and saving a saved dashboard within Saved Objects

…`. Also, fixing an improper "safe" apply usage.
Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

LGTM!

@tylersmalley
Copy link
Contributor

Please backport to 5.6 as well.

@@ -152,7 +152,7 @@ uiModules.get('apps/management')
$scope.aceInvalidEditors = _.without($scope.aceInvalidEditors, fieldName);
}

if ($rootScope.$$phase) $scope.$apply();
if (!$rootScope.$$phase) $scope.$apply();
Copy link
Contributor

Choose a reason for hiding this comment

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

😞

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisronline chrisronline merged commit 74cd8b1 into elastic:master Jul 31, 2017
chrisronline added a commit that referenced this pull request Jul 31, 2017
…`. Also, fixing an improper "safe" apply usage. (#13223)
chrisronline added a commit that referenced this pull request Jul 31, 2017
…`. Also, fixing an improper "safe" apply usage. (#13223)
chrisronline added a commit that referenced this pull request Jul 31, 2017
…`. Also, fixing an improper "safe" apply usage. (#13223)
@chrisronline
Copy link
Contributor Author

Backport

6.x: e21c399
6.0: 31aba72
5.6: 98dd4c9

@chrisronline chrisronline deleted the fix/unable_to_save_saved_objects branch August 10, 2017 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants