Merge pull request #1164 from palash-signoz/393-error-expection-tooltip

feat: tooltip is added in the error message and error type
This commit is contained in:
palash-signoz 2022-05-19 15:19:45 +05:30 committed by GitHub
commit f2074f01e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { notification, Table, Typography } from 'antd'; import { notification, Table, Tooltip, Typography } from 'antd';
import { ColumnsType } from 'antd/lib/table'; import { ColumnsType } from 'antd/lib/table';
import getAll from 'api/errors/getAll'; import getAll from 'api/errors/getAll';
import ROUTES from 'constants/routes'; import ROUTES from 'constants/routes';
@ -47,11 +47,13 @@ function AllErrors(): JSX.Element {
dataIndex: 'exceptionType', dataIndex: 'exceptionType',
key: 'exceptionType', key: 'exceptionType',
render: (value, record): JSX.Element => ( render: (value, record): JSX.Element => (
<Tooltip overlay={(): JSX.Element => value}>
<Link <Link
to={`${ROUTES.ERROR_DETAIL}?serviceName=${record.serviceName}&errorType=${record.exceptionType}`} to={`${ROUTES.ERROR_DETAIL}?serviceName=${record.serviceName}&errorType=${record.exceptionType}`}
> >
{value} {value}
</Link> </Link>
</Tooltip>
), ),
sorter: (a, b): number => sorter: (a, b): number =>
a.exceptionType.charCodeAt(0) - b.exceptionType.charCodeAt(0), a.exceptionType.charCodeAt(0) - b.exceptionType.charCodeAt(0),
@ -61,6 +63,7 @@ function AllErrors(): JSX.Element {
dataIndex: 'exceptionMessage', dataIndex: 'exceptionMessage',
key: 'exceptionMessage', key: 'exceptionMessage',
render: (value): JSX.Element => ( render: (value): JSX.Element => (
<Tooltip overlay={(): JSX.Element => value}>
<Typography.Paragraph <Typography.Paragraph
ellipsis={{ ellipsis={{
rows: 2, rows: 2,
@ -68,6 +71,7 @@ function AllErrors(): JSX.Element {
> >
{value} {value}
</Typography.Paragraph> </Typography.Paragraph>
</Tooltip>
), ),
}, },
{ {