[App Search] Minor const cleanup (#87885)
* DRY out repeated DOCUMENTS_TITLE * Move temporary title const's in engine folder to their own respective folders - might as well get it set up early + prevents us from forgetting to clean this up later * Update engine nav & engine router files
This commit is contained in:
parent
02f7956db3
commit
cf086b678b
|
@ -6,6 +6,11 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const ANALYTICS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.analytics.title',
|
||||
{ defaultMessage: 'Analytics' }
|
||||
);
|
||||
|
||||
export const TOTAL_DOCUMENTS = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments',
|
||||
{ defaultMessage: 'Total documents' }
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { ANALYTICS_TITLE } from './constants';
|
|
@ -6,6 +6,11 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
export const API_LOGS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.apiLogs.title',
|
||||
{ defaultMessage: 'API Logs' }
|
||||
);
|
||||
|
||||
export const RECENT_API_EVENTS = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.apiLogs.recent',
|
||||
{ defaultMessage: 'Recent API events' }
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { API_LOGS_TITLE } from './constants';
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 CRAWLER_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.crawler.title',
|
||||
{ defaultMessage: 'Crawler' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { CRAWLER_TITLE } from './constants';
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 CURATIONS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.curations.title',
|
||||
{ defaultMessage: 'Curations' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { CURATIONS_TITLE } from './constants';
|
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export { DOCUMENTS_TITLE } from './constants';
|
||||
export { DocumentDetailLogic } from './document_detail_logic';
|
||||
export { DocumentsLogic } from './documents_logic';
|
||||
export { Documents } from './documents';
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* 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';
|
||||
|
||||
// TODO: It's very likely that we'll move these i18n constants to their respective component
|
||||
// folders once those are migrated over. This is a temporary way of DRYing them out for now.
|
||||
|
||||
export const ANALYTICS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.analytics.title',
|
||||
{ defaultMessage: 'Analytics' }
|
||||
);
|
||||
export const DOCUMENTS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.documents.title',
|
||||
{ defaultMessage: 'Documents' }
|
||||
);
|
||||
export const SCHEMA_TITLE = i18n.translate('xpack.enterpriseSearch.appSearch.engine.schema.title', {
|
||||
defaultMessage: 'Schema',
|
||||
});
|
||||
export const CRAWLER_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.crawler.title',
|
||||
{ defaultMessage: 'Crawler' }
|
||||
);
|
||||
export const RELEVANCE_TUNING_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.title',
|
||||
{ defaultMessage: 'Relevance Tuning' }
|
||||
);
|
||||
export const SYNONYMS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.synonyms.title',
|
||||
{ defaultMessage: 'Synonyms' }
|
||||
);
|
||||
export const CURATIONS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.curations.title',
|
||||
{ defaultMessage: 'Curations' }
|
||||
);
|
||||
export const RESULT_SETTINGS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.resultSettings.title',
|
||||
{ defaultMessage: 'Result Settings' }
|
||||
);
|
||||
export const SEARCH_UI_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.searchUI.title',
|
||||
{ defaultMessage: 'Search UI' }
|
||||
);
|
||||
export const API_LOGS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.apiLogs.title',
|
||||
{ defaultMessage: 'API Logs' }
|
||||
);
|
|
@ -29,18 +29,16 @@ import {
|
|||
import { getAppSearchUrl } from '../../../shared/enterprise_search_url';
|
||||
import { ENGINES_TITLE } from '../engines';
|
||||
import { OVERVIEW_TITLE } from '../engine_overview';
|
||||
import {
|
||||
ANALYTICS_TITLE,
|
||||
DOCUMENTS_TITLE,
|
||||
SCHEMA_TITLE,
|
||||
CRAWLER_TITLE,
|
||||
RELEVANCE_TUNING_TITLE,
|
||||
SYNONYMS_TITLE,
|
||||
CURATIONS_TITLE,
|
||||
RESULT_SETTINGS_TITLE,
|
||||
SEARCH_UI_TITLE,
|
||||
API_LOGS_TITLE,
|
||||
} from './constants';
|
||||
import { ANALYTICS_TITLE } from '../analytics';
|
||||
import { DOCUMENTS_TITLE } from '../documents';
|
||||
import { SCHEMA_TITLE } from '../schema';
|
||||
import { CRAWLER_TITLE } from '../crawler';
|
||||
import { RELEVANCE_TUNING_TITLE } from '../relevance_tuning';
|
||||
import { SYNONYMS_TITLE } from '../synonyms';
|
||||
import { CURATIONS_TITLE } from '../curations';
|
||||
import { RESULT_SETTINGS_TITLE } from '../result_settings';
|
||||
import { SEARCH_UI_TITLE } from '../search_ui';
|
||||
import { API_LOGS_TITLE } from '../api_logs';
|
||||
|
||||
import { EngineLogic } from './';
|
||||
import { EngineDetails } from './types';
|
||||
|
|
|
@ -33,18 +33,7 @@ import {
|
|||
} from '../../routes';
|
||||
import { ENGINES_TITLE } from '../engines';
|
||||
import { OVERVIEW_TITLE } from '../engine_overview';
|
||||
import {
|
||||
ANALYTICS_TITLE,
|
||||
// DOCUMENTS_TITLE,
|
||||
// SCHEMA_TITLE,
|
||||
// CRAWLER_TITLE,
|
||||
// RELEVANCE_TUNING_TITLE,
|
||||
// SYNONYMS_TITLE,
|
||||
// CURATIONS_TITLE,
|
||||
// RESULT_SETTINGS_TITLE,
|
||||
// SEARCH_UI_TITLE,
|
||||
// API_LOGS_TITLE,
|
||||
} from './constants';
|
||||
import { ANALYTICS_TITLE } from '../analytics';
|
||||
|
||||
import { Loading } from '../../../shared/loading';
|
||||
import { EngineOverview } from '../engine_overview';
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 RELEVANCE_TUNING_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.relevanceTuning.title',
|
||||
{ defaultMessage: 'Relevance Tuning' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { RELEVANCE_TUNING_TITLE } from './constants';
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 RESULT_SETTINGS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.resultSettings.title',
|
||||
{ defaultMessage: 'Result Settings' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { RESULT_SETTINGS_TITLE } from './constants';
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* 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_TITLE = i18n.translate('xpack.enterpriseSearch.appSearch.engine.schema.title', {
|
||||
defaultMessage: 'Schema',
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { SCHEMA_TITLE } from './constants';
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 SEARCH_UI_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.searchUI.title',
|
||||
{ defaultMessage: 'Search UI' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { SEARCH_UI_TITLE } from './constants';
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* 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 SYNONYMS_TITLE = i18n.translate(
|
||||
'xpack.enterpriseSearch.appSearch.engine.synonyms.title',
|
||||
{ defaultMessage: 'Synonyms' }
|
||||
);
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* 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 { SYNONYMS_TITLE } from './constants';
|
|
@ -7241,7 +7241,6 @@
|
|||
"xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API ログ",
|
||||
"xpack.enterpriseSearch.appSearch.engine.crawler.title": "Crawler",
|
||||
"xpack.enterpriseSearch.appSearch.engine.curations.title": "キュレーション",
|
||||
"xpack.enterpriseSearch.appSearch.engine.documents.title": "ドキュメント",
|
||||
"xpack.enterpriseSearch.appSearch.engine.metaEngineBadge": "メタエンジン",
|
||||
"xpack.enterpriseSearch.appSearch.engine.notFound": "名前「{engineName}」のエンジンが見つかりませんでした。",
|
||||
"xpack.enterpriseSearch.appSearch.engine.overview.analyticsLink": "分析を表示",
|
||||
|
|
|
@ -7260,7 +7260,6 @@
|
|||
"xpack.enterpriseSearch.appSearch.engine.apiLogs.title": "API 日志",
|
||||
"xpack.enterpriseSearch.appSearch.engine.crawler.title": "网络爬虫",
|
||||
"xpack.enterpriseSearch.appSearch.engine.curations.title": "策展",
|
||||
"xpack.enterpriseSearch.appSearch.engine.documents.title": "文档",
|
||||
"xpack.enterpriseSearch.appSearch.engine.metaEngineBadge": "元引擎",
|
||||
"xpack.enterpriseSearch.appSearch.engine.notFound": "找不到名为“{engineName}”的引擎。",
|
||||
"xpack.enterpriseSearch.appSearch.engine.overview.analyticsLink": "查看分析",
|
||||
|
|
Loading…
Reference in a new issue