-
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.
[Maps] term join in produce help (#120238)
* [Maps] term join in produce help * snapshot updates * i18n clean up * API doc updates * update API docs, update copy * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * i18n cleanup Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
b0388df
commit ffc515b
Showing
10 changed files
with
140 additions
and
41 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
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
2 changes: 2 additions & 0 deletions
2
...aps/public/classes/sources/es_search_source/util/__snapshots__/scaling_form.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
38 changes: 14 additions & 24 deletions
38
...connected_components/edit_layer_panel/join_editor/__snapshots__/join_editor.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
114 changes: 114 additions & 0 deletions
114
...onnected_components/edit_layer_panel/join_editor/resources/join_documentation_popover.tsx
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,114 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import { EuiButtonIcon, EuiLink, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { getDocLinks } from '../../../../kibana_services'; | ||
|
||
interface State { | ||
isPopoverOpen: boolean; | ||
} | ||
|
||
export class JoinDocumentationPopover extends Component<{}, State> { | ||
state: State = { | ||
isPopoverOpen: false, | ||
}; | ||
|
||
_togglePopover = () => { | ||
this.setState((prevState) => ({ | ||
isPopoverOpen: !prevState.isPopoverOpen, | ||
})); | ||
}; | ||
|
||
_closePopover = () => { | ||
this.setState({ | ||
isPopoverOpen: false, | ||
}); | ||
}; | ||
|
||
_renderContent() { | ||
return ( | ||
<div> | ||
<EuiText grow={false}> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.intro" | ||
defaultMessage="Term joins augment layers with properties for data driven styling. Term joins work as follows:" | ||
/> | ||
</p> | ||
<ul> | ||
<li> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.sharedKey" | ||
defaultMessage="A shared key combines vector features, the left source, with the results of an Elasticsearch aggregation, the right source." | ||
/> | ||
</li> | ||
<li> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.termsAggregation" | ||
defaultMessage="The terms aggregation creates a bucket for each unique shared key." | ||
/> | ||
</li> | ||
<li> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.metrics" | ||
defaultMessage="Metrics are calculated for all documents in a bucket." | ||
/> | ||
</li> | ||
<li> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.join" | ||
defaultMessage="The join adds metrics for each terms aggregation bucket with the corresponding shared key." | ||
/> | ||
</li> | ||
</ul> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.noMatches" | ||
defaultMessage="Features that do have have a corresponding terms aggregation bucket are not visible on the map." | ||
/> | ||
</p> | ||
<EuiLink href={getDocLinks().links.maps.termJoinsExample} target="_blank" external={true}> | ||
<FormattedMessage | ||
id="xpack.maps.joinDocs.linkLabel" | ||
defaultMessage="Term join example" | ||
/> | ||
</EuiLink> | ||
</EuiText> | ||
</div> | ||
); | ||
} | ||
|
||
render() { | ||
return ( | ||
<EuiPopover | ||
id="joinHelpPopover" | ||
anchorPosition="leftCenter" | ||
button={ | ||
<EuiButtonIcon | ||
onClick={this._togglePopover} | ||
iconType="documentation" | ||
aria-label="Join documentation" | ||
/> | ||
} | ||
isOpen={this.state.isPopoverOpen} | ||
closePopover={this._closePopover} | ||
repositionOnScroll | ||
ownFocus | ||
> | ||
<EuiPopoverTitle> | ||
<FormattedMessage | ||
id="xpack.maps.layerPanel.joinEditor.termJoinsTitle" | ||
defaultMessage="Term joins" | ||
/> | ||
</EuiPopoverTitle> | ||
{this._renderContent()} | ||
</EuiPopover> | ||
); | ||
} | ||
} |
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
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
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