-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Workplace Search] Migrate Sources Schema tree #84847
Merged
scottybollinger
merged 15 commits into
elastic:master
from
scottybollinger:scottybollinger/source-schema
Dec 3, 2020
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0a72e8d
Initial copy/paste of component tree
scottybollinger 6370b52
Remove local flash messages from component
scottybollinger 0552498
Update paths
scottybollinger 3f19dd5
Add types and constants
scottybollinger 2ba975d
Update paths
scottybollinger 2f8bba1
Replace local flash message logic with gobal
scottybollinger c0649ae
Update with newly added types
scottybollinger cf80988
Update server routes
scottybollinger 8d5279f
Replace Rails http with kibana http
scottybollinger 9364af3
Set percentage to 0 when updating
scottybollinger 1b05ab1
Fix route paths
scottybollinger 67fb7b1
Fix server route validation
scottybollinger d3af644
Add i18n
scottybollinger 43fd6ab
Make sure i18n key is unique
scottybollinger c54a132
Lint
scottybollinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
x-pack/plugins/enterprise_search/public/applications/shared/constants/operations.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export const ADD = 'add'; | ||
export const UPDATE = 'update'; | ||
export const REMOVE = 'remove'; |
This file contains 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
This file contains 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
105 changes: 105 additions & 0 deletions
105
...public/applications/workplace_search/views/content_sources/components/schema/constants.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const SCHEMA_ERRORS_HEADING = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.errors.heading', | ||
{ | ||
defaultMessage: 'Schema Change Errors', | ||
} | ||
); | ||
|
||
export const SCHEMA_ERRORS_TABLE_FIELD_NAME_HEADER = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.errors.header.fieldName', | ||
{ | ||
defaultMessage: 'Field Name', | ||
} | ||
); | ||
|
||
export const SCHEMA_ERRORS_TABLE_DATA_TYPE_HEADER = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.errors.header.dataType', | ||
{ | ||
defaultMessage: 'Data Type', | ||
} | ||
); | ||
|
||
export const SCHEMA_FIELD_ERRORS_ERROR_MESSAGE = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.errors.message', | ||
{ | ||
defaultMessage: 'Oops, we were not able to find any errors for this Schema.', | ||
} | ||
); | ||
|
||
export const SCHEMA_FIELD_ADDED_MESSAGE = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.fieldAdded.message', | ||
{ | ||
defaultMessage: 'New field added.', | ||
} | ||
); | ||
|
||
export const SCHEMA_UPDATED_MESSAGE = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.updated.message', | ||
{ | ||
defaultMessage: 'Schema updated.', | ||
} | ||
); | ||
|
||
export const SCHEMA_ADD_FIELD_BUTTON = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.addField.button', | ||
{ | ||
defaultMessage: 'Add field', | ||
} | ||
); | ||
|
||
export const SCHEMA_MANAGE_SCHEMA_TITLE = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.manage.title', | ||
{ | ||
defaultMessage: 'Manage source schema', | ||
} | ||
); | ||
|
||
export const SCHEMA_MANAGE_SCHEMA_DESCRIPTION = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.manage.description', | ||
{ | ||
defaultMessage: 'Add new fields or change the types of existing ones', | ||
} | ||
); | ||
|
||
export const SCHEMA_FILTER_PLACEHOLDER = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.filter.placeholder', | ||
{ | ||
defaultMessage: 'Filter schema fields...', | ||
} | ||
); | ||
|
||
export const SCHEMA_UPDATING = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.updating', | ||
{ | ||
defaultMessage: 'Updating schema...', | ||
} | ||
); | ||
|
||
export const SCHEMA_SAVE_BUTTON = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.save.button', | ||
{ | ||
defaultMessage: 'Save schema', | ||
} | ||
); | ||
|
||
export const SCHEMA_EMPTY_SCHEMA_TITLE = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.empty.title', | ||
{ | ||
defaultMessage: 'Content source does not have a schema', | ||
} | ||
); | ||
|
||
export const SCHEMA_EMPTY_SCHEMA_DESCRIPTION = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSource.schema.empty.description', | ||
{ | ||
defaultMessage: | ||
'A schema is created for you once you index some documents. Click below to create schema fields in advance.', | ||
} | ||
); |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove
T
in the type name?If yes, feel free to merge and fix in later PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Will address this in a follow-up PR.