mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
Logs: Fix height of logs component when used with topnav (#60669)
fix height for topNav
This commit is contained in:
parent
22ad487c4b
commit
01c4783c0b
@ -1,10 +1,11 @@
|
||||
import { css } from '@emotion/css';
|
||||
import { isEqual } from 'lodash';
|
||||
import React, { memo, useState, useEffect, useRef } from 'react';
|
||||
import React, { memo, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { LogsSortOrder, AbsoluteTimeRange, TimeZone, DataQuery, GrafanaTheme2 } from '@grafana/data';
|
||||
import { AbsoluteTimeRange, DataQuery, GrafanaTheme2, LogsSortOrder, TimeZone } from '@grafana/data';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
import { Button, Icon, Spinner, useTheme2 } from '@grafana/ui';
|
||||
import { TOP_BAR_LEVEL_HEIGHT } from 'app/core/components/AppChrome/types';
|
||||
|
||||
import { LogsNavigationPages } from './LogsNavigationPages';
|
||||
|
||||
@ -188,9 +189,12 @@ function LogsNavigation({
|
||||
export default memo(LogsNavigation);
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2, oldestLogsFirst: boolean, loading: boolean) => {
|
||||
const navContainerHeight = theme.flags.topnav
|
||||
? `calc(100vh - 2*${theme.spacing(2)} - 2*${TOP_BAR_LEVEL_HEIGHT}px)`
|
||||
: '95vh';
|
||||
return {
|
||||
navContainer: css`
|
||||
max-height: 95vh;
|
||||
max-height: ${navContainerHeight};
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: ${oldestLogsFirst ? 'flex-start' : 'space-between'};
|
||||
|
Loading…
Reference in New Issue
Block a user