fix: Monospacing errors in dashboards & charts (#18796)

* fix: Monospacing errors in dashboards & charts

* removed unnecessary styling
This commit is contained in:
Smart-Codi 2022-02-25 06:20:01 +00:00 committed by GitHub
parent 0db49b1a7c
commit 4923256b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,6 +113,14 @@ const RefreshOverlayWrapper = styled.div`
justify-content: center;
`;
const MonospaceDiv = styled.div`
font-family: ${({ theme }) => theme.typography.families.monospace};
white-space: pre;
word-break: break-word;
overflow-x: auto;
white-space: pre-wrap;
`;
class Chart extends React.PureComponent {
constructor(props) {
super(props);
@ -224,7 +232,7 @@ class Chart extends React.PureComponent {
key={chartId}
chartId={chartId}
error={error}
subtitle={message}
subtitle={<MonospaceDiv>{message}</MonospaceDiv>}
copyText={message}
link={queryResponse ? queryResponse.link : null}
source={dashboardId ? 'dashboard' : 'explore'}