-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* New empty MetaEngineCreation component * Added MetaEngineCreation to AppSearchConfigured router * Empty MetaEngineCreationLogic * Add rawName value and setRawName action to MetaEngineCreationLogic * Add indexedEngineNames value and setIndexedEngineNames action to MEtaEngineCreationLogic * Add selectedIndexedEngineNames value and setIndexedEngineNames action to MetaEngineCreationLogic * Add description to MetaEngineCreation * Add name selector to MetaEngineCreationLogic * Added MetaEngineCreationNameInput to MetaEngineCreation * Add fetchIndexedEngineNames listener to MetaEngineCreationLogic * Call fetchIndexedEngineNames when MetaEngineCreation first renders * Add EuiComboBox for selectedEngineNames to MetaEngineCreation * WIP Add meta engine source engine limit warning to MetaEngineCreation * Add submitEngine listener to MetaEngineCreationLogic * Add onEngineCreationSuccess to MetaEngineCreationLogic * Fixing tests for MetaEngineCreationLogic * Fix tests for MetaEngineCreation * Add Create a meta engine button to EnginesOverview * Use DEFAULT_META for fetching indexed engine names in MetaEngineCreationLogic * Copy fixes * Updating POST /api/engines tests * Add noItemsMessage prop to EnginesTable * Add empty prompt to Meta Engines table in EnginesOverview * Apply suggestions from code review Co-authored-by: Constance <[email protected]> * Better form functionality in MetaEngineCreation * Fix errors from github * More MetaEngineCreation coverage * Meta MetaEngineCreationLogic coverage * Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts Co-authored-by: Constance <[email protected]> * Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts Co-authored-by: Constance <[email protected]> * Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/constants.ts Co-authored-by: Constance <[email protected]> Co-authored-by: Constance <[email protected]> Co-authored-by: Byron Hulcher <[email protected]> Co-authored-by: Constance <[email protected]>
- Loading branch information
1 parent
f038f01
commit bdb9052
Showing
16 changed files
with
981 additions
and
30 deletions.
There are no files selected for viewing
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
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
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
119 changes: 119 additions & 0 deletions
119
...prise_search/public/applications/app_search/components/meta_engine_creation/constants.tsx
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,119 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { EuiLink } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
|
||
import { DOCS_PREFIX } from '../../routes'; | ||
|
||
export const DEFAULT_LANGUAGE = 'Universal'; | ||
|
||
export const META_ENGINE_CREATION_TITLE = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.title', | ||
{ | ||
defaultMessage: 'Create a meta engine', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_TITLE = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.title', | ||
{ | ||
defaultMessage: 'Name your meta engine', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_SUBMIT_BUTTON_LABEL = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.submitButton.buttonLabel', | ||
{ | ||
defaultMessage: 'Create meta engine', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_META_ENGINE_DESCRIPTION = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.metaEngineDescription', | ||
{ | ||
defaultMessage: | ||
'Meta engines allow you to combine multiple engines into one searchable engine.', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_DOCUMENTATION_LINK = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.documentationLink', | ||
{ | ||
defaultMessage: 'Read the documentation', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_DOCUMENTATION_DESCRIPTION = ( | ||
<FormattedMessage | ||
id="xpack.enterpriseSearch.appSearch.metaEngineCreation.form.documentationDescription" | ||
defaultMessage="{documentationLink} for information about how to get started." | ||
values={{ | ||
documentationLink: ( | ||
<EuiLink href={`${DOCS_PREFIX}/meta-engines-guide.html`} target="_blank"> | ||
{META_ENGINE_CREATION_FORM_DOCUMENTATION_LINK} | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_ENGINE_NAME_LABEL = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.engineName.label', | ||
{ | ||
defaultMessage: 'Meta engine name', | ||
} | ||
); | ||
|
||
export const ALLOWED_CHARS_NOTE = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.engineName.allowedCharactersHelpText', | ||
{ | ||
defaultMessage: 'Meta engine names can only contain lowercase letters, numbers, and hyphens', | ||
} | ||
); | ||
|
||
export const SANITIZED_NAME_NOTE = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.engineName.sanitizedNameHelpText', | ||
{ | ||
defaultMessage: 'Your meta engine will be named', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_ENGINE_NAME_PLACEHOLDER = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.engineName.placeholder', | ||
{ | ||
defaultMessage: 'i.e., my-meta-engine', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_ENGINE_SOURCE_ENGINES_LABEL = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.sourceEngines.label', | ||
{ | ||
defaultMessage: 'Add source engines to this meta engine', | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_FORM_MAX_SOURCE_ENGINES_WARNING_TITLE = ( | ||
maxEnginesPerMetaEngine: number | ||
) => | ||
i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.form.sourceEngines.maxSourceEnginesWarningTitle', | ||
{ | ||
defaultMessage: 'Meta engines have a limit of {maxEnginesPerMetaEngine} source engines', | ||
values: { maxEnginesPerMetaEngine }, | ||
} | ||
); | ||
|
||
export const META_ENGINE_CREATION_SUCCESS_MESSAGE = i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.metaEngineCreation.successMessage', | ||
{ | ||
defaultMessage: 'Successfully created meta engine.', | ||
} | ||
); |
Oops, something went wrong.