From 73288da00d310a6db95fd8bf3d8ff32c06325b72 Mon Sep 17 00:00:00 2001 From: Chris Roberson Date: Mon, 31 Jul 2017 13:15:37 -0400 Subject: [PATCH] Update saved objects client usage to `attributes` instead of `_source`. Also, fixing an improper "safe" apply usage. --- .../kibana/public/management/sections/objects/_view.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_plugins/kibana/public/management/sections/objects/_view.js b/src/core_plugins/kibana/public/management/sections/objects/_view.js index abaa5db10f1bb..e7082cfea32bf 100644 --- a/src/core_plugins/kibana/public/management/sections/objects/_view.js +++ b/src/core_plugins/kibana/public/management/sections/objects/_view.js @@ -152,7 +152,7 @@ uiModules.get('apps/management') $scope.aceInvalidEditors = _.without($scope.aceInvalidEditors, fieldName); } - if ($rootScope.$$phase) $scope.$apply(); + if (!$rootScope.$$phase) $scope.$apply(); }); }; @@ -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; @@ -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({