Skip to content

Commit 63f8fe4

Browse files
author
Constance
authored
[App Search] Minor const cleanup (#87885) (#87942)
* 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
1 parent d1b3d09 commit 63f8fe4

File tree

24 files changed

+168
-76
lines changed

24 files changed

+168
-76
lines changed

x-pack/plugins/enterprise_search/public/applications/app_search/components/analytics/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
import { i18n } from '@kbn/i18n';
88

9+
export const ANALYTICS_TITLE = i18n.translate(
10+
'xpack.enterpriseSearch.appSearch.engine.analytics.title',
11+
{ defaultMessage: 'Analytics' }
12+
);
13+
914
export const TOTAL_DOCUMENTS = i18n.translate(
1015
'xpack.enterpriseSearch.appSearch.engine.analytics.totalDocuments',
1116
{ defaultMessage: 'Total documents' }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export { ANALYTICS_TITLE } from './constants';

x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
import { i18n } from '@kbn/i18n';
88

9+
export const API_LOGS_TITLE = i18n.translate(
10+
'xpack.enterpriseSearch.appSearch.engine.apiLogs.title',
11+
{ defaultMessage: 'API Logs' }
12+
);
13+
914
export const RECENT_API_EVENTS = i18n.translate(
1015
'xpack.enterpriseSearch.appSearch.engine.apiLogs.recent',
1116
{ defaultMessage: 'Recent API events' }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export { API_LOGS_TITLE } from './constants';
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import { i18n } from '@kbn/i18n';
8+
9+
export const CRAWLER_TITLE = i18n.translate(
10+
'xpack.enterpriseSearch.appSearch.engine.crawler.title',
11+
{ defaultMessage: 'Crawler' }
12+
);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export { CRAWLER_TITLE } from './constants';
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import { i18n } from '@kbn/i18n';
8+
9+
export const CURATIONS_TITLE = i18n.translate(
10+
'xpack.enterpriseSearch.appSearch.engine.curations.title',
11+
{ defaultMessage: 'Curations' }
12+
);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
export { CURATIONS_TITLE } from './constants';

x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7+
export { DOCUMENTS_TITLE } from './constants';
78
export { DocumentDetailLogic } from './document_detail_logic';
89
export { DocumentsLogic } from './documents_logic';
910
export { Documents } from './documents';

x-pack/plugins/enterprise_search/public/applications/app_search/components/engine/constants.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)