Skip to content

Commit

Permalink
Empty Prompt changes
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Dong <[email protected]>
  • Loading branch information
danieldong51 committed Sep 11, 2024
1 parent 447db6d commit 10b578b
Showing 1 changed file with 123 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,129 @@ import { I18nProvider } from '@osd/i18n/react';

import { EuiEmptyPrompt, EuiPanel, EuiText } from '@elastic/eui';

export const DiscoverNoResults = () => {
interface Props {
timeFieldName?: string;
queryLanguage?: string;
}

export const DiscoverNoResults = ({ timeFieldName, queryLanguage }: Props) => {
// Commented out due to no usage in code
// See: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8149
//
// let luceneQueryMessage;
//
// if (queryLanguage === 'lucene') {
// const searchExamples = [
// {
// description: <EuiCode>200</EuiCode>,
// title: (
// <EuiText size="s">
// <strong>
// <FormattedMessage
// id="discover.noResults.searchExamples.anyField200StatusCodeExampleTitle"
// defaultMessage="Find requests that contain the number 200, in any field"
// />
// </strong>
// </EuiText>
// ),
// },
// {
// description: <EuiCode>status:200</EuiCode>,
// title: (
// <EuiText size="s">
// <strong>
// <FormattedMessage
// id="discover.noResults.searchExamples.statusField200StatusCodeExampleTitle"
// defaultMessage="Find 200 in the status field"
// />
// </strong>
// </EuiText>
// ),
// },
// {
// description: <EuiCode>status:[400 TO 499]</EuiCode>,
// title: (
// <EuiText size="s">
// <strong>
// <FormattedMessage
// id="discover.noResults.searchExamples.400to499StatusCodeExampleTitle"
// defaultMessage="Find all status codes between 400-499"
// />
// </strong>
// </EuiText>
// ),
// },
// {
// description: <EuiCode>status:[400 TO 499] AND extension:PHP</EuiCode>,
// title: (
// <EuiText size="s">
// <strong>
// <FormattedMessage
// id="discover.noResults.searchExamples.400to499StatusCodeWithPhpExtensionExampleTitle"
// defaultMessage="Find status codes 400-499 with the extension php"
// />
// </strong>
// </EuiText>
// ),
// },
// {
// description: <EuiCode>status:[400 TO 499] AND (extension:php OR extension:html)</EuiCode>,
// title: (
// <EuiText size="s">
// <strong>
// <FormattedMessage
// id="discover.noResults.searchExamples.400to499StatusCodeWithPhpOrHtmlExtensionExampleTitle"
// defaultMessage="Find status codes 400-499 with the extension php or html"
// />
// </strong>
// </EuiText>
// ),
// },
// ];
//
// luceneQueryMessage = (
// <Fragment>
// <EuiSpacer size="xl" />
//
// <EuiText size="s">
// <h3>
// <FormattedMessage
// id="discover.noResults.searchExamples.refineYourQueryTitle"
// defaultMessage="Refine your query"
// />
// </h3>
//
// <p>
// <FormattedMessage
// id="discover.noResults.searchExamples.howTosearchForWebServerLogsDescription"
// defaultMessage="The search bar at the top uses OpenSearch&rsquo;s support for Lucene {queryStringSyntaxLink}.
// Here are some examples of how you can search for web server logs that have been parsed into a few fields."
// values={{
// queryStringSyntaxLink: (
// <EuiLink
// target="_blank"
// href={getServices().docLinks.links.opensearch.queryDSL.base}
// >
// <FormattedMessage
// id="discover.noResults.searchExamples.queryStringSyntaxLinkText"
// defaultMessage="Query String syntax"
// />
// </EuiLink>
// ),
// }}
// />
// </p>
// </EuiText>
//
// <EuiSpacer size="m" />
//
// <EuiDescriptionList type="column" listItems={searchExamples} />
//
// <EuiSpacer size="xl" />
// </Fragment>
// );
// }

return (
<I18nProvider>
<EuiPanel hasBorder={false} hasShadow={false} color="transparent">
Expand Down

0 comments on commit 10b578b

Please sign in to comment.