-
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] observability real user monitoring solution layer (#64949)
* [Maps] observability real user monitoring solution layer * make stateful component * rename RUM to observability * layer select * metrics select * display select * clean up * create cholopleth map layer descriptor * get styling working * fix unique count agg * create geo grid source * render as heatmap * clusters * tslint errors * last tslint fix * only show card when APM index exists * layer label * clean up * fix getLayerWizards * add parans * review feedback * add cluster labels * use green to red ramp * tslint fix Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
415d33b
commit 891e27e
Showing
26 changed files
with
1,075 additions
and
81 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
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
File renamed without changes.
67 changes: 67 additions & 0 deletions
67
x-pack/plugins/maps/public/connected_components/layer_addpanel/layer_wizard_select.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,67 @@ | ||
/* | ||
* 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 _ from 'lodash'; | ||
import React, { Component, Fragment } from 'react'; | ||
import { EuiSpacer, EuiCard, EuiIcon } from '@elastic/eui'; | ||
import { getLayerWizards, LayerWizard } from '../../layers/layer_wizard_registry'; | ||
|
||
interface Props { | ||
onSelect: (layerWizard: LayerWizard) => void; | ||
} | ||
|
||
interface State { | ||
layerWizards: LayerWizard[]; | ||
} | ||
|
||
export class LayerWizardSelect extends Component<Props, State> { | ||
private _isMounted: boolean = false; | ||
|
||
state = { | ||
layerWizards: [], | ||
}; | ||
|
||
componentDidMount() { | ||
this._isMounted = true; | ||
this._loadLayerWizards(); | ||
} | ||
|
||
componentWillUnmount() { | ||
this._isMounted = false; | ||
} | ||
|
||
async _loadLayerWizards() { | ||
const layerWizards = await getLayerWizards(); | ||
if (this._isMounted) { | ||
this.setState({ layerWizards }); | ||
} | ||
} | ||
|
||
render() { | ||
return this.state.layerWizards.map((layerWizard: LayerWizard) => { | ||
const icon = layerWizard.icon ? <EuiIcon type={layerWizard.icon} size="l" /> : undefined; | ||
|
||
const onClick = () => { | ||
this.props.onSelect(layerWizard); | ||
}; | ||
|
||
return ( | ||
<Fragment key={layerWizard.title}> | ||
<EuiSpacer size="s" /> | ||
<EuiCard | ||
className="mapLayerAddpanel__card" | ||
title={layerWizard.title} | ||
icon={icon} | ||
onClick={onClick} | ||
description={layerWizard.description} | ||
layout="horizontal" | ||
data-test-subj={_.camelCase(layerWizard.title)} | ||
/> | ||
</Fragment> | ||
); | ||
}); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
x-pack/plugins/maps/public/connected_components/layer_addpanel/source_select/_index.scss
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...ck/plugins/maps/public/connected_components/layer_addpanel/source_select/source_select.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
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.