Skip to content

Commit 4e37032

Browse files
Merge pull request #6 from walterra/ml-transform-fix-messages-tab-walterra
CSS fixes to keep fixed widths instead of percentages
2 parents 3185e6c + afa5d6d commit 4e37032

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import React, { type FC } from 'react';
99
import { css } from '@emotion/react';
1010

11-
import { EuiTabbedContent } from '@elastic/eui';
11+
import { useEuiTheme, EuiTabbedContent } from '@elastic/eui';
1212

1313
import { i18n } from '@kbn/i18n';
1414
import { stringHash } from '@kbn/ml-string-hash';
@@ -30,6 +30,7 @@ interface Props {
3030
}
3131

3232
export const ExpandedRow: FC<Props> = ({ item, onAlertEdit }) => {
33+
const { euiTheme } = useEuiTheme();
3334
const tabId = stringHash(item.id);
3435

3536
const tabs = [
@@ -112,7 +113,8 @@ export const ExpandedRow: FC<Props> = ({ item, onAlertEdit }) => {
112113
onTabClick={() => {}}
113114
expand={false}
114115
css={css`
115-
width: 100%;
116+
margin-left: -${euiTheme.size.xl};
117+
width: calce(100% + ${euiTheme.size.xl});
116118
117119
.euiTable {
118120
background-color: transparent;

x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row_messages_pane.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import type { MouseEvent } from 'react';
99
import React, { useState, type FC } from 'react';
1010

11-
import type { EuiBasicTableProps } from '@elastic/eui';
11+
import { useEuiTheme, type EuiBasicTableProps } from '@elastic/eui';
1212
import { formatDate, EuiPanel, EuiBasicTable, EuiToolTip, EuiButtonIcon } from '@elastic/eui';
1313

1414
import { i18n } from '@kbn/i18n';
@@ -30,6 +30,7 @@ interface Sorting {
3030
}
3131

3232
export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ transformId }) => {
33+
const { euiTheme } = useEuiTheme();
3334
const { showNodeInfo } = useEnabledFeatures();
3435

3536
const [pageIndex, setPageIndex] = useState(0);
@@ -79,8 +80,12 @@ export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ tran
7980
) : (
8081
''
8182
),
82-
render: (message: TransformMessage) => <JobIcon message={message} />,
83-
width: '6%',
83+
render: (message: TransformMessage) => (
84+
<div css={{ marginLeft: `-${euiTheme.base * 1.75}px` }}>
85+
<JobIcon message={message} />
86+
</div>
87+
),
88+
width: euiTheme.size.xl,
8489
},
8590
{
8691
field: 'timestamp',

0 commit comments

Comments
 (0)