Skip to content

Commit

Permalink
Fix maximize chart style
Browse files Browse the repository at this point in the history
  • Loading branch information
Machi3mfl committed Jan 4, 2024
1 parent 75f16f6 commit 68c264d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@

.discoverContainer .discoverChartContainer {
min-height: 234px;
.dshLayout-isMaximizedPanel {
top: 0;
left: 0;
min-height: calc(100vh - 49px);
position: fixed;
z-index: 9999;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ const WazuhDiscover = (props: WazuhDiscoverProps) => {
setIsSearching(false);
})
}
}, [JSON.stringify(searchBarProps)]);
},
[JSON.stringify(searchBarProps),
JSON.stringify(pagination),
JSON.stringify(sorting)]);

const timeField = indexPattern?.timeFieldName ? indexPattern.timeFieldName : undefined;

Expand Down Expand Up @@ -159,11 +162,9 @@ const WazuhDiscover = (props: WazuhDiscoverProps) => {
{...searchBarProps}
showSaveQuery={true}
/>}
{isSearching ?
<LoadingSpinner /> : null}
{!isLoading && !isSearching && results?.hits?.total === 0 ?
{!isLoading && results?.hits?.total === 0 ?
<DiscoverNoResults timeFieldName={timeField} queryLanguage={''} /> : null}
{!isLoading && !isSearching && results?.hits?.total > 0 ? (
{!isLoading && results?.hits?.total > 0 ? (
<>
<EuiFlexItem grow={false} className="discoverChartContainer">
<EuiPanel hasBorder={false} hasShadow={false} color="transparent" paddingSize="none">
Expand Down Expand Up @@ -193,7 +194,7 @@ const WazuhDiscover = (props: WazuhDiscoverProps) => {
} : undefined}
/>
<EuiButtonEmpty
disabled={results?.hits?.total === 0}
disabled={results?.hits?.total === 0 || columnVisibility.visibleColumns.length === 0}
size="xs"
iconType="exportAction"
color="primary"
Expand Down

0 comments on commit 68c264d

Please sign in to comment.