-
Notifications
You must be signed in to change notification settings - Fork 939
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
[Discover]Sample Queries and Saved Queries in No Results Page #8616
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
feat: | ||
- Adds sample queries and saved queries to Discover no results page ([#8616](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8616)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,11 @@ export interface EditorEnhancements { | |
queryEditorExtension?: QueryEditorExtensionConfig; | ||
} | ||
|
||
export interface SampleQuery { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated to this PR, unless we want to modify the type from recent query kind of acts the same and so does saved queries. so if we have a base class we could re-use it everywhere. not sure of a good name though but an example to drive the point home like |
||
title: string; | ||
query: string; | ||
} | ||
|
||
export interface LanguageConfig { | ||
id: string; | ||
title: string; | ||
|
@@ -53,4 +58,5 @@ export interface LanguageConfig { | |
editorSupportedAppNames?: string[]; | ||
supportedAppNames?: string[]; | ||
hideDatePicker?: boolean; | ||
sampleQueries?: SampleQuery[]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
.discoverNoResults-sampleContainer { | ||
@include euiLegibilityMaxWidth(100%); | ||
|
||
margin: 0 auto; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not be specific about the return value being an array of title-query combos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, i think maybe we should consider just returning an actual
Query
object and not the query string.