wolfboys commented on code in PR #3461:
URL:
https://github.com/apache/incubator-streampark/pull/3461#discussion_r1443980765
##########
streampark-console/streampark-console-webapp/src/views/flink/home/components/Modal.vue:
##########
@@ -100,13 +100,13 @@
flinkHome: formValue.flinkHome,
});
const checkResp = parseInt(resp.data);
- if (checkResp != 0) {
+ if (checkResp !== FlinkEvnEnum.FEASIBLE) {
Review Comment:
Using a switch case would be better. What do you think?
```
if (checkResp !== FlinkEvnEnum.FEASIBLE) {
switch (checkResp) {
case FlinkEvnEnum.INVALID:
Swal.fire('Failed', 'FLINK_HOME invalid path.', 'error');
break;
case FlinkEvnEnum.NAME_REPEATED:
Swal.fire('Failed',
t('setting.flinkHome.operateMessage.flinkNameIsUnique'), 'error');
break;
case FlinkEvnEnum.FLINK_DIST_REPEATED:
Swal.fire(
'Failed',
'can no found flink-dist or found multiple flink-dist,
FLINK_HOME error.',
'error',
);
}
changeOkLoading(false);
return;
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]