[v10.0.x] Log Row: Fix menu styling and dimensions (#69569) (#69585)

Log Row: Fix menu styling and dimensions (#69569)

* fix wrong logrowmenu styling

* fix imports

(cherry picked from commit 9d2f4786c7)
This commit is contained in:
Sven Grossmann
2023-06-06 11:22:32 +02:00
committed by GitHub
parent 903856aa6c
commit 1d5f90b720
2 changed files with 10 additions and 15 deletions
@@ -90,16 +90,15 @@ export class LogRowMessage extends PureComponent<Props> {
</div>
</td>
<td className={cx('log-row-menu-cell', styles.logRowMenuCell)}>
<span
className={cx('log-row-menu', styles.rowMenu, {
[styles.rowMenuWithContextButton]: shouldShowContextToggle,
})}
onClick={(e) => e.stopPropagation()}
>
<span className={cx('log-row-menu', styles.rowMenu)} onClick={(e) => e.stopPropagation()}>
{shouldShowContextToggle && (
<Tooltip placement="top" content={'Show context'}>
<IconButton size="md" name="gf-show-context" onClick={this.onShowContextClick} />
</Tooltip>
<IconButton
tooltip="Show context"
tooltipPlacement="top"
size="md"
name="gf-show-context"
onClick={this.onShowContextClick}
/>
)}
<Tooltip placement="top" content={'Copy'}>
<IconButton size="md" name="copy" onClick={() => navigator.clipboard.writeText(restructuredEntry)} />
@@ -230,16 +230,12 @@ export const getLogRowStyles = memoizeOne((theme: GrafanaTheme2) => {
position: absolute;
top: 0;
bottom: auto;
height: ${theme.spacing(4.5)};
background: ${theme.colors.background.primary};
box-shadow: ${theme.shadows.z3};
padding: ${theme.spacing(0, 0, 0, 0.5)};
padding: ${theme.spacing(0.5, 0.5, 0.5, 1)};
z-index: 100;
visibility: hidden;
width: ${theme.spacing(5)};
`,
rowMenuWithContextButton: css`
width: ${theme.spacing(10)};
gap: ${theme.spacing(0.5)};
`,
logRowMenuCell: css`
position: sticky;