Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15] [ML]Transforms and Anomaly detection: update width for icon in messages tab to prevent overlap (#188374) #188777

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { EuiSpacer, EuiInMemoryTable, EuiButtonIcon, EuiToolTip } from '@elastic

import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { euiLightVars as theme } from '@kbn/ui-theme';
import { timeFormatter } from '@kbn/ml-date-utils';

import type { JobMessage } from '../../../../common/types/audit_message';
Expand Down Expand Up @@ -66,7 +65,7 @@ export const JobMessages: FC<JobMessagesProps> = ({
''
),
render: (message: JobMessage) => <JobIcon message={message} />,
width: `${theme.euiSizeL}`,
width: '6%',
},
{
field: 'timestamp',
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/transform/public/app/components/job_icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export const JobIcon: FC<Props> = ({ message, showTooltip = false }) => {
}

let color = 'primary';
const icon = 'warning';
let icon = 'warning';

if (message.level === INFO) {
color = 'primary';
icon = 'iInCircle';
} else if (message.level === WARNING) {
color = 'warning';
} else if (message.level === ERROR) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React, { type FC } from 'react';
import { css } from '@emotion/react';

import { EuiTabbedContent } from '@elastic/eui';
import { useEuiTheme, EuiTabbedContent } from '@elastic/eui';

import { i18n } from '@kbn/i18n';
import { stringHash } from '@kbn/ml-string-hash';
Expand All @@ -30,6 +30,7 @@ interface Props {
}

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

const tabs = [
Expand Down Expand Up @@ -112,7 +113,8 @@ export const ExpandedRow: FC<Props> = ({ item, onAlertEdit }) => {
onTabClick={() => {}}
expand={false}
css={css`
width: 100%;
margin-left: -${euiTheme.size.xl};
width: calce(100% + ${euiTheme.size.xl});

.euiTable {
background-color: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import type { MouseEvent } from 'react';
import React, { useState, type FC } from 'react';

import type { EuiBasicTableProps } from '@elastic/eui';
import { useEuiTheme, type EuiBasicTableProps } from '@elastic/eui';
import { formatDate, EuiPanel, EuiBasicTable, EuiToolTip, EuiButtonIcon } from '@elastic/eui';

import { euiLightVars as theme } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';

import { useEnabledFeatures } from '../../../../serverless_context';
Expand All @@ -31,6 +30,7 @@ interface Sorting {
}

export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ transformId }) => {
const { euiTheme } = useEuiTheme();
const { showNodeInfo } = useEnabledFeatures();

const [pageIndex, setPageIndex] = useState(0);
Expand Down Expand Up @@ -80,8 +80,12 @@ export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ tran
) : (
''
),
render: (message: TransformMessage) => <JobIcon message={message} />,
width: theme.euiSizeXL,
render: (message: TransformMessage) => (
<div css={{ marginLeft: `-${euiTheme.base * 1.75}px` }}>
<JobIcon message={message} />
</div>
),
width: euiTheme.size.xl,
},
{
field: 'timestamp',
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/transform/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"@kbn/es-query",
"@kbn/ml-agg-utils",
"@kbn/ml-string-hash",
"@kbn/ui-theme",
"@kbn/field-types",
"@kbn/ml-nested-property",
"@kbn/ml-is-defined",
Expand Down