forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SQL] initial commit for SQL language selector
Only adds the quick startup for OpenSearch cluster with a SQL plugin and observability with: ``` yarn opensearch snapshot --sql ``` Also, adds SQL to the language selector stolen shamelessly from opensearch-project#5623 Next steps to intercept and send to SQL API or just transform basic syntax to DSL Signed-off-by: Kawika Avilla <[email protected]> Working query enhance Signed-off-by: Kawika Avilla <[email protected]> Reget search enhance Signed-off-by: Kawika Avilla <[email protected]> data frames Signed-off-by: Kawika Avilla <[email protected]> temp state need to pass df Signed-off-by: Kawika Avilla <[email protected]> sending data frame Signed-off-by: Kawika Avilla <[email protected]> gets df type Signed-off-by: Kawika Avilla <[email protected]> add some small ui things Signed-off-by: Kawika Avilla <[email protected]> move back query language switcher Signed-off-by: Kawika Avilla <[email protected]> updating side panel Signed-off-by: Kawika Avilla <[email protected]> add ui config on query enhancement Signed-off-by: Kawika Avilla <[email protected]> support query string input Signed-off-by: Kawika Avilla <[email protected]> update to say search bar Signed-off-by: Kawika Avilla <[email protected]> update ppl to call once Signed-off-by: Kawika Avilla <[email protected]> update when fields update Signed-off-by: Kawika Avilla <[email protected]> add unknown Signed-off-by: Kawika Avilla <[email protected]>
- Loading branch information
Showing
62 changed files
with
1,080 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,7 @@ | |
}, | ||
"dependencies": { | ||
"@aws-crypto/client-node": "^3.1.1", | ||
"@elastic/datemath": "5.0.3", | ||
"@elastic/datemath": "link:packages/opensearch-datemath", | ||
"@elastic/eui": "npm:@opensearch-project/[email protected]", | ||
"@elastic/good": "^9.0.1-kibana3", | ||
"@elastic/numeral": "npm:@amoo-miki/[email protected]", | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Any modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
import { IDataFrame } from '..'; | ||
|
||
export interface DfCache { | ||
get: () => IDataFrame | undefined; | ||
set: (value: IDataFrame) => IDataFrame; | ||
clear: () => void; | ||
} | ||
|
||
export function createDataFrameCache(): DfCache { | ||
let df: IDataFrame | undefined; | ||
const cache: DfCache = { | ||
get: () => { | ||
return df; | ||
}, | ||
set: (prom: IDataFrame) => { | ||
df = prom; | ||
return prom; | ||
}, | ||
clear: () => { | ||
df = undefined; | ||
}, | ||
}; | ||
return cache; | ||
} |
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,12 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Any modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
export * from './types'; |
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,24 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Any modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
export interface IFieldType { | ||
name: string; | ||
type: string; | ||
values: any[]; | ||
count?: number; | ||
aggregatable?: boolean; | ||
filterable?: boolean; | ||
searchable?: boolean; | ||
sortable?: boolean; | ||
visualizable?: boolean; | ||
displayName?: string; | ||
format?: any; | ||
} |
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,13 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Any modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
export * from './types'; | ||
export * from './utils'; |
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,41 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Any modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
import { IFieldType } from './fields'; | ||
|
||
export * from './_df_cache'; | ||
|
||
export interface IDataFrame { | ||
name?: string; | ||
schema?: Array<Partial<IFieldType>>; | ||
fields: IFieldType[]; | ||
size: number; | ||
} | ||
|
||
export interface DataFrameAgg { | ||
key: string; | ||
value: number; | ||
} | ||
|
||
export interface PartialDataFrame extends Omit<IDataFrame, 'fields' | 'size'> { | ||
fields: Array<Partial<IFieldType>>; | ||
} | ||
|
||
/** | ||
* To be utilize with aggregations and will map to buckets | ||
* Plugins can get the aggreted value by their own logic | ||
* Setting to null will disable the aggregation if plugin wishes | ||
* In future, if the plugin doesn't intentionally set the value to null, | ||
* we can calculate the value based on the fields. | ||
*/ | ||
export interface IDataFrameWithAggs extends IDataFrame { | ||
aggs: DataFrameAgg[] | null; | ||
} |
Oops, something went wrong.