From d144f48ed7be609af4332d16a7d4768019c29fe4 Mon Sep 17 00:00:00 2001 From: xujiaqiang <54771125+xujiaqiang@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:56:37 +0800 Subject: [PATCH] [Feature-15248][dolphinscheduler-alert-plugins] add alert plugin aliyun-voice (#15248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add alert aliyun-voice * VoiceParam replace these with lombok @Data * security.ts add alarm_instance params * optimize alert aliyun vocie code * Merge Code * rollback pnpm-lock.yaml to branch :origin/dev version * add the doc about the new plugin * add com.aliyun.dyvmsapi20170525 version 2.14 * completed * run mvn spotless:apply * Code optimization * Change to @Data * Code specification optimization * add com.aliyund.yvmsapi20170525.jar license * modify com.aliyund.yvmsapi20170525.jar license * modify com.aliyund.yvmsapi20170525.jar license * add aliyun-vocie licenses * add aliyun-voice link to docsdev.js * modify vocie module to aliyunVoice * add lisense --------- Co-authored-by: xujiaqiang <“xujiaqiangwz@163.com”> Co-authored-by: 旺阳 Co-authored-by: David Zollo --- docs/configs/docsdev.js | 7 + docs/docs/en/guide/alert/aliyun-voice.md | 32 +++ docs/docs/zh/guide/alert/aliyun-voice.md | 32 +++ docs/img/alert/aliyun-vocie-form-example.png | Bin 0 -> 24249 bytes .../pom.xml | 40 ++++ .../plugin/alert/voice/VoiceAlertChannel.java | 70 ++++++ .../alert/voice/VoiceAlertChannelFactory.java | 95 ++++++++ .../alert/voice/VoiceAlertConstants.java | 79 +++++++ .../plugin/alert/voice/VoiceParam.java | 74 +++++++ .../plugin/alert/voice/VoiceSender.java | 101 +++++++++ .../java/VoiceAlertChannelFactoryTest.java | 47 ++++ .../src/test/java/VoiceSenderTest.java | 52 +++++ .../dolphinscheduler-alert-all/pom.xml | 6 +- .../alert/api/AlertInputTips.java | 7 + .../dolphinscheduler-alert-plugins/pom.xml | 1 + dolphinscheduler-bom/pom.xml | 7 +- dolphinscheduler-dist/release-docs/LICENSE | 17 +- .../licenses/LICENSE-dyvmsapi20170525.txt | 202 ++++++++++++++++++ .../src/locales/en_US/security.ts | 6 + .../src/locales/zh_CN/security.ts | 6 + tools/dependencies/known-dependencies.txt | 16 +- 21 files changed, 893 insertions(+), 4 deletions(-) create mode 100644 docs/docs/en/guide/alert/aliyun-voice.md create mode 100644 docs/docs/zh/guide/alert/aliyun-voice.md create mode 100644 docs/img/alert/aliyun-vocie-form-example.png create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/pom.xml create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannel.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannelFactory.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertConstants.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceParam.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceSender.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceAlertChannelFactoryTest.java create mode 100644 dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceSenderTest.java create mode 100644 dolphinscheduler-dist/release-docs/licenses/LICENSE-dyvmsapi20170525.txt diff --git a/docs/configs/docsdev.js b/docs/configs/docsdev.js index d94250e9af..bc08fc9c79 100644 --- a/docs/configs/docsdev.js +++ b/docs/configs/docsdev.js @@ -407,6 +407,9 @@ export default { { title: 'Slack', link: '/en-us/docs/dev/user_doc/guide/alert/slack.html', + },{ + title: 'Aliyun Voice', + link: '/en-us/docs/dev/user_doc/guide/alert/aliyun-voice.html', }, ], }, @@ -1121,6 +1124,10 @@ export default { title: 'Slack告警', link: '/zh-cn/docs/dev/user_doc/guide/alert/slack.html', }, + { + title: '阿里云语音告警', + link: '/zh-cn/docs/dev/user_doc/guide/alert/aliyun-voice.html', + }, ], }, { diff --git a/docs/docs/en/guide/alert/aliyun-voice.md b/docs/docs/en/guide/alert/aliyun-voice.md new file mode 100644 index 0000000000..332b6fddae --- /dev/null +++ b/docs/docs/en/guide/alert/aliyun-voice.md @@ -0,0 +1,32 @@ +# Alibaba Cloud - Voice alarm + +If you need to use `Voice` for alerting, create an alert instance in the alert instance management and select the `Voice` plugin. + +## 参数配置 + +* Called number + + > Called display number + +* Call display number + + > The number for receiving voice notifications + +* VoiceCode + + > Voice ID of the VoiceCode + +* accessKeyId + + > Your AccessKey ID + +* accessKeySecret + + > Your AccessKey Secret + +### example + +Voice notification Sends a voice notification of the file type to a specified number。 +The following shows the `voice` configuration example: + +![enterprise-wechat-app-msg-config](../../../../img/alert/aliyun-vocie-form-example.png) diff --git a/docs/docs/zh/guide/alert/aliyun-voice.md b/docs/docs/zh/guide/alert/aliyun-voice.md new file mode 100644 index 0000000000..f9dcce349b --- /dev/null +++ b/docs/docs/zh/guide/alert/aliyun-voice.md @@ -0,0 +1,32 @@ +# 阿里云-语音告警 + +如果您需要使用到`语音`(阿里云)进行告警,请在告警实例管理里创建告警实例,选择`语音`插件。 + +## 参数配置 + +* 被叫电话号码 + + > 被叫显示号 + +* 呼叫显示号码 + + > 接收语音通知的号码 + +* 语音模板 + + > 语音通知文件的语音ID + +* accessKeyId + + > 您的 AccessKey ID + +* accessKeySecret + + > 您的 AccessKey Secret + +### 阿里云-语音告警示例 + +向指定号码发送语音通知文件类型的语音通知。 +下图是告警配置的示例: + +![enterprise-wechat-app-msg-config](../../../../img/alert/aliyun-vocie-form-example.png) diff --git a/docs/img/alert/aliyun-vocie-form-example.png b/docs/img/alert/aliyun-vocie-form-example.png new file mode 100644 index 0000000000000000000000000000000000000000..626e7242433458df5b1cc8065a66f9980d831562 GIT binary patch literal 24249 zcmdSB30#u--Z$)YPScs3rp={tn|9O8v2so2Or=hlI$CB5%7mGjpdqQb(kxA>DPwM# z3nxu2O$bd86=*}s1*S|PK`b{?LsA431fD-O&6#tabHDd}?)Uz@&-42ERF`yd{rBJU z{eFK}#<#v+E0%9quBWHB;?Oq-1N8KkkinmszkCWlvF#`-1pj=33GmvlM_`+dgJ1p} z`L)m2dU_sCPqXSZ%Jy!c9LMl(~eM-9iHn)FRk=*ok@v}Vvm;dUS z@!-qRrHLHZs533=zjFH(wddElsvr3g2i{aXNH|H^XDxDZ4?=T8xh)D|jr^6UG~V4} zyv`-1K4oAsEV_uJ=_7=)7_#?|jjQ>Xu!G=d0TE>vta)$774Tyk-)BP&j0)Xuoh6=^8hhv-@bjJI5m?`j=0J34!C*^* zxarX1V=bjGydika98N3FE#wd0(9?T;g(mBR90?+7hQ8^nN9gN4@I6S)PK;^f5st>x zE!k(xG}60RmVw(^x-ap~Hyw+2uuqXtohTzdH4a+9v&yv5)7!U}DbMv{ON{yQnjOgD zQ0U^fqOwrX7|Jx^!?pW&8qht~=xfqaz3*24S1(a*apL~jTwGczWIDbXJ={J!-YO{;Dl{v7Ij+)o z8uIY_DqDyE-&?u|6@ruw^gS+jQQY+IbW_nJ+2K@G2S*SvS6StA$PMK-T6pw)cIYHS-Qg`@n|BGR5aiioPf(t4& zyo8*1eQ1{<#?$$Wy2CTKd1EA$GD-QOoHcSIJk>QvoYd_cM6erasY|QtGUUqz8@Wd7 z3tl9^Qc~Y40>k&)6BvnV$@e}}Ux#7#VP&Rrh3oDc#(K>I#XHHEDiH;e%uPS}%7fHx zKXOAA$1SlYW4LRgBwkRYmdRMKh{<_oFPhiB7ph{cPvkoJ!Qb|$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roy=M0PD;&bHd;pX9u=2ABlT!cIid?s>B+@8;$ z1^){*I*f2OMEu#iNJR^Gcr#Hv_$z7({ZF^5mXS-1zoA^1kJI()yqc>`Lnj&4ScE#h zRY*@GwMk%9wt>x>!G;KOp}li&|&r3P2yw9>JPMxAo)X+M2-^e9JU$8aNMhj zB`0W3E%%dzGW>;W+gEMCbj`Q@tbXWJNuO{#8bFMbzTD1vS9hrXw0aOd_&xfW(E=cO z`KuDCgMx{b)H@dFS=H?o$I@T4LJu#)VJcxRSoGaS6!H P + + + 4.0.0 + + org.apache.dolphinscheduler + dolphinscheduler-alert-plugins + dev-SNAPSHOT + + + dolphinscheduler-alert-aliyunVoice + jar + + + + org.apache.dolphinscheduler + dolphinscheduler-alert-api + + + com.aliyun + dyvmsapi20170525 + + + diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannel.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannel.java new file mode 100644 index 0000000000..eeaaba5d01 --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannel.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dolphinscheduler.plugin.alert.voice; + +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_ACCESS_KEY_ID; +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_ACCESS_KEY_SECRET; +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_ADDRESS; +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_CALLED_NUMBER; +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_CALLED_SHOW_NUMBER; +import static org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertConstants.NAME_TTS_CODE; + +import org.apache.dolphinscheduler.alert.api.AlertChannel; +import org.apache.dolphinscheduler.alert.api.AlertInfo; +import org.apache.dolphinscheduler.alert.api.AlertResult; + +import java.util.Map; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public final class VoiceAlertChannel implements AlertChannel { + + @Override + public AlertResult process(AlertInfo info) { + + Map paramsMap = info.getAlertParams(); + if (null == paramsMap) { + return new AlertResult("false", "aliyun-voice params is null"); + } + VoiceParam voiceParam = buildVoiceParam(paramsMap); + return new VoiceSender(voiceParam).send(); + } + + public VoiceParam buildVoiceParam(Map paramsMap) { + String calledNumber = paramsMap.get(NAME_CALLED_NUMBER); + String calledShowNumber = paramsMap.get(NAME_CALLED_SHOW_NUMBER); + String ttsCode = paramsMap.get(NAME_TTS_CODE); + VoiceParam param = new VoiceParam(); + param.setCalledNumber(calledNumber); + param.setCalledShowNumber(calledShowNumber); + param.setTtsCode(ttsCode); + VoiceParam.Connection connection = new VoiceParam.Connection(); + String address = paramsMap.get(NAME_ADDRESS); + String accessKeyId = paramsMap.get(NAME_ACCESS_KEY_ID); + String accessKeySecret = paramsMap.get(NAME_ACCESS_KEY_SECRET); + connection.setAddress(address); + connection.setAccessKeyId(accessKeyId); + connection.setAccessKeySecret(accessKeySecret); + param.setConnection(connection); + + // set callback ID + param.setOutId(calledShowNumber); + return param; + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannelFactory.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannelFactory.java new file mode 100644 index 0000000000..2fb5820e37 --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertChannelFactory.java @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dolphinscheduler.plugin.alert.voice; + +import org.apache.dolphinscheduler.alert.api.AlertChannel; +import org.apache.dolphinscheduler.alert.api.AlertChannelFactory; +import org.apache.dolphinscheduler.alert.api.AlertInputTips; +import org.apache.dolphinscheduler.spi.params.base.PluginParams; +import org.apache.dolphinscheduler.spi.params.base.Validate; +import org.apache.dolphinscheduler.spi.params.input.InputParam; + +import java.util.Arrays; +import java.util.List; + +import com.google.auto.service.AutoService; + +@AutoService(AlertChannelFactory.class) +public final class VoiceAlertChannelFactory implements AlertChannelFactory { + + @Override + public String name() { + return "AliyunVoice"; + } + + @Override + public List params() { + + InputParam calledNumber = + InputParam.newBuilder(VoiceAlertConstants.NAME_CALLED_NUMBER, VoiceAlertConstants.CALLED_NUMBER) + .setPlaceholder(AlertInputTips.CALLED_NUMBER.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(true) + .build()) + .build(); + + InputParam calledShowNumber = InputParam + .newBuilder(VoiceAlertConstants.NAME_CALLED_SHOW_NUMBER, VoiceAlertConstants.CALLED_SHOW_NUMBER) + .setPlaceholder(AlertInputTips.CALLED_SHOW_NUMBER.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(false) + .build()) + .build(); + + InputParam ttsCode = InputParam.newBuilder(VoiceAlertConstants.NAME_TTS_CODE, VoiceAlertConstants.TTS_CODE) + .setPlaceholder(AlertInputTips.TTS_CODE.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(false) + .build()) + .build(); + + InputParam address = InputParam.newBuilder(VoiceAlertConstants.NAME_ADDRESS, VoiceAlertConstants.ADDRESS) + .setPlaceholder(AlertInputTips.ALIYUN_VIICE_ADDRESS.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(false) + .build()) + .build(); + + InputParam accessKeyId = + InputParam.newBuilder(VoiceAlertConstants.NAME_ACCESS_KEY_ID, VoiceAlertConstants.ACCESS_KEY_ID) + .setPlaceholder(AlertInputTips.ALIYUN_VIICE_ACCESSKEYID.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(false) + .build()) + .build(); + InputParam accessKeySecret = + InputParam.newBuilder(VoiceAlertConstants.NAME_ACCESS_KEY_SECRET, VoiceAlertConstants.ACCESS_KEY_SECRET) + .setPlaceholder(AlertInputTips.ALIYUN_VIICE_ACCESSKEY_SECRET.getMsg()) + .addValidate(Validate.newBuilder() + .setRequired(false) + .build()) + .build(); + + return Arrays.asList(calledNumber, calledShowNumber, ttsCode, address, accessKeyId, accessKeySecret); + } + + @Override + public AlertChannel create() { + return new VoiceAlertChannel(); + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertConstants.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertConstants.java new file mode 100644 index 0000000000..fabeac07cc --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceAlertConstants.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dolphinscheduler.plugin.alert.voice; + +public class VoiceAlertConstants { + + /** + * called Number + */ + static final String NAME_CALLED_NUMBER = "calledNumber"; + /** + * called Number + */ + static final String CALLED_NUMBER = "$t('calledNumber')"; + /** + * called Show Number + */ + static final String NAME_CALLED_SHOW_NUMBER = "calledShowNumber"; + /** + * called Show Number + */ + static final String CALLED_SHOW_NUMBER = "$t('calledShowNumber')"; + /** + * tts Code + */ + static final String NAME_TTS_CODE = "ttsCode"; + /** + * tts Code + */ + static final String TTS_CODE = "$t('ttsCode')"; + /** + * tts Param + */ + static final String TTS_PARAM = "ttsParam"; + + /** + * address + */ + static final String NAME_ADDRESS = "address"; + /** + * address + */ + static final String ADDRESS = "$t('address')"; + /** + * accessKeyId + */ + static final String NAME_ACCESS_KEY_ID = "accessKeyId"; + /** + * accessKeyId + */ + static final String ACCESS_KEY_ID = "$t('accessKeyId')"; + /** + * accessKeySecret + */ + static final String NAME_ACCESS_KEY_SECRET = "accessKeySecret"; + /** + * accessKeySecret + */ + static final String ACCESS_KEY_SECRET = "$t('accessKeySecret')"; + + private VoiceAlertConstants() { + throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceParam.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceParam.java new file mode 100644 index 0000000000..2e07f54fd8 --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceParam.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dolphinscheduler.plugin.alert.voice; + +import lombok.Data; + +@Data +public class VoiceParam { + + /** + * called Number + */ + private String calledNumber; + /** + * called Show Number + */ + private String calledShowNumber; + /** + * tts code + */ + private String ttsCode; + /** + * tts param + */ + private String ttsParam; + + /** + * connection info + */ + private Connection connection; + + /** + * outId + */ + private String outId; + + @Data + public static class Connection { + + /** + * address + */ + private String address; + + /** + * accessKeyId + */ + private String accessKeyId; + /** + * accessKeySecret + */ + private String accessKeySecret; + + /** + * tts Code + */ + private String ttsCode; + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceSender.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceSender.java new file mode 100644 index 0000000000..c6c29d8735 --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/main/java/org/apache/dolphinscheduler/plugin/alert/voice/VoiceSender.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.dolphinscheduler.plugin.alert.voice; + +import org.apache.dolphinscheduler.alert.api.AlertResult; + +import lombok.extern.slf4j.Slf4j; + +import com.aliyun.dyvmsapi20170525.Client; +import com.aliyun.dyvmsapi20170525.models.SingleCallByTtsRequest; +import com.aliyun.dyvmsapi20170525.models.SingleCallByTtsResponse; +import com.aliyun.dyvmsapi20170525.models.SingleCallByTtsResponseBody; +import com.aliyun.teaopenapi.models.Config; +import com.aliyun.teautil.models.RuntimeOptions; + +@Slf4j +public final class VoiceSender { + + private VoiceParam voiceParam; + + /** + * create Client + * + * @param voiceParam voidce Param + * @return Client + * @throws Exception + */ + public VoiceSender(VoiceParam voiceParam) { + this.voiceParam = voiceParam; + } + + public AlertResult send() { + AlertResult alertResult = new AlertResult(); + alertResult.setStatus("false"); + try { + Client client = createClient(voiceParam.getConnection()); + SingleCallByTtsRequest singleCallByTtsRequest = new SingleCallByTtsRequest() + .setCalledNumber(voiceParam.getCalledNumber()) + .setTtsCode(voiceParam.getTtsCode()) + .setOutId(voiceParam.getOutId()); + RuntimeOptions runtime = new RuntimeOptions(); + SingleCallByTtsResponse response = client.singleCallByTtsWithOptions(singleCallByTtsRequest, runtime); + if (response == null) { + alertResult.setMessage("aliyun-vocie response is null"); + return alertResult; + } + SingleCallByTtsResponseBody body = response.getBody(); + if (body.code.equalsIgnoreCase("ok")) { + alertResult.setStatus("true"); + alertResult.setMessage(body.getCallId()); + } else { + alertResult.setMessage(body.getMessage()); + } + } catch (Exception e) { + log.error("send aliyun vocie error.", e); + alertResult.setMessage(e.getMessage()); + } + return alertResult; + } + + /** + * create Client + * + * @param conn conn info + * @return Client + * @throws Exception + */ + private com.aliyun.dyvmsapi20170525.Client createClient(VoiceParam.Connection conn) throws Exception { + Config config = new Config() + // AccessKey ID + .setAccessKeyId(conn.getAccessKeyId()) + // AccessKey Secret + .setAccessKeySecret(conn.getAccessKeySecret()); + // address + config.endpoint = conn.getAddress(); + return new com.aliyun.dyvmsapi20170525.Client(config); + } + + public VoiceParam getVoidcePara() { + return voiceParam; + } + + public void setVoidcePara(VoiceParam voidcePara) { + this.voiceParam = voidcePara; + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceAlertChannelFactoryTest.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceAlertChannelFactoryTest.java new file mode 100644 index 0000000000..732c91dfea --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceAlertChannelFactoryTest.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.dolphinscheduler.alert.api.AlertChannel; +import org.apache.dolphinscheduler.common.utils.JSONUtils; +import org.apache.dolphinscheduler.plugin.alert.voice.VoiceAlertChannelFactory; +import org.apache.dolphinscheduler.spi.params.base.PluginParams; + +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * VoiceAlertChannelFactoryTest + */ +class VoiceAlertChannelFactoryTest { + + @Test + void testGetParams() { + VoiceAlertChannelFactory voiceAlertChannelFactory = new VoiceAlertChannelFactory(); + List params = voiceAlertChannelFactory.params(); + JSONUtils.toJsonString(params); + Assertions.assertEquals(6, params.size()); + } + + @Test + void testCreate() { + VoiceAlertChannelFactory voiceAlertChannelFactory = new VoiceAlertChannelFactory(); + AlertChannel alertChannel = voiceAlertChannelFactory.create(); + Assertions.assertNotNull(alertChannel); + } +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceSenderTest.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceSenderTest.java new file mode 100644 index 0000000000..515a410b63 --- /dev/null +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-aliyunVoice/src/test/java/VoiceSenderTest.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.dolphinscheduler.alert.api.AlertResult; +import org.apache.dolphinscheduler.plugin.alert.voice.VoiceParam; +import org.apache.dolphinscheduler.plugin.alert.voice.VoiceSender; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * VoiceSenderTest + */ +class VoiceSenderTest { + + private static VoiceParam voiceParam = new VoiceParam(); + + @BeforeEach + void initVoidceParam() { + voiceParam.setCalledNumber("12345678910"); + voiceParam.setTtsParam("TTS_2450XXXXX"); + VoiceParam.Connection connection = new VoiceParam.Connection(); + connection.setAddress("xxxxxx.aliyuncs.com"); + connection.setAccessKeyId("XXXXXXXXX"); + connection.setAccessKeySecret("XXXXXXXXX"); + voiceParam.setConnection(connection); + } + + @Test + void testSendWeChatTableMsg() { + VoiceSender weChatSender = new VoiceSender(voiceParam); + + AlertResult alertResult = weChatSender.send(); + Assertions.assertEquals("false", alertResult.getStatus()); + } + +} diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-all/pom.xml b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-all/pom.xml index ec8f53fd41..136ebffb53 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-all/pom.xml +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-all/pom.xml @@ -82,7 +82,11 @@ dolphinscheduler-alert-wechat ${project.version} - + + org.apache.dolphinscheduler + dolphinscheduler-alert-aliyunVoice + ${project.version} + diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-api/src/main/java/org/apache/dolphinscheduler/alert/api/AlertInputTips.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-api/src/main/java/org/apache/dolphinscheduler/alert/api/AlertInputTips.java index ec8f4184e0..3f3070f35a 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-api/src/main/java/org/apache/dolphinscheduler/alert/api/AlertInputTips.java +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-api/src/main/java/org/apache/dolphinscheduler/alert/api/AlertInputTips.java @@ -50,6 +50,13 @@ public enum AlertInputTips { SECRET("please input secret", "请输入secret"), WECHAT_MENTION_USERS("use `|` to separate userIds and `@all` to everyone", "使用`|`来分割userId或使用`@all`来提到所有人"), WECHAT_AGENT_ID("please input agent id or chat id", "请输入agent id或chat id"), + CALLED_NUMBER("please input called number", "请输入被叫电话号码"), + CALLED_SHOW_NUMBER("Please enter the call display number (the default number will be used if you do not fill in)", + "请输入呼叫显示号码(不填则使用默认号码)"), + TTS_CODE("please input tts code", "请输入语音模板编码"), + ALIYUN_VIICE_ADDRESS("please input aliyun viice address", "请输入阿里云访问域名"), + ALIYUN_VIICE_ACCESSKEYID("please input accessKeyId", "请输入accessKeyId"), + ALIYUN_VIICE_ACCESSKEY_SECRET("please input accessKeySecret", "请输入accessKeySecret"), ANNOTATION("please input annotation in json form", "请输入json格式的annotation"), GENERATOR_URL("please input Generator URL", "请输入生成地址"); diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/pom.xml b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/pom.xml index e60d4e7049..96f92922ce 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/pom.xml +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/pom.xml @@ -39,6 +39,7 @@ dolphinscheduler-alert-pagerduty dolphinscheduler-alert-webexteams dolphinscheduler-alert-telegram + dolphinscheduler-alert-aliyunVoice dolphinscheduler-alert-prometheus diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml index 8829cdec3a..d4d4ee828f 100644 --- a/dolphinscheduler-bom/pom.xml +++ b/dolphinscheduler-bom/pom.xml @@ -122,6 +122,7 @@ 1.17.6 3.19.0 0.10.1 + 2.1.4 @@ -960,7 +961,11 @@ checker-qual ${checker-qual.version} - + + com.aliyun + dyvmsapi20170525 + ${aliyun-voice.version} + diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE index 94ec6048a5..1284cd3319 100644 --- a/dolphinscheduler-dist/release-docs/LICENSE +++ b/dolphinscheduler-dist/release-docs/LICENSE @@ -562,6 +562,19 @@ The text of each license is also included at licenses/LICENSE-[project].txt. org.apache.oltu.oauth2.client 1.0.2 https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client/1.0.2 Apache 2.0 org.apache.oltu.oauth2.common 1.0.2 https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.common/1.0.2 Apache 2.0 esdk-obs-java-bundle 3.23.3 https://mvnrepository.com/artifact/com.huaweicloud/esdk-obs-java-bundle/3.23.3 Apache 2.0 + dyvmsapi20170525 2.1.4 https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + alibabacloud-gateway-spi 0.0.1 https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + credentials-java 0.2.2 https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + endpoint-util 0.0.7 https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + openapiutil 0.1.14 https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + tea-1.1.14.jar https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + tea-openapi 0.2.2.jar https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + tea-rpc 0.0.11.jar https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + tea-rpc-util 0.1.3.jar https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + tea-util 0.2.13.jar https://github.com/aliyun/aliyun-openapi-java-sdk/blob/master/README.md#license Apache 2.0 + + + @@ -602,6 +615,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt. google-auth-library-credentials 1.15.0: https://mvnrepository.com/artifact/com.google.auth/google-auth-library-credentials/1.15.0, BSD 3-clause google-auth-library-oauth2-http 1.15.0: https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.15.0, BSD 3-clause threetenbp 1.6.5: https://mvnrepository.com/artifact/org.threeten/threetenbp/1.6.5, BSD 3-clause + dom4j 2.1.3 https://github.com/dom4j/dom4j/blob/master/LICENSE BSD 3-clause ======================================================================== CDDL licenses @@ -624,7 +638,8 @@ The text of each license is also included at licenses/LICENSE-[project].txt. jta 1.1: https://mvnrepository.com/artifact/javax.transaction/jta/1.1, CDDL 1.0 transaction-api 1.1: https://mvnrepository.com/artifact/javax.transaction/transaction-api/1.1, CDDL 1.0 javax.el 3.0.0: https://mvnrepository.com/artifact/org.glassfish/javax.el/3.0.0, CDDL and GPL and GPL 2.0 - + jaxb-core 2.3.0 https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-core/2.3.0 GPL 1.1 + jaxb-impl 2.3.0 https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl/2.3.0 GPL 1.1 ======================================================================== EPL licenses ======================================================================== diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-dyvmsapi20170525.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-dyvmsapi20170525.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/dolphinscheduler-dist/release-docs/licenses/LICENSE-dyvmsapi20170525.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dolphinscheduler-ui/src/locales/en_US/security.ts b/dolphinscheduler-ui/src/locales/en_US/security.ts index b9bb18966c..8980bc724a 100644 --- a/dolphinscheduler-ui/src/locales/en_US/security.ts +++ b/dolphinscheduler-ui/src/locales/en_US/security.ts @@ -273,6 +273,12 @@ export default { MsgType: 'Msg Type', // eslint-disable-next-line quotes IsAtAll: "{'@'}All", + calledNumber:"Called phone number", + calledShowNumber:"Call display number", + ttsCode:"TTS Code", + address:'Address', + accessKeyId:"AccessKeyId", + accessKeySecret:"AccessKeySecret", annotations: 'Annotations', generatorURL: 'GeneratorURL', }, diff --git a/dolphinscheduler-ui/src/locales/zh_CN/security.ts b/dolphinscheduler-ui/src/locales/zh_CN/security.ts index b16624885b..453d99d7b8 100644 --- a/dolphinscheduler-ui/src/locales/zh_CN/security.ts +++ b/dolphinscheduler-ui/src/locales/zh_CN/security.ts @@ -272,6 +272,12 @@ export default { MsgType: '消息类型', // eslint-disable-next-line quotes IsAtAll: "{'@'}所有人", + calledNumber:"被叫电话号码", + calledShowNumber:"呼叫显示号码", + ttsCode:"语音模板", + address:'访问域名', + accessKeyId:"AccessKeyId", + accessKeySecret:"AccessKeySecret", annotations: '注释', generatorURL: '生成地址', }, diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt index a5d6e59ee1..3e0072a965 100644 --- a/tools/dependencies/known-dependencies.txt +++ b/tools/dependencies/known-dependencies.txt @@ -485,4 +485,18 @@ snowflake-jdbc-3.13.29.jar azure-storage-blob-12.21.0.jar azure-storage-internal-avro-12.6.0.jar vertica-jdbc-12.0.4-0.jar -esdk-obs-java-bundle-3.23.3.jar \ No newline at end of file +esdk-obs-java-bundle-3.23.3.jar +dyvmsapi20170525-2.1.4.jar +alibabacloud-gateway-spi-0.0.1.jar +credentials-java-0.2.2.jar +endpoint-util-0.0.7.jar +openapiutil-0.1.14.jar +tea-1.1.14.jar +tea-openapi-0.2.2.jar +tea-rpc-0.0.11.jar +tea-rpc-util-0.1.3.jar +tea-util-0.2.13.jar +dom4j-2.1.3.jar +jaxb-core-2.3.0.jar +jaxb-impl-2.3.0.jar +