Skip to content
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

Revert "Merge feature/explorer-query-assistant to main" #1358

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions common/constants/data_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

export const DATA_SOURCE_NAME_URL_PARAM_KEY = 'datasourceName';
export const DATA_SOURCE_TYPE_URL_PARAM_KEY = 'datasourceType';
export const OLLY_QUESTION_URL_PARAM_KEY = 'olly_q';
export const INDEX_URL_PARAM_KEY = 'indexPattern';
export const DEFAULT_DATA_SOURCE_TYPE = 'DEFAULT_INDEX_PATTERNS';
export const DEFAULT_DATA_SOURCE_NAME = 'Default cluster';
export const DEFAULT_DATA_SOURCE_OBSERVABILITY_DISPLAY_NAME = 'OpenSearch';
Expand Down
1 change: 0 additions & 1 deletion common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const RAW_QUERY = 'rawQuery';
export const FINAL_QUERY = 'finalQuery';
export const SELECTED_DATE_RANGE = 'selectedDateRange';
export const INDEX = 'index';
export const OLLY_QUERY_ASSISTANT = 'ollyQueryAssistant';
export const SELECTED_PATTERN_FIELD = 'selectedPatternField';
export const PATTERN_REGEX = 'patternRegex';
export const FILTERED_PATTERN = 'filteredPattern';
Expand Down
12 changes: 0 additions & 12 deletions common/constants/query_assist.ts

This file was deleted.

3 changes: 0 additions & 3 deletions common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,3 @@ export const S3_DATASOURCE_TYPE = 'S3_DATASOURCE';
export const ASYNC_QUERY_SESSION_ID = 'async-query-session-id';

export const DIRECT_DUMMY_QUERY = 'select 1';

export const QUERY_ASSISTANT_FIXED_START_TIME = 'now-40y';
export const QUERY_ASSISTANT_FIXED_END_TIME = 'now';
8 changes: 5 additions & 3 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"urlForwarding",
"visualizations"
],
"optionalPlugins": ["managementOverview", "assistantDashboards"],
"configPath": ["observability"]
}
"optionalPlugins": [
"managementOverview",
"assistantDashboards"
]
}
Binary file added public/.DS_Store
Binary file not shown.
12 changes: 6 additions & 6 deletions public/components/common/live_tail/live_tail_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

// Define pop over interval options for live tail button in your plugin
//Define pop over interval options for live tail button in your plugin

Check failure on line 6 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Expected exception block, space or tab after '//' in comment

import { EuiButton } from '@elastic/eui';
import React, { useMemo } from 'react';
import { LiveTailProps } from 'common/types/explorer';
import { EuiButton } from "@elastic/eui";

Check failure on line 8 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `"@elastic/eui"` with `'@elastic/eui'`
import React, { useMemo } from "react";

Check failure on line 9 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `"react"` with `'react'`
import { LiveTailProps } from "common/types/explorer";

Check failure on line 10 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `"common/types/explorer"` with `'common/types/explorer'`

// Live Tail Button
//Live Tail Button

Check failure on line 12 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Expected exception block, space or tab after '//' in comment
export const LiveTailButton = ({
isLiveTailOn,
isLiveTailPopoverOpen,
Expand All @@ -20,7 +20,7 @@
const liveButton = useMemo(() => {
return (
<EuiButton
iconType={isLiveTailOn ? 'stop' : 'clock'}
iconType={isLiveTailOn ? "stop" : "play"}

Check failure on line 23 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `"stop"·:·"play"` with `'stop'·:·'play'`
iconSide="left"
onClick={() => setIsLiveTailPopoverOpen(!isLiveTailPopoverOpen)}
data-test-subj={dataTestSubj}
Expand All @@ -28,11 +28,11 @@
{liveTailName}
</EuiButton>
);
}, [isLiveTailPopoverOpen, isLiveTailOn]);

Check warning on line 31 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useMemo has missing dependencies: 'dataTestSubj', 'liveTailName', and 'setIsLiveTailPopoverOpen'. Either include them or remove the dependency array. If 'setIsLiveTailPopoverOpen' changes too often, find the parent component that defines it and wrap that definition in useCallback
return liveButton;
};

export const StopLiveButton = (props: any) => {

Check warning on line 35 in public/components/common/live_tail/live_tail_button.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const { StopLive, dataTestSubj } = props;

const stopButton = () => {
Expand Down
58 changes: 13 additions & 45 deletions public/components/common/search/date_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,25 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { EuiSuperDatePicker, EuiToolTip } from '@elastic/eui';
import React, { useEffect } from 'react';
import { uiSettingsService } from '../../../../common/utils';
import { coreRefs } from '../../../framework/core_refs';
import React from 'react';
import { EuiSuperDatePicker } from '@elastic/eui';
import { IDatePickerProps } from './search';
import {
QUERY_ASSISTANT_FIXED_END_TIME,
QUERY_ASSISTANT_FIXED_START_TIME,
} from '../../../../common/constants/shared';
import { uiSettingsService } from '../../../../common/utils';

export function DatePicker(props: IDatePickerProps) {
const {
startTime,
endTime,
handleTimePickerChange,
handleTimeRangePickerRefresh,
isAppAnalytics,
} = props;
const { startTime, endTime, handleTimePickerChange, handleTimeRangePickerRefresh } = props;

const handleTimeChange = (e: any) => handleTimePickerChange([e.start, e.end]);
const allowTimeChanging = !coreRefs.queryAssistEnabled || isAppAnalytics;

// set the time range to be 40 years rather than the standard 15 minutes if using query assistant
useEffect(() => {
if (!allowTimeChanging) {
handleTimePickerChange([QUERY_ASSISTANT_FIXED_START_TIME, QUERY_ASSISTANT_FIXED_END_TIME]);
}
}, []);

return (
<>
<EuiToolTip
position="bottom"
content={
allowTimeChanging
? false
: 'Date range has been disabled to accomodate timerange of all datasets'
}
>
<EuiSuperDatePicker
data-test-subj="pplSearchDatePicker"
start={allowTimeChanging ? startTime : QUERY_ASSISTANT_FIXED_START_TIME}
end={allowTimeChanging ? endTime : QUERY_ASSISTANT_FIXED_END_TIME}
dateFormat={uiSettingsService.get('dateFormat')}
onTimeChange={handleTimeChange}
onRefresh={handleTimeRangePickerRefresh}
className="osdQueryBar__datePicker"
showUpdateButton={false}
isDisabled={!allowTimeChanging}
/>
</EuiToolTip>
</>
<EuiSuperDatePicker
data-test-subj="pplSearchDatePicker"
start={startTime}
end={endTime}
dateFormat={uiSettingsService.get('dateFormat')}
onTimeChange={handleTimeChange}
onRefresh={handleTimeRangePickerRefresh}
className="osdQueryBar__datePicker"
/>
);
}
81 changes: 0 additions & 81 deletions public/components/common/search/query_area.tsx

This file was deleted.

111 changes: 0 additions & 111 deletions public/components/common/search/query_assist_summarization.tsx

This file was deleted.

Loading
Loading