mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Inspect: table take full height in drawer (#21580)
This commit is contained in:
parent
7cbf3d8dab
commit
e762190616
@ -54,6 +54,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
`,
|
||||
content: css`
|
||||
padding: ${theme.spacing.md};
|
||||
height: 100%;
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
@ -10,7 +10,9 @@ interface Props {
|
||||
const getTabContentStyle = stylesFactory((theme: GrafanaTheme) => {
|
||||
return {
|
||||
tabContent: css`
|
||||
padding: ${theme.spacing.xs} 0;
|
||||
padding: ${theme.spacing.xs};
|
||||
height: 90%;
|
||||
overflow: hidden;
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
@ -136,7 +136,7 @@ export class PanelInspector extends PureComponent<Props, State> {
|
||||
return <metaDS.components.MetadataInspector datasource={metaDS} data={data} />;
|
||||
}
|
||||
|
||||
renderDataTab(width: number) {
|
||||
renderDataTab(width: number, height: number) {
|
||||
const { data, selected } = this.state;
|
||||
const styles = getStyles();
|
||||
if (!data || !data.length) {
|
||||
@ -177,7 +177,7 @@ export class PanelInspector extends PureComponent<Props, State> {
|
||||
</Forms.Button>
|
||||
</div>
|
||||
</div>
|
||||
<Table width={width} height={400} data={processed[selected]} />
|
||||
<Table width={width} height={height} data={processed[selected]} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -211,14 +211,15 @@ export class PanelInspector extends PureComponent<Props, State> {
|
||||
})}
|
||||
</TabsBar>
|
||||
<TabContent>
|
||||
<AutoSizer disableHeight>
|
||||
{({ width }) => {
|
||||
<AutoSizer>
|
||||
{({ width, height }) => {
|
||||
if (width === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ width }}>
|
||||
{tab === InspectTab.Data && this.renderDataTab(width)}
|
||||
{tab === InspectTab.Data && this.renderDataTab(width, height)}
|
||||
|
||||
{tab === InspectTab.Meta && this.renderMetadataInspector()}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user