mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Enterprise Search] Search Application: Reword Safe search api to Search api (#160147)
## Summary
Based on the
[discussion](https://elastic.slack.com/archives/C02U50QNEAG/p1687302497582719),
rewording `Safe Search API` to `Search API`
### Screen Shot
<img width="1436" alt="Screenshot 2023-06-21 at 10 30 40 AM 1"
src="7302d00e
-9730-479f-9f9f-52d2083d6a1f">
This commit is contained in:
parent
3efedc815a
commit
8a5f0015a9
5 changed files with 46 additions and 46 deletions
|
@ -36,9 +36,9 @@ const pageTitle = i18n.translate(
|
|||
}
|
||||
);
|
||||
const SAFE_SEARCH_API_TAB_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplications.connect.safeSearchAPITabTitle',
|
||||
'xpack.enterpriseSearch.content.searchApplications.connect.searchAPITabTitle',
|
||||
{
|
||||
defaultMessage: 'Safe Search API',
|
||||
defaultMessage: 'Search API',
|
||||
}
|
||||
);
|
||||
const DOCUMENTATION_TAB_TITLE = i18n.translate(
|
||||
|
@ -50,7 +50,7 @@ const DOCUMENTATION_TAB_TITLE = i18n.translate(
|
|||
const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs);
|
||||
const getTabBreadCrumb = (tabId: string) => {
|
||||
switch (tabId) {
|
||||
case SearchApplicationConnectTabs.SAFESEARCHAPI:
|
||||
case SearchApplicationConnectTabs.SEARCHAPI:
|
||||
return SAFE_SEARCH_API_TAB_TITLE;
|
||||
case SearchApplicationConnectTabs.DOCUMENTATION:
|
||||
return DOCUMENTATION_TAB_TITLE;
|
||||
|
@ -61,7 +61,7 @@ const getTabBreadCrumb = (tabId: string) => {
|
|||
|
||||
export const EngineConnect: React.FC = () => {
|
||||
const { engineName, isLoadingEngine, hasSchemaConflicts } = useValues(EngineViewLogic);
|
||||
const { connectTabId = SearchApplicationConnectTabs.SAFESEARCHAPI } = useParams<{
|
||||
const { connectTabId = SearchApplicationConnectTabs.SEARCHAPI } = useParams<{
|
||||
connectTabId?: string;
|
||||
}>();
|
||||
|
||||
|
@ -106,9 +106,9 @@ export const EngineConnect: React.FC = () => {
|
|||
rightSideItems: [],
|
||||
tabs: [
|
||||
{
|
||||
isSelected: connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI,
|
||||
isSelected: connectTabId === SearchApplicationConnectTabs.SEARCHAPI,
|
||||
label: SAFE_SEARCH_API_TAB_TITLE,
|
||||
onClick: onTabClick(SearchApplicationConnectTabs.SAFESEARCHAPI),
|
||||
onClick: onTabClick(SearchApplicationConnectTabs.SEARCHAPI),
|
||||
},
|
||||
{
|
||||
isSelected: connectTabId === SearchApplicationConnectTabs.DOCUMENTATION,
|
||||
|
@ -120,7 +120,7 @@ export const EngineConnect: React.FC = () => {
|
|||
engineName={engineName}
|
||||
hasSchemaConflicts={hasSchemaConflicts}
|
||||
>
|
||||
{connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI && <SearchApplicationAPI />}
|
||||
{connectTabId === SearchApplicationConnectTabs.SEARCHAPI && <SearchApplicationAPI />}
|
||||
{connectTabId === SearchApplicationConnectTabs.DOCUMENTATION && (
|
||||
<SearchApplicationDocumentation />
|
||||
)}
|
||||
|
|
|
@ -52,13 +52,13 @@ export const SearchApplicationAPI = () => {
|
|||
<EuiText>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.description"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.description"
|
||||
defaultMessage="Your search application uses a {searchTemplateDocLink} to control the types of queries it accepts. Run the following command to view your current search template:"
|
||||
values={{
|
||||
searchTemplateDocLink: (
|
||||
<EuiLink href={docLinks.searchTemplates}>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
|
||||
defaultMessage="search template"
|
||||
/>
|
||||
</EuiLink>
|
||||
|
@ -80,13 +80,13 @@ export const SearchApplicationAPI = () => {
|
|||
<EuiText>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.warning"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.warning"
|
||||
defaultMessage="We provide a basic, default search template to get started, but you'll probably want to update it for your use case. Use the examples in our {searchTemplateExampleDoc} for inspiration."
|
||||
values={{
|
||||
searchTemplateExampleDoc: (
|
||||
<EuiLink href={docLinks.searchApplicationsTemplates}>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
|
||||
defaultMessage="documentation"
|
||||
/>
|
||||
</EuiLink>
|
||||
|
@ -98,7 +98,7 @@ export const SearchApplicationAPI = () => {
|
|||
</>
|
||||
),
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.title',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.title',
|
||||
{
|
||||
defaultMessage: 'Set up your search template',
|
||||
}
|
||||
|
@ -110,13 +110,13 @@ export const SearchApplicationAPI = () => {
|
|||
<EuiText>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning"
|
||||
defaultMessage="This {apiKeyDocumentation} will only be able to access your Safe Search endpoint."
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning"
|
||||
defaultMessage="This {apiKeyDocumentation} will only be able to access your Search endpoint."
|
||||
values={{
|
||||
apiKeyDocumentation: (
|
||||
<EuiLink href={docLinks.apiKeys}>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning.documentationLink"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning.documentationLink"
|
||||
defaultMessage="API key"
|
||||
/>
|
||||
</EuiLink>
|
||||
|
@ -132,10 +132,10 @@ export const SearchApplicationAPI = () => {
|
|||
iconSide="left"
|
||||
iconType="plusInCircleFilled"
|
||||
onClick={openGenerateModal}
|
||||
data-telemetry-id="entSearchApplications-safeSearchApi-step2-createApiKeyButton"
|
||||
data-telemetry-id="entSearchApplications-searchApi-step2-createApiKeyButton"
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.createAPIKeyButton',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.createAPIKeyButton',
|
||||
{
|
||||
defaultMessage: 'Create API Key',
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ export const SearchApplicationAPI = () => {
|
|||
<EuiButton
|
||||
iconSide="left"
|
||||
iconType="popout"
|
||||
data-telemetry-id="entSearchApplications-safeSearchApi-step2-viewKeysButton"
|
||||
data-telemetry-id="entSearchApplications-searchApi-step2-viewKeysButton"
|
||||
onClick={() =>
|
||||
KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', {
|
||||
shouldNotCreateHref: true,
|
||||
|
@ -154,7 +154,7 @@ export const SearchApplicationAPI = () => {
|
|||
}
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.viewKeysButton',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.viewKeysButton',
|
||||
{
|
||||
defaultMessage: 'View Keys',
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export const SearchApplicationAPI = () => {
|
|||
</>
|
||||
),
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.title',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.title',
|
||||
{
|
||||
defaultMessage: 'Generate and save API key',
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ export const SearchApplicationAPI = () => {
|
|||
<EuiText>
|
||||
<p>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step3.copyEndpointDescription',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step3.copyEndpointDescription',
|
||||
{
|
||||
defaultMessage: "Here's the URL for your endpoint:",
|
||||
}
|
||||
|
@ -197,16 +197,16 @@ export const SearchApplicationAPI = () => {
|
|||
</>
|
||||
),
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step3.title',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step3.title',
|
||||
{
|
||||
defaultMessage: 'Copy your Safe Search endpoint',
|
||||
defaultMessage: 'Copy your Search endpoint',
|
||||
}
|
||||
),
|
||||
},
|
||||
{
|
||||
children: <EngineApiIntegrationStage />,
|
||||
title: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step4.title',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.step4.title',
|
||||
{
|
||||
defaultMessage: 'Learn how to call your endpoint',
|
||||
}
|
||||
|
@ -226,25 +226,25 @@ export const SearchApplicationAPI = () => {
|
|||
iconType="iInCircle"
|
||||
title={
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.title"
|
||||
defaultMessage="What is Safe Search API?"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.title"
|
||||
defaultMessage="What is Search API?"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body"
|
||||
defaultMessage="The {safeSearchDocumentation} allows you to create a secure, public-facing search endpoint for your search application. This endpoint only accepts queries that match the parameters defined in your {searchTemplateDocumenation}."
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body"
|
||||
defaultMessage="The {searchApiDocumentation} allows you to create a secure, public-facing search endpoint for your search application. This endpoint only accepts queries that match the parameters defined in your {searchTemplateDocumenation}."
|
||||
values={{
|
||||
safeSearchDocumentation: (
|
||||
searchApiDocumentation: (
|
||||
<EuiLink
|
||||
data-test-subj="safe-search-documentation-link"
|
||||
href="#" // replace with safe search api doc link
|
||||
data-telemetry-id="entSearchApplications-safeSearchApi-documentation-viewDocumentaion"
|
||||
data-test-subj="search-documentation-link"
|
||||
href="#" // replace with search api doc link
|
||||
data-telemetry-id="entSearchApplications-searchApi-documentation-viewDocumentaion"
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.safeSearchDocLink',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchApiDocLink',
|
||||
{
|
||||
defaultMessage: 'Safe Search API',
|
||||
defaultMessage: 'Search API',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
|
@ -256,7 +256,7 @@ export const SearchApplicationAPI = () => {
|
|||
data-telemetry-id="entSearchApplications-searchTemplate-documentation-viewDocumentaion"
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.searchTemplateDocLink',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchTemplateDocLink',
|
||||
{
|
||||
defaultMessage: 'search template',
|
||||
}
|
||||
|
@ -267,20 +267,20 @@ export const SearchApplicationAPI = () => {
|
|||
/>
|
||||
<EuiSpacer size="l" />
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.safeSearchLearnMore"
|
||||
defaultMessage="{safeSearchDocumentation}"
|
||||
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.searchApiLearnMore"
|
||||
defaultMessage="{searchApiDocumentation}"
|
||||
values={{
|
||||
safeSearchDocumentation: (
|
||||
searchApiDocumentation: (
|
||||
<EuiLink
|
||||
data-test-subj="safe-search-documentation-link"
|
||||
href="#" // replace with safe search api doc link
|
||||
data-test-subj="search-documentation-link"
|
||||
href="#" // replace with search api doc link
|
||||
target="_blank"
|
||||
data-telemetry-id="entSearchApplications-safeSearchApi-learnMoreDocumentation-viewDocumentaion"
|
||||
data-telemetry-id="entSearchApplications-searchApi-learnMoreDocumentation-viewDocumentaion"
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.safeSearchDocumentationLink',
|
||||
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchApiDocumentationLink',
|
||||
{
|
||||
defaultMessage: 'Learn more about the Safe Search API',
|
||||
defaultMessage: 'Learn more about the Search API',
|
||||
}
|
||||
)}
|
||||
</EuiLink>
|
||||
|
|
|
@ -289,7 +289,7 @@ const ConfigurationPopover: React.FC<ConfigurationPopOverProps> = ({
|
|||
onClick={() =>
|
||||
navigateToUrl(
|
||||
generateEncodedPath(SEARCH_APPLICATION_CONNECT_PATH, {
|
||||
connectTabId: SearchApplicationConnectTabs.SAFESEARCHAPI,
|
||||
connectTabId: SearchApplicationConnectTabs.SEARCHAPI,
|
||||
engineName,
|
||||
})
|
||||
)
|
||||
|
|
|
@ -97,7 +97,7 @@ export const EngineView: React.FC = () => {
|
|||
<Route path={SEARCH_APPLICATION_CONNECT_PATH} component={EngineConnect} />
|
||||
<Redirect
|
||||
from={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}`}
|
||||
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SAFESEARCHAPI}`}
|
||||
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SEARCHAPI}`}
|
||||
/>
|
||||
<Route>
|
||||
<EnterpriseSearchEnginesPageTemplate
|
||||
|
|
|
@ -19,7 +19,7 @@ export const ENGINE_PATH = `${ENGINES_PATH}/:engineName`;
|
|||
export const ENGINE_TAB_PATH = `${ENGINE_PATH}/:tabId`;
|
||||
export const SEARCH_APPLICATION_CONNECT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONNECT}/:connectTabId`;
|
||||
export enum SearchApplicationConnectTabs {
|
||||
SAFESEARCHAPI = 'safe_search_api',
|
||||
SEARCHAPI = 'search_api',
|
||||
DOCUMENTATION = 'documentation',
|
||||
}
|
||||
export const SEARCH_APPLICATION_CONTENT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONTENT}/:contentTabId`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue