Skip to content

Commit

Permalink
Update saved objects client usage to attributes instead of `_source…
Browse files Browse the repository at this point in the history
…`. Also, fixing an improper "safe" apply usage. (#13223)
  • Loading branch information
chrisronline authored Jul 31, 2017
1 parent d36080b commit 74cd8b1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ uiModules.get('apps/management')
$scope.aceInvalidEditors = _.without($scope.aceInvalidEditors, fieldName);
}

if ($rootScope.$$phase) $scope.$apply();
if (!$rootScope.$$phase) $scope.$apply();
});
};

Expand Down Expand Up @@ -185,7 +185,7 @@ uiModules.get('apps/management')
};

$scope.submit = function () {
const source = _.cloneDeep($scope.obj._source);
const source = _.cloneDeep($scope.obj.attributes);

_.each($scope.fields, function (field) {
let value = field.value;
Expand All @@ -209,7 +209,7 @@ uiModules.get('apps/management')
};

function redirectHandler(action) {
const msg = 'You successfully ' + action + ' the "' + $scope.obj._source.title + '" ' + $scope.title.toLowerCase() + ' object';
const msg = 'You successfully ' + action + ' the "' + $scope.obj.attributes.title + '" ' + $scope.title.toLowerCase() + ' object';

$location.path('/management/kibana/objects').search({
_a: rison.encode({
Expand Down

0 comments on commit 74cd8b1

Please sign in to comment.