You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/08/02 04:31:05 UTC
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #2022: fix(route): add operators
liuxiran commented on a change in pull request #2022:
URL: https://github.com/apache/apisix-dashboard/pull/2022#discussion_r680646385
##########
File path: web/src/pages/Route/components/Step1/MatchingRulesView.tsx
##########
@@ -245,30 +258,48 @@ const MatchingRulesView: React.FC<RouteModule.Step1PassProps> = ({
rules={[
{
required: true,
- message: `${formatMessage({ id: 'component.global.pleaseChoose' })} ${formatMessage({
- id: 'page.route.operationalCharacter',
- })}`,
+ message: `${formatMessage({ id: 'component.global.pleaseChoose' })} ${formatMessage(
+ {
+ id: 'page.route.operationalCharacter',
+ },
+ )}`,
},
]}
>
- <Select onChange={(e: string) => {
- switch (e) {
- case "IN":
- setOperatorValueSample(formatMessage({ id: 'page.route.advanced-match.operator.sample.IN' }))
- break
- case "~~":
- setOperatorValueSample(formatMessage({ id: 'page.route.advanced-match.operator.sample.~~' }))
- break
- default:
- setOperatorValueSample("")
- }
- }}>
+ <Select
+ onChange={(e: string) => {
+ switch (e) {
+ case 'IN':
+ setOperatorValueSample(
+ formatMessage({ id: 'page.route.advanced-match.operator.sample.IN' }),
+ );
+ break;
+ case '~~':
+ setOperatorValueSample(
+ formatMessage({ id: 'page.route.advanced-match.operator.sample.~~' }),
+ );
+ break;
+ case '~*':
+ setOperatorValueSample(
+ formatMessage({ id: 'page.route.advanced-match.operator.sample.~~' }),
+ );
Review comment:
```suggestion
case '~~':
case '~*':
setOperatorValueSample(
formatMessage({ id: 'page.route.advanced-match.operator.sample.~~' }),
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org