|
5 | 5 | * 2.0. |
6 | 6 | */ |
7 | 7 |
|
8 | | -import type { IconType } from '@elastic/eui'; |
9 | | - |
10 | | -import type { ServiceName } from '../../types'; |
11 | | -import { ElasticsearchAssetType, KibanaAssetType } from '../../types'; |
12 | | - |
13 | 8 | export * from '../../constants'; |
14 | | - |
15 | | -// only allow Kibana assets for the kibana key, ES asssets for elasticsearch, etc |
16 | | -type ServiceNameToAssetTypes = Record<Extract<ServiceName, 'kibana'>, KibanaAssetType[]> & |
17 | | - Record<Extract<ServiceName, 'elasticsearch'>, ElasticsearchAssetType[]>; |
18 | | - |
19 | | -export const DisplayedAssets: ServiceNameToAssetTypes = { |
20 | | - kibana: Object.values(KibanaAssetType), |
21 | | - elasticsearch: Object.values(ElasticsearchAssetType), |
22 | | -}; |
23 | | -export type DisplayedAssetType = KibanaAssetType | ElasticsearchAssetType; |
24 | | - |
25 | | -export const AssetTitleMap: Record<DisplayedAssetType, string> = { |
26 | | - dashboard: 'Dashboard', |
27 | | - ilm_policy: 'ILM Policy', |
28 | | - ingest_pipeline: 'Ingest Pipeline', |
29 | | - transform: 'Transform', |
30 | | - index_pattern: 'Index Pattern', |
31 | | - index_template: 'Index Template', |
32 | | - component_template: 'Component Template', |
33 | | - search: 'Saved Search', |
34 | | - visualization: 'Visualization', |
35 | | - map: 'Map', |
36 | | - data_stream_ilm_policy: 'Data Stream ILM Policy', |
37 | | - lens: 'Lens', |
38 | | - security_rule: 'Security Rule', |
39 | | - ml_module: 'ML Module', |
40 | | -}; |
41 | | - |
42 | | -export const ServiceTitleMap: Record<ServiceName, string> = { |
43 | | - kibana: 'Kibana', |
44 | | - elasticsearch: 'Elasticsearch', |
45 | | -}; |
46 | | - |
47 | | -export const AssetIcons: Record<KibanaAssetType, IconType> = { |
48 | | - dashboard: 'dashboardApp', |
49 | | - index_pattern: 'indexPatternApp', |
50 | | - search: 'searchProfilerApp', |
51 | | - visualization: 'visualizeApp', |
52 | | - map: 'emsApp', |
53 | | - lens: 'lensApp', |
54 | | - security_rule: 'securityApp', |
55 | | - ml_module: 'mlApp', |
56 | | -}; |
57 | | - |
58 | | -export const ServiceIcons: Record<ServiceName, IconType> = { |
59 | | - elasticsearch: 'logoElasticsearch', |
60 | | - kibana: 'logoKibana', |
61 | | -}; |
0 commit comments