songjianet commented on code in PR #15163:
URL:
https://github.com/apache/dolphinscheduler/pull/15163#discussion_r1395094166
##########
dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-detail.ts:
##########
@@ -41,6 +46,27 @@ export function useDetail(getFormValues: Function) {
return JSON.stringify(json)
}
+ const testSend = async (json?: IJsonItem[]) => {
+ const values = getFormValues()
+
+ if (status.testing) return
+ status.testing = true
+ try {
+ const res = await testAlertPluginInstance({
+ pluginDefineId: values.pluginDefineId,
+ pluginInstanceParams: formatParams(json, values)
+ })
+ window.$message.success(
+ res
+ ? res.msg
+ : `${t('security.alarm_instance.test_send')} ${t('home.success')}`
+ )
+ status.testing = false
+ } catch (err) {
Review Comment:
please delete err, because it is not used.
--
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]