forked from pgadmin-org/pgadmin4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use uplot for Dashboard graphs to reduce CPU usage. pgadmin-org#5794
- Loading branch information
1 parent
a3202cc
commit d532dcc
Showing
13 changed files
with
220 additions
and
124 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
///////////////////////////////////////////////////////////// | ||
// | ||
// pgAdmin 4 - PostgreSQL Tools | ||
// | ||
// Copyright (C) 2013 - 2023, The pgAdmin Development Team | ||
// This software is released under the PostgreSQL Licence | ||
// | ||
////////////////////////////////////////////////////////////// | ||
|
||
export default function uplotOverride(theme) { | ||
return { | ||
'.uplot': { | ||
'& .u-legend': { | ||
display: 'none', | ||
} | ||
}, | ||
'.uplot-tooltip': { | ||
position: 'absolute', | ||
fontSize: '0.9em', | ||
padding: '4px 8px', | ||
borderRadius: theme.shape.borderRadius, | ||
color: theme.palette.background.default, | ||
backgroundColor: theme.palette.text.primary, | ||
|
||
'& .uplot-tooltip-label': { | ||
display: 'flex', | ||
gap: '4px', | ||
alignItems: 'center', | ||
} | ||
} | ||
}; | ||
} |
Oops, something went wrong.