[Spaces] - Introducing Space Identifier, Forgetting URL Context#21295
Merged
legrego merged 5 commits intoelastic:spaces-phase-1from Jul 27, 2018
Merged
[Spaces] - Introducing Space Identifier, Forgetting URL Context#21295legrego merged 5 commits intoelastic:spaces-phase-1from
legrego merged 5 commits intoelastic:spaces-phase-1from
Conversation
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
kobelb
reviewed
Jul 27, 2018
| async create(type, attributes = {}, options = {}) { | ||
|
|
||
| const spaceId = await this._getSpaceId(); | ||
| const spaceId = this._spaceId; |
| return await this._client.update(type, id, attributes, updateOptions); | ||
| } | ||
|
|
||
| async _getSpaceId() { |
| } | ||
| // Look for `/s/space-url-context` in the base path | ||
| const matchResult = pathToCheck.match(/^\/s\/([a-z0-9\-]+)/); | ||
| const matchResult = pathToCheck.match(/^\/s\/([a-z0-9_\-]+)/); |
Contributor
There was a problem hiding this comment.
Did we mean to add an _ here? I'm not seeing an _ being allowed in the spaceSchema id.
Member
Author
There was a problem hiding this comment.
ah yep, that was a partial change that I didn't finish. thanks!
| }); | ||
| }); | ||
|
|
||
| test('PUT /space should update an exisitng space with the provided ID', async () => { |
Contributor
There was a problem hiding this comment.
nit: existing is misspelled.
| @@ -173,9 +262,11 @@ describe('Spaces API', () => { | |||
| }); | |||
|
|
|||
| test('POST space/{id}/select should respond with the new space location when a baseUrl is provided', async () => { | |||
Contributor
There was a problem hiding this comment.
nit: the name of this test (which this PR didn't change) kind of throws me off, because the baseUrl is being pulled from server.config() but the test description made me think it was being grabbed from the payload itself.
kobelb
approved these changes
Jul 27, 2018
Contributor
💔 Build Failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the end-user perspective, this is a simple rebranding of the URL Context.
Internally, the space identifier is now used to represent both the url path of the space, as well as that space's document id in the kibana index.
This provides the following benefits:
As an added bonus, the Space Description is now optional 🎉