mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashboardSettings: Fixing container styles for the json mode view (#33789)
This commit is contained in:
parent
9e2e7b66a1
commit
f929b29b0b
@ -27,7 +27,6 @@ export interface SettingsPage {
|
||||
title: string;
|
||||
icon: IconName;
|
||||
render: () => React.ReactNode;
|
||||
fullWidth?: boolean;
|
||||
}
|
||||
|
||||
export class DashboardSettings extends PureComponent<Props> {
|
||||
@ -99,7 +98,6 @@ export class DashboardSettings extends PureComponent<Props> {
|
||||
title: 'JSON Model',
|
||||
id: 'dashboard_json',
|
||||
icon: 'arrow',
|
||||
fullWidth: true,
|
||||
render: () => <JsonEditorSettings dashboard={dashboard} />,
|
||||
});
|
||||
|
||||
@ -172,9 +170,7 @@ export class DashboardSettings extends PureComponent<Props> {
|
||||
)}
|
||||
</div>
|
||||
</aside>
|
||||
<div className={currentPage.fullWidth ? styles.settingsContentFullWidth : styles.settingsContent}>
|
||||
{currentPage.render()}
|
||||
</div>
|
||||
<div className={styles.settingsContent}>{currentPage.render()}</div>
|
||||
</div>
|
||||
</div>
|
||||
</CustomScrollbar>
|
||||
@ -202,12 +198,4 @@ const getStyles = stylesFactory((theme: GrafanaTheme2) => ({
|
||||
background: ${theme.colors.background.primary};
|
||||
border-radius: ${theme.shape.borderRadius()};
|
||||
`,
|
||||
settingsContentFullWidth: css`
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
padding: 32px;
|
||||
min-width: 600px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
`,
|
||||
}));
|
||||
|
@ -26,7 +26,7 @@ export const JsonEditorSettings: React.FC<Props> = ({ dashboard }) => {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h3 className="dashboard-settings__header">JSON Model</h3>
|
||||
<div className="dashboard-settings__subheader">
|
||||
The JSON model below is the data structure that defines the dashboard. This includes dashboard settings, panel
|
||||
@ -53,7 +53,7 @@ export const JsonEditorSettings: React.FC<Props> = ({ dashboard }) => {
|
||||
<Button onClick={onClick}>Save changes</Button>
|
||||
</HorizontalGroup>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user