-
Notifications
You must be signed in to change notification settings - Fork 919
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
Fix No data selected appearance #8668
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,14 +77,22 @@ | |
gutterSize="none" | ||
className="defaultEditor__footerRow" | ||
> | ||
{footerItems.start?.map((item) => ( | ||
<EuiFlexItem grow={false} className="defaultEditor__footerItem"> | ||
{footerItems.start?.map((item, idx) => ( | ||
<EuiFlexItem | ||
key={`defaultEditor__footerItem-start-${idx}`} | ||
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. Just added key to get rid of react warning. |
||
grow={false} | ||
className="defaultEditor__footerItem" | ||
> | ||
{item} | ||
</EuiFlexItem> | ||
))} | ||
<EuiFlexItem grow /> | ||
{footerItems.end?.map((item) => ( | ||
<EuiFlexItem grow={false} className="defaultEditor__footerItem"> | ||
{footerItems.end?.map((item, idx) => ( | ||
<EuiFlexItem | ||
key={`defaultEditor__footerItem-end-${idx}`} | ||
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. Just added key to get rid of react warning. |
||
grow={false} | ||
className="defaultEditor__footerItem" | ||
> | ||
{item} | ||
</EuiFlexItem> | ||
))} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,6 @@ export const QueryLanguageSelector = (props: QueryLanguageSelectorProps) => { | |
button={ | ||
<EuiSmallButtonEmpty | ||
iconSide="right" | ||
iconSize="s" | ||
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. EuiSmallButtonEmpty doesn't handle it, even tough it claims to do. |
||
onClick={onButtonClick} | ||
className="languageSelector__button" | ||
iconType="arrowDown" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
*/ | ||
|
||
import React, { useEffect, useState, useRef, useCallback } from 'react'; | ||
import { EuiPanel } from '@elastic/eui'; | ||
import { EuiPanel, EuiSpacer } from '@elastic/eui'; | ||
import { TopNav } from './top_nav'; | ||
import { ViewProps } from '../../../../../data_explorer/public'; | ||
import { DiscoverTable } from './discover_table'; | ||
|
@@ -143,41 +143,47 @@ | |
showSaveQuery={showSaveQuery} | ||
/> | ||
|
||
{!indexPattern && <DiscoverNoIndexPatterns />} | ||
<> | ||
{fetchState.status === ResultStatus.NO_RESULTS && ( | ||
<DiscoverNoResults | ||
queryString={data.query.queryString} | ||
query={data.query.queryString.getQuery()} | ||
savedQuery={data.query.savedQueries} | ||
timeFieldName={timeField} | ||
/> | ||
)} | ||
{fetchState.status === ResultStatus.ERROR && ( | ||
<DiscoverNoResults | ||
queryString={data.query.queryString} | ||
query={data.query.queryString.getQuery()} | ||
savedQuery={data.query.savedQueries} | ||
timeFieldName={timeField} | ||
/> | ||
)} | ||
{fetchState.status === ResultStatus.UNINITIALIZED && ( | ||
<DiscoverUninitialized onRefresh={() => refetch$.next()} /> | ||
)} | ||
{fetchState.status === ResultStatus.LOADING && <LoadingSpinner />} | ||
{fetchState.status === ResultStatus.READY && isEnhancementsEnabled && ( | ||
<> | ||
<MemoizedDiscoverChartContainer {...fetchState} /> | ||
<MemoizedDiscoverTable rows={rows} scrollToTop={scrollToTop} /> | ||
</> | ||
)} | ||
{fetchState.status === ResultStatus.READY && !isEnhancementsEnabled && ( | ||
<EuiPanel hasShadow={false} paddingSize="none" className="dscCanvas_results"> | ||
<MemoizedDiscoverChartContainer {...fetchState} /> | ||
<MemoizedDiscoverTable rows={rows} scrollToTop={scrollToTop} /> | ||
</EuiPanel> | ||
)} | ||
</> | ||
{indexPattern ? ( | ||
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. Added the else to stop showing the spinner. |
||
<> | ||
{fetchState.status === ResultStatus.NO_RESULTS && ( | ||
<DiscoverNoResults | ||
queryString={data.query.queryString} | ||
query={data.query.queryString.getQuery()} | ||
savedQuery={data.query.savedQueries} | ||
timeFieldName={timeField} | ||
/> | ||
)} | ||
{fetchState.status === ResultStatus.ERROR && ( | ||
<DiscoverNoResults | ||
queryString={data.query.queryString} | ||
query={data.query.queryString.getQuery()} | ||
savedQuery={data.query.savedQueries} | ||
timeFieldName={timeField} | ||
/> | ||
)} | ||
{fetchState.status === ResultStatus.UNINITIALIZED && ( | ||
<DiscoverUninitialized onRefresh={() => refetch$.next()} /> | ||
)} | ||
{fetchState.status === ResultStatus.LOADING && <LoadingSpinner />} | ||
{fetchState.status === ResultStatus.READY && isEnhancementsEnabled && ( | ||
<> | ||
<MemoizedDiscoverChartContainer {...fetchState} /> | ||
<MemoizedDiscoverTable rows={rows} scrollToTop={scrollToTop} /> | ||
</> | ||
)} | ||
{fetchState.status === ResultStatus.READY && !isEnhancementsEnabled && ( | ||
<EuiPanel hasShadow={false} paddingSize="none" className="dscCanvas_results"> | ||
<MemoizedDiscoverChartContainer {...fetchState} /> | ||
<MemoizedDiscoverTable rows={rows} scrollToTop={scrollToTop} /> | ||
</EuiPanel> | ||
)} | ||
</> | ||
) : ( | ||
<> | ||
<EuiSpacer size="xxl" /> | ||
<DiscoverNoIndexPatterns /> | ||
</> | ||
)} | ||
</EuiPanel> | ||
); | ||
} | ||
|
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.
Needed to make the no-index-pattern state to pass through.