fix issue with raw results in the modal

This commit is contained in:
alexandra vargas
2026-01-08 14:41:27 +01:00
parent 06d11d739b
commit e4009a42a1
@@ -128,7 +128,7 @@ export const CompatibilityModal = ({ isOpen, onDismiss, dashboardJson, datasourc
</Text>
<Text element="p">
<pre>{JSON.stringify(result, null, 2)}</pre>
<pre className={styles.jsonPreview}>{JSON.stringify(result, null, 2)}</pre>
</Text>
</div>
@@ -186,5 +186,15 @@ function getStyles(theme: GrafanaTheme2) {
alignItems: 'center',
justifyContent: 'center',
}),
jsonPreview: css({
maxHeight: '400px',
overflow: 'auto',
padding: theme.spacing(2),
backgroundColor: theme.colors.background.secondary,
borderRadius: theme.shape.radius.default,
fontSize: theme.typography.bodySmall.fontSize,
whiteSpace: 'pre-wrap',
wordBreak: 'break-word',
}),
};
}