Skip to content

Commit

Permalink
Antd icons from V3 to V4 complete (#1702)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Resolves Icons part of #1636

## Description of the changes
- Completely upgraded the antd Icons to V4
- Modified tests to suit the V4 

## How was this change tested?
- All the changes were tested with all the required tests
- Ran the tests locally and passed

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: bupd <[email protected]>
  • Loading branch information
bupd authored Aug 20, 2023
1 parent 34d1862 commit 20d60a3
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ exports[`<Header> renders the hops selector if distanceToPathElems is provided 1
onClick={[Function]}
role="button"
>
<Icon
<ForwardRef(SearchOutlined)
className="DdgHeader--uiFindSearchIcon"
type="search"
/>
<withRouter(Connect(UnconnectedUiFindInput))
allowClear={true}
Expand Down Expand Up @@ -100,9 +99,8 @@ exports[`<Header> renders the operation selector iff a service is selected 1`] =
onClick={[Function]}
role="button"
>
<Icon
<ForwardRef(SearchOutlined)
className="DdgHeader--uiFindSearchIcon"
type="search"
/>
<withRouter(Connect(UnconnectedUiFindInput))
allowClear={true}
Expand Down Expand Up @@ -171,9 +169,8 @@ exports[`<Header> renders the operation selector iff a service is selected 2`] =
onClick={[Function]}
role="button"
>
<Icon
<ForwardRef(SearchOutlined)
className="DdgHeader--uiFindSearchIcon"
type="search"
/>
<withRouter(Connect(UnconnectedUiFindInput))
allowClear={true}
Expand Down Expand Up @@ -226,9 +223,8 @@ exports[`<Header> renders with minimal props 1`] = `
onClick={[Function]}
role="button"
>
<Icon
<ForwardRef(SearchOutlined)
className="DdgHeader--uiFindSearchIcon"
type="search"
/>
<withRouter(Connect(UnconnectedUiFindInput))
allowClear={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// limitations under the License.

import * as React from 'react';
import { Icon, Input, Tooltip } from 'antd';
import { Input, Tooltip } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import MdVisibility from 'react-icons/lib/md/visibility';
import MdVisibilityOff from 'react-icons/lib/md/visibility-off';

Expand Down Expand Up @@ -165,7 +166,7 @@ export default class Header extends React.PureComponent<TProps> {
/>
<div className="DdgHeader--findWrapper">
<div className="DdgHeader--uiFind" role="button" onClick={this.focusUiFindInput}>
<Icon className="DdgHeader--uiFindSearchIcon" type="search" />
<SearchOutlined className="DdgHeader--uiFindSearchIcon" />
<UiFindInput
allowClear
forwardedRef={this._uiFindInput}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ exports[`<OperationTableDetails> Table rendered successfully 1`] = `
title="The result of multiplying avg. duration and requests per minute, showing the most used and slowest endpoints"
transitionName="zoom-big-fast"
>
<Icon
type="info-circle"
/>
<ForwardRef(InfoCircleOutlined) />
</Tooltip>
</span>
</div>,
Expand Down Expand Up @@ -525,11 +523,12 @@ exports[`<OperationTableDetails> render No data table 1`] = `
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -547,11 +546,11 @@ exports[`<OperationTableDetails> render No data table 1`] = `
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -1086,11 +1085,12 @@ exports[`<OperationTableDetails> render P95 latency with more than 2 decimal pla
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -1108,11 +1108,11 @@ exports[`<OperationTableDetails> render P95 latency with more than 2 decimal pla
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -2058,11 +2058,12 @@ exports[`<OperationTableDetails> render error rate with more than 2 decimal plac
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -2080,11 +2081,11 @@ exports[`<OperationTableDetails> render error rate with more than 2 decimal plac
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -3030,11 +3031,12 @@ exports[`<OperationTableDetails> render lower than 0.1 P95 latency 1`] = `
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -3052,11 +3054,11 @@ exports[`<OperationTableDetails> render lower than 0.1 P95 latency 1`] = `
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -4002,11 +4004,12 @@ exports[`<OperationTableDetails> render lower than 0.1 error rate 1`] = `
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -4024,11 +4027,11 @@ exports[`<OperationTableDetails> render lower than 0.1 error rate 1`] = `
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -4974,11 +4977,12 @@ exports[`<OperationTableDetails> render lower than 0.1 request rate value 1`] =
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -4996,11 +5000,11 @@ exports[`<OperationTableDetails> render lower than 0.1 request rate value 1`] =
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -5946,11 +5950,12 @@ exports[`<OperationTableDetails> render request rate number with more than 2 dec
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -5968,11 +5973,11 @@ exports[`<OperationTableDetails> render request rate number with more than 2 dec
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -6918,11 +6923,12 @@ exports[`<OperationTableDetails> render some values in the table 1`] = `
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -6940,11 +6946,11 @@ exports[`<OperationTableDetails> render some values in the table 1`] = `
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down Expand Up @@ -7890,11 +7896,12 @@ exports[`<OperationTableDetails> test column render function 1`] = `
>
Impact
 
<i
aria-label="icon: info-circle"
<span
aria-label="info-circle"
className="anticon anticon-info-circle"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
role="img"
>
<svg
aria-hidden="true"
Expand All @@ -7912,11 +7919,11 @@ exports[`<OperationTableDetails> test column render function 1`] = `
key="svg-info-circle-svg-0"
/>
<path
d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
key="svg-info-circle-svg-1"
/>
</svg>
</i>
</span>
</span>
</div>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import * as React from 'react';
import isEqual from 'lodash/isEqual';
import { SorterResult } from 'antd/es/table';
import { Row, Table, Progress, Button, Icon, Tooltip } from 'antd';
import { Row, Table, Progress, Button, Tooltip } from 'antd';
import { InfoCircleOutlined } from '@ant-design/icons';
import REDGraph from './opsGraph';
import LoadingIndicator from '../../../common/LoadingIndicator';
import { MetricsReduxState, ServiceOpsMetrics } from '../../../../types/metrics';
Expand Down Expand Up @@ -164,7 +165,7 @@ export class OperationTableDetails extends React.PureComponent<TProps, TState> {
placement="top"
title="The result of multiplying avg. duration and requests per minute, showing the most used and slowest endpoints"
>
<Icon type="info-circle" />
<InfoCircleOutlined />
</Tooltip>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// limitations under the License.

import * as React from 'react';
import { Dropdown, Icon, Menu, Button } from 'antd';
import { Dropdown, Menu, Button } from 'antd';
import { DownOutlined } from '@ant-design/icons';
import { Link } from 'react-router-dom';
import './AltViewOptions.css';

Expand Down Expand Up @@ -117,7 +118,7 @@ export default function AltViewOptions(props: Props) {
<Dropdown overlay={menu}>
<Button className="AltViewOptions">
{`${dropdownText} `}
<Icon type="down" />
<DownOutlined />
</Button>
</Dropdown>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ exports[`AltViewOptions renders correctly 1`] = `
loading={false}
>
Trace Timeline
<Icon
type="down"
/>
<ForwardRef(DownOutlined) />
</Button>
</Dropdown>
`;
Loading

0 comments on commit 20d60a3

Please sign in to comment.