mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -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(
|
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(
|
const DOCUMENTATION_TAB_TITLE = i18n.translate(
|
||||||
|
@ -50,7 +50,7 @@ const DOCUMENTATION_TAB_TITLE = i18n.translate(
|
||||||
const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs);
|
const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs);
|
||||||
const getTabBreadCrumb = (tabId: string) => {
|
const getTabBreadCrumb = (tabId: string) => {
|
||||||
switch (tabId) {
|
switch (tabId) {
|
||||||
case SearchApplicationConnectTabs.SAFESEARCHAPI:
|
case SearchApplicationConnectTabs.SEARCHAPI:
|
||||||
return SAFE_SEARCH_API_TAB_TITLE;
|
return SAFE_SEARCH_API_TAB_TITLE;
|
||||||
case SearchApplicationConnectTabs.DOCUMENTATION:
|
case SearchApplicationConnectTabs.DOCUMENTATION:
|
||||||
return DOCUMENTATION_TAB_TITLE;
|
return DOCUMENTATION_TAB_TITLE;
|
||||||
|
@ -61,7 +61,7 @@ const getTabBreadCrumb = (tabId: string) => {
|
||||||
|
|
||||||
export const EngineConnect: React.FC = () => {
|
export const EngineConnect: React.FC = () => {
|
||||||
const { engineName, isLoadingEngine, hasSchemaConflicts } = useValues(EngineViewLogic);
|
const { engineName, isLoadingEngine, hasSchemaConflicts } = useValues(EngineViewLogic);
|
||||||
const { connectTabId = SearchApplicationConnectTabs.SAFESEARCHAPI } = useParams<{
|
const { connectTabId = SearchApplicationConnectTabs.SEARCHAPI } = useParams<{
|
||||||
connectTabId?: string;
|
connectTabId?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -106,9 +106,9 @@ export const EngineConnect: React.FC = () => {
|
||||||
rightSideItems: [],
|
rightSideItems: [],
|
||||||
tabs: [
|
tabs: [
|
||||||
{
|
{
|
||||||
isSelected: connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI,
|
isSelected: connectTabId === SearchApplicationConnectTabs.SEARCHAPI,
|
||||||
label: SAFE_SEARCH_API_TAB_TITLE,
|
label: SAFE_SEARCH_API_TAB_TITLE,
|
||||||
onClick: onTabClick(SearchApplicationConnectTabs.SAFESEARCHAPI),
|
onClick: onTabClick(SearchApplicationConnectTabs.SEARCHAPI),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
isSelected: connectTabId === SearchApplicationConnectTabs.DOCUMENTATION,
|
isSelected: connectTabId === SearchApplicationConnectTabs.DOCUMENTATION,
|
||||||
|
@ -120,7 +120,7 @@ export const EngineConnect: React.FC = () => {
|
||||||
engineName={engineName}
|
engineName={engineName}
|
||||||
hasSchemaConflicts={hasSchemaConflicts}
|
hasSchemaConflicts={hasSchemaConflicts}
|
||||||
>
|
>
|
||||||
{connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI && <SearchApplicationAPI />}
|
{connectTabId === SearchApplicationConnectTabs.SEARCHAPI && <SearchApplicationAPI />}
|
||||||
{connectTabId === SearchApplicationConnectTabs.DOCUMENTATION && (
|
{connectTabId === SearchApplicationConnectTabs.DOCUMENTATION && (
|
||||||
<SearchApplicationDocumentation />
|
<SearchApplicationDocumentation />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -52,13 +52,13 @@ export const SearchApplicationAPI = () => {
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage
|
<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:"
|
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={{
|
values={{
|
||||||
searchTemplateDocLink: (
|
searchTemplateDocLink: (
|
||||||
<EuiLink href={docLinks.searchTemplates}>
|
<EuiLink href={docLinks.searchTemplates}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
|
||||||
defaultMessage="search template"
|
defaultMessage="search template"
|
||||||
/>
|
/>
|
||||||
</EuiLink>
|
</EuiLink>
|
||||||
|
@ -80,13 +80,13 @@ export const SearchApplicationAPI = () => {
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage
|
<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."
|
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={{
|
values={{
|
||||||
searchTemplateExampleDoc: (
|
searchTemplateExampleDoc: (
|
||||||
<EuiLink href={docLinks.searchApplicationsTemplates}>
|
<EuiLink href={docLinks.searchApplicationsTemplates}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
|
||||||
defaultMessage="documentation"
|
defaultMessage="documentation"
|
||||||
/>
|
/>
|
||||||
</EuiLink>
|
</EuiLink>
|
||||||
|
@ -98,7 +98,7 @@ export const SearchApplicationAPI = () => {
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
title: i18n.translate(
|
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',
|
defaultMessage: 'Set up your search template',
|
||||||
}
|
}
|
||||||
|
@ -110,13 +110,13 @@ export const SearchApplicationAPI = () => {
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<p>
|
<p>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning"
|
||||||
defaultMessage="This {apiKeyDocumentation} will only be able to access your Safe Search endpoint."
|
defaultMessage="This {apiKeyDocumentation} will only be able to access your Search endpoint."
|
||||||
values={{
|
values={{
|
||||||
apiKeyDocumentation: (
|
apiKeyDocumentation: (
|
||||||
<EuiLink href={docLinks.apiKeys}>
|
<EuiLink href={docLinks.apiKeys}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning.documentationLink"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning.documentationLink"
|
||||||
defaultMessage="API key"
|
defaultMessage="API key"
|
||||||
/>
|
/>
|
||||||
</EuiLink>
|
</EuiLink>
|
||||||
|
@ -132,10 +132,10 @@ export const SearchApplicationAPI = () => {
|
||||||
iconSide="left"
|
iconSide="left"
|
||||||
iconType="plusInCircleFilled"
|
iconType="plusInCircleFilled"
|
||||||
onClick={openGenerateModal}
|
onClick={openGenerateModal}
|
||||||
data-telemetry-id="entSearchApplications-safeSearchApi-step2-createApiKeyButton"
|
data-telemetry-id="entSearchApplications-searchApi-step2-createApiKeyButton"
|
||||||
>
|
>
|
||||||
{i18n.translate(
|
{i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.createAPIKeyButton',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.createAPIKeyButton',
|
||||||
{
|
{
|
||||||
defaultMessage: 'Create API Key',
|
defaultMessage: 'Create API Key',
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ export const SearchApplicationAPI = () => {
|
||||||
<EuiButton
|
<EuiButton
|
||||||
iconSide="left"
|
iconSide="left"
|
||||||
iconType="popout"
|
iconType="popout"
|
||||||
data-telemetry-id="entSearchApplications-safeSearchApi-step2-viewKeysButton"
|
data-telemetry-id="entSearchApplications-searchApi-step2-viewKeysButton"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', {
|
KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', {
|
||||||
shouldNotCreateHref: true,
|
shouldNotCreateHref: true,
|
||||||
|
@ -154,7 +154,7 @@ export const SearchApplicationAPI = () => {
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{i18n.translate(
|
{i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.viewKeysButton',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.viewKeysButton',
|
||||||
{
|
{
|
||||||
defaultMessage: 'View Keys',
|
defaultMessage: 'View Keys',
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ export const SearchApplicationAPI = () => {
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
title: i18n.translate(
|
title: i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.title',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.title',
|
||||||
{
|
{
|
||||||
defaultMessage: 'Generate and save API key',
|
defaultMessage: 'Generate and save API key',
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ export const SearchApplicationAPI = () => {
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<p>
|
<p>
|
||||||
{i18n.translate(
|
{i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step3.copyEndpointDescription',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.step3.copyEndpointDescription',
|
||||||
{
|
{
|
||||||
defaultMessage: "Here's the URL for your endpoint:",
|
defaultMessage: "Here's the URL for your endpoint:",
|
||||||
}
|
}
|
||||||
|
@ -197,16 +197,16 @@ export const SearchApplicationAPI = () => {
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
title: i18n.translate(
|
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 />,
|
children: <EngineApiIntegrationStage />,
|
||||||
title: i18n.translate(
|
title: i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step4.title',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.step4.title',
|
||||||
{
|
{
|
||||||
defaultMessage: 'Learn how to call your endpoint',
|
defaultMessage: 'Learn how to call your endpoint',
|
||||||
}
|
}
|
||||||
|
@ -226,25 +226,25 @@ export const SearchApplicationAPI = () => {
|
||||||
iconType="iInCircle"
|
iconType="iInCircle"
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.title"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.title"
|
||||||
defaultMessage="What is Safe Search API?"
|
defaultMessage="What is Search API?"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.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}."
|
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={{
|
values={{
|
||||||
safeSearchDocumentation: (
|
searchApiDocumentation: (
|
||||||
<EuiLink
|
<EuiLink
|
||||||
data-test-subj="safe-search-documentation-link"
|
data-test-subj="search-documentation-link"
|
||||||
href="#" // replace with safe search api doc link
|
href="#" // replace with search api doc link
|
||||||
data-telemetry-id="entSearchApplications-safeSearchApi-documentation-viewDocumentaion"
|
data-telemetry-id="entSearchApplications-searchApi-documentation-viewDocumentaion"
|
||||||
>
|
>
|
||||||
{i18n.translate(
|
{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>
|
</EuiLink>
|
||||||
|
@ -256,7 +256,7 @@ export const SearchApplicationAPI = () => {
|
||||||
data-telemetry-id="entSearchApplications-searchTemplate-documentation-viewDocumentaion"
|
data-telemetry-id="entSearchApplications-searchTemplate-documentation-viewDocumentaion"
|
||||||
>
|
>
|
||||||
{i18n.translate(
|
{i18n.translate(
|
||||||
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.searchTemplateDocLink',
|
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchTemplateDocLink',
|
||||||
{
|
{
|
||||||
defaultMessage: 'search template',
|
defaultMessage: 'search template',
|
||||||
}
|
}
|
||||||
|
@ -267,20 +267,20 @@ export const SearchApplicationAPI = () => {
|
||||||
/>
|
/>
|
||||||
<EuiSpacer size="l" />
|
<EuiSpacer size="l" />
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.safeSearchLearnMore"
|
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.searchApiLearnMore"
|
||||||
defaultMessage="{safeSearchDocumentation}"
|
defaultMessage="{searchApiDocumentation}"
|
||||||
values={{
|
values={{
|
||||||
safeSearchDocumentation: (
|
searchApiDocumentation: (
|
||||||
<EuiLink
|
<EuiLink
|
||||||
data-test-subj="safe-search-documentation-link"
|
data-test-subj="search-documentation-link"
|
||||||
href="#" // replace with safe search api doc link
|
href="#" // replace with search api doc link
|
||||||
target="_blank"
|
target="_blank"
|
||||||
data-telemetry-id="entSearchApplications-safeSearchApi-learnMoreDocumentation-viewDocumentaion"
|
data-telemetry-id="entSearchApplications-searchApi-learnMoreDocumentation-viewDocumentaion"
|
||||||
>
|
>
|
||||||
{i18n.translate(
|
{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>
|
</EuiLink>
|
||||||
|
|
|
@ -289,7 +289,7 @@ const ConfigurationPopover: React.FC<ConfigurationPopOverProps> = ({
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigateToUrl(
|
navigateToUrl(
|
||||||
generateEncodedPath(SEARCH_APPLICATION_CONNECT_PATH, {
|
generateEncodedPath(SEARCH_APPLICATION_CONNECT_PATH, {
|
||||||
connectTabId: SearchApplicationConnectTabs.SAFESEARCHAPI,
|
connectTabId: SearchApplicationConnectTabs.SEARCHAPI,
|
||||||
engineName,
|
engineName,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -97,7 +97,7 @@ export const EngineView: React.FC = () => {
|
||||||
<Route path={SEARCH_APPLICATION_CONNECT_PATH} component={EngineConnect} />
|
<Route path={SEARCH_APPLICATION_CONNECT_PATH} component={EngineConnect} />
|
||||||
<Redirect
|
<Redirect
|
||||||
from={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}`}
|
from={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}`}
|
||||||
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SAFESEARCHAPI}`}
|
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SEARCHAPI}`}
|
||||||
/>
|
/>
|
||||||
<Route>
|
<Route>
|
||||||
<EnterpriseSearchEnginesPageTemplate
|
<EnterpriseSearchEnginesPageTemplate
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const ENGINE_PATH = `${ENGINES_PATH}/:engineName`;
|
||||||
export const ENGINE_TAB_PATH = `${ENGINE_PATH}/:tabId`;
|
export const ENGINE_TAB_PATH = `${ENGINE_PATH}/:tabId`;
|
||||||
export const SEARCH_APPLICATION_CONNECT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONNECT}/:connectTabId`;
|
export const SEARCH_APPLICATION_CONNECT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONNECT}/:connectTabId`;
|
||||||
export enum SearchApplicationConnectTabs {
|
export enum SearchApplicationConnectTabs {
|
||||||
SAFESEARCHAPI = 'safe_search_api',
|
SEARCHAPI = 'search_api',
|
||||||
DOCUMENTATION = 'documentation',
|
DOCUMENTATION = 'documentation',
|
||||||
}
|
}
|
||||||
export const SEARCH_APPLICATION_CONTENT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONTENT}/:contentTabId`;
|
export const SEARCH_APPLICATION_CONTENT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONTENT}/:contentTabId`;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue