mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 09:34:27 +08:00
ShareDrawer: Export as JSON code editor fix (#93593)
This commit is contained in:
@ -36,7 +36,7 @@ describe('Export as JSON', () => {
|
||||
// Export as JSON
|
||||
e2e.pages.ExportDashboardDrawer.ExportAsJson.container().should('be.visible');
|
||||
e2e.pages.ExportDashboardDrawer.ExportAsJson.exportExternallyToggle().should('not.be.checked');
|
||||
e2e.pages.ExportDashboardDrawer.ExportAsJson.codeEditor().should('exist');
|
||||
e2e.components.CodeEditor.container().should('exist');
|
||||
|
||||
e2e.pages.ExportDashboardDrawer.ExportAsJson.saveToFileButton().should('exist');
|
||||
e2e.pages.ExportDashboardDrawer.ExportAsJson.copyToClipboardButton().should('exist');
|
||||
|
@ -42,7 +42,7 @@ function ExportAsJsonRenderer({ model }: SceneComponentProps<ExportAsJson>) {
|
||||
const switchLabel = t('export.json.export-externally-label', 'Export the dashboard to use in another instance');
|
||||
|
||||
return (
|
||||
<div data-testid={selector.container}>
|
||||
<div data-testid={selector.container} className={styles.container}>
|
||||
<p>
|
||||
<Trans i18nKey="export.json.info-text">
|
||||
Copy or download a JSON file containing the JSON of your dashboard
|
||||
@ -78,7 +78,7 @@ function ExportAsJsonRenderer({ model }: SceneComponentProps<ExportAsJson>) {
|
||||
}}
|
||||
</AutoSizer>
|
||||
</div>
|
||||
<div className={styles.container}>
|
||||
<div className={styles.buttonsContainer}>
|
||||
<Stack gap={1} flex={1} direction={{ xs: 'column', sm: 'row' }}>
|
||||
<Button
|
||||
data-testid={selector.saveToFileButton}
|
||||
@ -113,11 +113,14 @@ function ExportAsJsonRenderer({ model }: SceneComponentProps<ExportAsJson>) {
|
||||
|
||||
function getStyles(theme: GrafanaTheme2) {
|
||||
return {
|
||||
container: css({
|
||||
height: '100%',
|
||||
}),
|
||||
codeEditorBox: css({
|
||||
margin: `${theme.spacing(2)} 0`,
|
||||
margin: `${theme.spacing(2, 0)}`,
|
||||
height: '75%',
|
||||
}),
|
||||
container: css({
|
||||
buttonsContainer: css({
|
||||
paddingBottom: theme.spacing(2),
|
||||
}),
|
||||
};
|
||||
|
Reference in New Issue
Block a user