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

Adds an API for managing saved objects #11632

Merged
merged 27 commits into from
May 23, 2017
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b250ad9
Adds saved object API
May 15, 2017
621fd48
Fixes typo
May 15, 2017
197a5e4
Remove kibana from saved object API path
May 15, 2017
005b029
Nests document in doc element for ES
May 15, 2017
8b0c32d
Resolves tests for update API
May 15, 2017
f6dd705
Prevent leaking of ES query to API
May 15, 2017
af59a5c
Adds version to saved objects API
May 16, 2017
a8e3279
Return version for searches
May 16, 2017
915c7df
Removes ability to specify id on object creation
May 16, 2017
6c0cfb6
Adds version to update response
May 16, 2017
1835163
Create uses ES index action
May 16, 2017
a2d9877
Allow per_page of 0 for total
May 16, 2017
cbbeff7
Cleans up SavedObjectClient.find and uses camelCases
May 16, 2017
986a73a
Underscores private variables
May 16, 2017
b916a7a
Removes request dependency on SavedObjectClient
May 16, 2017
5fa37cc
Allows for replacement of Promise library for Ng
May 16, 2017
280003d
Use ES source filtering
May 17, 2017
110628e
Seperate attributes
May 18, 2017
6148eac
search_fields should be snake case
May 18, 2017
9eb2efc
$http Response returns data attribute
May 22, 2017
639feb9
Embed object array as saved_objects instead of data
May 22, 2017
bfadd34
Review feedback
May 22, 2017
ef193a2
Removes delete boolean response
May 22, 2017
a397738
Merge remote-tracking branch 'upstream/master' into saved-objects-api
May 22, 2017
d44aae1
Renames data attribute to body
May 23, 2017
5a152da
Merge remote-tracking branch 'upstream/master' into saved-objects-api
May 23, 2017
4454f85
Restores savedDashboardRegister
May 23, 2017
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
Prev Previous commit
Next Next commit
Removes delete boolean response
Signed-off-by: Tyler Smalley <[email protected]>
  • Loading branch information
Tyler Smalley committed May 22, 2017
commit ef193a2f26328e73ad74c9ebe46aa821dd713c9c
Original file line number Diff line number Diff line change
@@ -85,13 +85,6 @@ describe('SavedObjectsClient', () => {
});

describe('#delete', () => {
it('returns based on ES success', async () => {
callAdminCluster.returns(Promise.resolve({ result: 'deleted' }));
const response = await savedObjectsClient.delete('index-pattern', 'logstash-*');

expect(response).to.be(true);
});

it('throws notFound when ES is unable to find the document', (done) => {
callAdminCluster.returns(Promise.resolve({ found: false }));

2 changes: 0 additions & 2 deletions src/server/saved_objects/client/saved_objects_client.js
Original file line number Diff line number Diff line change
@@ -36,8 +36,6 @@ export class SavedObjectsClient {
if (get(response, 'found') === false) {
throw Boom.notFound();
}

return get(response, 'result') === 'deleted';
}

async find(options = {}) {