Skip to content

Commit

Permalink
[2.x] Backport query assist (opensearch-project#1369)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <[email protected]>
Co-authored-by: Paul Sebastian <[email protected]>
(cherry picked from commit d4d8dbc)
  • Loading branch information
joshuali925 authored and A9 Swift Project User committed Jan 24, 2024
1 parent 3149495 commit 5985367
Show file tree
Hide file tree
Showing 55 changed files with 4,003 additions and 1,747 deletions.
4 changes: 2 additions & 2 deletions auto_sync_commit_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"last_github_commit": "d9bd287277610f29fe897eb08f156a56a94e7b86",
"last_gitfarm_commit": "f0f680b16fca1d3688aee04003b167dc8d964f9f"
"last_github_commit": "d4d8dbcf61d7441598267b6a315933c5c57d32c2",
"last_gitfarm_commit": "2ed686370a1d30a80355983dd9d27a80eaae5b7f"
}
2 changes: 2 additions & 0 deletions common/constants/data_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

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: 1 addition & 0 deletions common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ 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: 12 additions & 0 deletions common/constants/query_assist.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

const QUERY_ASSIST_API_PREFIX = '/api/observability/query_assist';
export const QUERY_ASSIST_API = {
GENERATE_PPL: `${QUERY_ASSIST_API_PREFIX}/generate_ppl`,
SUMMARIZE: `${QUERY_ASSIST_API_PREFIX}/summarize`,
};

export const ML_COMMONS_API_PREFIX = '/_plugins/_ml';
4 changes: 4 additions & 0 deletions common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,7 @@ 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 DEFAULT_START_TIME = 'now-15m';
export const QUERY_ASSIST_START_TIME = 'now-40y';
export const QUERY_ASSIST_END_TIME = 'now';
8 changes: 3 additions & 5 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"urlForwarding",
"visualizations"
],
"optionalPlugins": [
"managementOverview",
"assistantDashboards"
]
}
"optionalPlugins": ["managementOverview", "assistantDashboards"],
"configPath": ["observability"]
}
Binary file removed 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

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

//Live Tail Button
// Live Tail Button
export const LiveTailButton = ({
isLiveTailOn,
isLiveTailPopoverOpen,
Expand All @@ -20,7 +20,7 @@ export const LiveTailButton = ({
const liveButton = useMemo(() => {
return (
<EuiButton
iconType={isLiveTailOn ? "stop" : "play"}
iconType={isLiveTailOn ? 'stop' : 'clock'}
iconSide="left"
onClick={() => setIsLiveTailPopoverOpen(!isLiveTailPopoverOpen)}
data-test-subj={dataTestSubj}
Expand Down
Loading

0 comments on commit 5985367

Please sign in to comment.