Skip to content

Commit

Permalink
removed any from explorer data
Browse files Browse the repository at this point in the history
Signed-off-by: Shankha Das <[email protected]>
  • Loading branch information
shankha-das committed Aug 2, 2022
1 parent dcf15cc commit 272013d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
21 changes: 19 additions & 2 deletions dashboards-observability/common/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,27 @@ export interface SavedVizRes {
tenant: string;
}

export interface ExplorerDataType {
jsonData: object[];
jsonDataAll: object[];
}

export interface Query {
finalQuery: string;
index: string;
isLoaded: boolean;
objectType: string;
rawQuery: string;
savedObjectId: string;
selectedDateRange: string[];
selectedTimestamp: string;
tabCreatedType: string;
}

export interface ExplorerData {
explorerData: any;
explorerData?: ExplorerDataType;
explorerFields?: IExplorerFields;
query?: any;
query?: Query;
http?: HttpSetup;
pplService?: PPLService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import React, { useCallback, useContext, useMemo } from 'react';
import React, { useCallback, useContext, useMemo, Fragment } from 'react';
import { EuiAccordion, EuiSpacer } from '@elastic/eui';
import { IConfigPanelOptionSection } from '../../../../../../../../common/types/explorer';
import { ButtonGroupItem } from './config_button_group';
Expand Down Expand Up @@ -88,10 +88,10 @@ export const ConfigLogsView = ({
};
}
return (
<React.Fragment key={`config-logs-view-${index}`}>
<Fragment key={`config-logs-view-${index}`}>
<DimensionComponent key={`viz-series-${index}`} {...params} />
<EuiSpacer size="s" />
</React.Fragment>
</Fragment>
);
}),
[schemas, vizState, handleConfigurationChange]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import React from 'react';
import React, { Fragment } from 'react';
import { EuiSpacer, EuiFormRow, EuiSwitch, htmlIdGenerator } from '@elastic/eui';

interface EUISwitch {
Expand All @@ -13,7 +13,7 @@ interface EUISwitch {
handleChange: (isChecked: boolean) => void;
}
export const ConfigSwitch: React.FC<EUISwitch> = ({ label, disabled, checked, handleChange }) => (
<React.Fragment key={`config-switch-${label}`}>
<Fragment key={`config-switch-${label}`}>
<EuiFormRow label={label}>
<EuiSwitch
id={htmlIdGenerator('switch-button')()}
Expand All @@ -26,5 +26,5 @@ export const ConfigSwitch: React.FC<EUISwitch> = ({ label, disabled, checked, ha
/>
</EuiFormRow>
<EuiSpacer size="s" />
</React.Fragment>
</Fragment>
);
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const getVizContainerProps = ({
indexFields = {},
userConfigs = {},
appData = {},
explorer = { explorerData: null },
explorer = { explorerData: { jsonData: [], jsonDataAll: [] } },
}: IVizContainerProps): IVisualizationContainerProps => {
const getVisTypeData = () => {
if (vizId === visChartTypes.Line || vizId === visChartTypes.Scatter) {
Expand Down

0 comments on commit 272013d

Please sign in to comment.