-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aaron Caldwell
committed
Apr 17, 2020
1 parent
75fa8b3
commit 2c537ce
Showing
5 changed files
with
50 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
x-pack/legacy/plugins/maps/public/register_vis_type_alias.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
"data", | ||
"fileUpload", | ||
"uiActions", | ||
"navigation" | ||
"navigation", | ||
"visualizations" | ||
], | ||
"ui": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* 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'; | ||
import { APP_ID, APP_ICON, MAP_BASE_URL } from '../../../legacy/plugins/maps/common/constants'; | ||
import { | ||
getInjectedVarFunc, | ||
getVisualizations, | ||
} from './kibana_services'; | ||
|
||
export function getMapsVisTypeAlias() { | ||
const showMapVisualizationTypes = getInjectedVarFunc()('showMapVisualizationTypes', false); | ||
if (!showMapVisualizationTypes) { | ||
getVisualizations().hideTypes(['region_map', 'tile_map']); | ||
} | ||
|
||
const description = i18n.translate('xpack.maps.visTypeAlias.description', { | ||
defaultMessage: 'Create and style maps with multiple layers and indices.', | ||
}); | ||
|
||
const legacyMapVisualizationWarning = i18n.translate( | ||
'xpack.maps.visTypeAlias.legacyMapVizWarning', | ||
{ | ||
defaultMessage: `Use the Maps app instead of Coordinate Map and Region Map. | ||
The Maps app offers more functionality and is easier to use.`, | ||
} | ||
); | ||
|
||
return ({ | ||
aliasUrl: MAP_BASE_URL, | ||
name: APP_ID, | ||
title: i18n.translate('xpack.maps.visTypeAlias.title', { | ||
defaultMessage: 'Maps', | ||
}), | ||
description: showMapVisualizationTypes | ||
? `${description} ${legacyMapVisualizationWarning}` | ||
: description, | ||
icon: APP_ICON, | ||
stage: 'production', | ||
}); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters