-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Maps] add drilldown support map embeddable #75598
Merged
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d589bc8
[Maps] add drilldown support
nreese d9e2bd3
filter actions view
nreese ef9cd15
use i18n getter
nreese aa418b6
remove unused changed
nreese 20673fc
tslint fixes
nreese a129eac
more tslint changes
nreese 1700fc6
Merge branch 'master' into map_drilldowns
elasticmachine 2779982
clean-up and API doc changes
nreese 553b6d9
update snapshots
nreese a4f340a
Merge branch 'master' into map_drilldowns
elasticmachine c04cf34
do not show first drilldown in tooltip
nreese 8efb529
Merge branch 'master' into map_drilldowns
elasticmachine 6b1a221
add light grey line to seperate feature property rows
nreese 37ecfc5
Improving tooltip row styles (#36)
miukimiu abdac76
update snapshot and add functional test
nreese a937252
Merge branch 'master' into map_drilldowns
elasticmachine 27f1de9
Merge branch 'master' into map_drilldowns
elasticmachine e6f548e
switch UiActionsActionDefinition to Action and remove unneeded checks
nreese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...ins/data/public/kibana-plugin-plugins-data-public.action_global_apply_filter.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ACTION\_GLOBAL\_APPLY\_FILTER](./kibana-plugin-plugins-data-public.action_global_apply_filter.md) | ||
|
||
## ACTION\_GLOBAL\_APPLY\_FILTER variable | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
ACTION_GLOBAL_APPLY_FILTER = "ACTION_GLOBAL_APPLY_FILTER" | ||
``` |
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
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
16 changes: 16 additions & 0 deletions
16
x-pack/plugins/maps/public/components/__snapshots__/geometry_filter_form.test.js.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.mapActionSelectIcon { | ||
margin-right: $euiSizeS; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
@import 'action_select'; | ||
@import 'metric_editors'; | ||
@import './geometry_filter'; | ||
@import 'tooltip_selector/tooltip_selector'; |
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,87 @@ | ||
/* | ||
* 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 React, { Component } from 'react'; | ||
import { EuiFormRow, EuiSuperSelect, EuiIcon } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { ActionExecutionContext, UiActionsActionDefinition } from 'src/plugins/ui_actions/public'; | ||
|
||
interface Props { | ||
value?: string; | ||
onChange: (value: string) => void; | ||
getFilterActions?: () => Promise<UiActionsActionDefinition[]>; | ||
getActionContext?: () => ActionExecutionContext; | ||
} | ||
|
||
interface State { | ||
actions: UiActionsActionDefinition[]; | ||
} | ||
|
||
export class ActionSelect extends Component<Props, State> { | ||
private _isMounted = false; | ||
state: State = { | ||
actions: [], | ||
}; | ||
|
||
componentDidMount() { | ||
this._isMounted = true; | ||
this._loadActions(); | ||
} | ||
|
||
componentWillUnmount() { | ||
this._isMounted = false; | ||
} | ||
|
||
async _loadActions() { | ||
if (!this.props.getFilterActions || !this.props.getActionContext) { | ||
return; | ||
} | ||
const actions = await this.props.getFilterActions(); | ||
if (this._isMounted) { | ||
this.setState({ actions }); | ||
} | ||
} | ||
|
||
render() { | ||
if (this.state.actions.length === 0 || !this.props.getActionContext) { | ||
return null; | ||
} | ||
|
||
if (this.state.actions.length === 1 && this.props.value === this.state.actions[0].id) { | ||
return null; | ||
} | ||
|
||
const actionContext = this.props.getActionContext(); | ||
const options = this.state.actions.map((action) => { | ||
const iconType = action.getIconType ? action.getIconType(actionContext) : null; | ||
nreese marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return { | ||
value: action.id, | ||
inputDisplay: ( | ||
<div> | ||
{iconType ? <EuiIcon className="mapActionSelectIcon" type={iconType} /> : null} | ||
{action.getDisplayName ? action.getDisplayName(actionContext) : action.id} | ||
</div> | ||
), | ||
}; | ||
}); | ||
|
||
return ( | ||
<EuiFormRow | ||
label={i18n.translate('xpack.maps.actionSelect.label', { | ||
defaultMessage: 'Action', | ||
})} | ||
display="rowCompressed" | ||
> | ||
<EuiSuperSelect | ||
compressed | ||
options={options} | ||
valueOfSelected={this.props.value ? this.props.value : ''} | ||
onChange={this.props.onChange} | ||
/> | ||
</EuiFormRow> | ||
); | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these warnings something we should care about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure. I do not understand the entire auto-generated API thing. Since its only exposing a constant I figured it was good enough.