mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Lens] Hide the random sampling settings from the UI (#145071)
## Summary Hides the random sampling layer settings from the UI until we decide how we want to introduce it to our users.
This commit is contained in:
parent
e580f23b13
commit
a5cfe8ec0d
2 changed files with 16 additions and 9 deletions
|
@ -52,6 +52,9 @@ const initialActiveDimensionState = {
|
|||
isNew: false,
|
||||
};
|
||||
|
||||
// hide the random sampling settings from the UI
|
||||
const DISPLAY_RANDOM_SAMPLING_SETTINGS = false;
|
||||
|
||||
export function LayerPanel(
|
||||
props: Exclude<LayerPanelProps, 'state' | 'setState'> & {
|
||||
activeVisualization: Visualization;
|
||||
|
@ -323,12 +326,14 @@ export function LayerPanel(
|
|||
updateVisualization,
|
||||
() => setPanelSettingsOpen(true)
|
||||
) || []),
|
||||
...(layerDatasource?.getSupportedActionsForLayer?.(
|
||||
layerId,
|
||||
layerDatasourceState,
|
||||
(newState) => updateDatasource(datasourceId, newState),
|
||||
() => setPanelSettingsOpen(true)
|
||||
) || []),
|
||||
...((DISPLAY_RANDOM_SAMPLING_SETTINGS &&
|
||||
layerDatasource?.getSupportedActionsForLayer?.(
|
||||
layerId,
|
||||
layerDatasourceState,
|
||||
(newState) => updateDatasource(datasourceId, newState),
|
||||
() => setPanelSettingsOpen(true)
|
||||
)) ||
|
||||
[]),
|
||||
...getSharedActions({
|
||||
activeVisualization,
|
||||
core,
|
||||
|
@ -639,7 +644,8 @@ export function LayerPanel(
|
|||
})}
|
||||
</EuiPanel>
|
||||
</section>
|
||||
{(layerDatasource?.renderLayerSettings || activeVisualization?.renderLayerSettings) && (
|
||||
{((DISPLAY_RANDOM_SAMPLING_SETTINGS && layerDatasource?.renderLayerSettings) ||
|
||||
activeVisualization?.renderLayerSettings) && (
|
||||
<FlyoutContainer
|
||||
panelRef={(el) => (settingsPanelRef.current = el)}
|
||||
isOpen={isPanelSettingsOpen}
|
||||
|
@ -655,7 +661,7 @@ export function LayerPanel(
|
|||
>
|
||||
<div id={layerId}>
|
||||
<div className="lnsIndexPatternDimensionEditor--padded lnsIndexPatternDimensionEditor--collapseNext">
|
||||
{layerDatasource?.renderLayerSettings && (
|
||||
{DISPLAY_RANDOM_SAMPLING_SETTINGS && layerDatasource?.renderLayerSettings && (
|
||||
<NativeRenderer
|
||||
render={layerDatasource.renderLayerSettings}
|
||||
nativeProps={layerDatasourceConfigProps}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue