-
Notifications
You must be signed in to change notification settings - Fork 1k
[Improve] support delete flink home #2582
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
Conversation
9406a74
to
66572eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhoulii Thanks for your contribution & quick-drive
I left a few of comments. PTAL in your free time.
May the items from my limit read as follows get your @wolfboys @zhoulii confirmation ?
- If there are running jobs or sessions using the target flinkhome, it would be better not to support changing Flinkhome to avoid abnormal risks when some savepoints are triggered.
- The
delete
,update
,create
api have noApiAccess
orXXXPermission
annotations . Is here any risk ?
I'd appreciated with your confirmation.
thanks~
@@ -39,6 +42,8 @@ | |||
public class FlinkEnvServiceImpl extends ServiceImpl<FlinkEnvMapper, FlinkEnv> | |||
implements FlinkEnvService { | |||
|
|||
@Autowired private FlinkClusterService flinkClusterService; | |||
@Autowired private ApplicationService applicationService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Autowired private ApplicationService applicationService; | |
@Autowired private ApplicationService applicationService; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
LambdaQueryWrapper<Application> lambdaQueryWrapper = | ||
new LambdaQueryWrapper<Application>().eq(Application::getVersionId, flinkEnvId); | ||
return this.count(lambdaQueryWrapper) > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May here use getBaseMapper() .exists(....
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
LambdaQueryWrapper<FlinkCluster> lambdaQueryWrapper = | ||
new LambdaQueryWrapper<FlinkCluster>().eq(FlinkCluster::getVersionId, flinkEnvId); | ||
return this.count(lambdaQueryWrapper) > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as mentioned above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -18,6 +18,8 @@ export default { | |||
title: 'Flink Home', | |||
conf: 'Flink 配置', | |||
sync: '配置同步', | |||
edit: '编辑 Flink Home', | |||
delete: '确定要删除此 Flink home ?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加
-> 编辑
/ Add
->Edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to Adding and Editing Flink Home use the same modal#L169, and the title is fixed. I have limited understanding of frontend, what I can do is change the title to Add/Edit
. but maybe it's not a elegant way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhoulii Take it easy, please ~ 😁
Hi, @wangsizhu0504 Could you help take a look about this ?
Thanks a lot~
@RocMarshal Thanks for the review. I agree with you, maybe we can hanle these in another pr, and let this one focus on delete operation. what do you think? |
|
I agree with you, We can do it in next pr. |
await fetchFlinkEnvRemove(item.id); | ||
await getFlinkSetting(); | ||
createMessage.success('The current flink home is removed'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function handleDelete(item: FlinkEnv) {
const resp = await fetchFlinkEnvRemove(item.id);
if (resp.data.code == 200) {
await getFlinkSetting();
createMessage.success('The current flink home is removed');
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What changes were proposed in this pull request
Issue Number: close #2542
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts