-
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.
[FEATURE] Add loading state for all tables visualizations on overview…
… page (opensearch-project#237) (opensearch-project#238) * [FEATURE] Add loading state for all tables/visualizations on Overview page opensearch-project#118 Signed-off-by: Jovan Cvetkovic <[email protected]> * [FEATURE] Add loading state for all tables/visualizations on Overview page opensearch-project#118 Signed-off-by: Jovan Cvetkovic <[email protected]> Signed-off-by: Jovan Cvetkovic <[email protected]> (cherry picked from commit b5f752b) Co-authored-by: Jovan Cvetkovic <[email protected]> Signed-off-by: AWSHurneyt <[email protected]>
- Loading branch information
1 parent
d142dfa
commit 47b1ecc
Showing
11 changed files
with
93 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.chart-view-container { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
|
||
.chart-view-container-mask { | ||
width: 100%; | ||
height: 100%; | ||
background: white; | ||
opacity: 0.5; | ||
position: absolute; | ||
} | ||
|
||
.chart-view-container-loading { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
z-index: 1; | ||
} | ||
} |
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,21 @@ | ||
import React from 'react'; | ||
import { EuiLoadingChart } from '@elastic/eui'; | ||
|
||
interface ChartContainerProps { | ||
loading?: boolean; | ||
chartViewId: string; | ||
} | ||
|
||
export const ChartContainer: React.FC<ChartContainerProps> = ({ chartViewId, loading = false }) => { | ||
return ( | ||
<div className="chart-view-container"> | ||
{loading && ( | ||
<> | ||
<EuiLoadingChart size="xl" className="chart-view-container-loading" /> | ||
<div className="chart-view-container-mask"></div> | ||
</> | ||
)} | ||
<div id={chartViewId}></div> | ||
</div> | ||
); | ||
}; |
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
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