parent
3630b00c9f
commit
6a33d2bec0
|
|
@ -26,10 +26,12 @@ import org.apache.dolphinscheduler.alert.api.AlertChannel;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
||||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.base.DataType;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.input.number.InputNumberParam;
|
||||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -120,10 +122,11 @@ public final class DingTalkAlertChannelFactory implements AlertChannelFactory {
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
InputParam portParam = InputParam
|
InputNumberParam portParam = InputNumberParam
|
||||||
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PORT, DingTalkParamsConstants.DING_TALK_PORT)
|
.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PORT, DingTalkParamsConstants.DING_TALK_PORT)
|
||||||
.addValidate(Validate.newBuilder()
|
.addValidate(Validate.newBuilder()
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
|
.setType(DataType.NUMBER.getDataType())
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,12 @@ import org.apache.dolphinscheduler.alert.api.AlertConstants;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
||||||
import org.apache.dolphinscheduler.alert.api.ShowType;
|
import org.apache.dolphinscheduler.alert.api.ShowType;
|
||||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.base.DataType;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.input.number.InputNumberParam;
|
||||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -69,11 +71,12 @@ public final class EmailAlertChannelFactory implements AlertChannelFactory {
|
||||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
InputParam mailSmtpPort =
|
InputNumberParam mailSmtpPort =
|
||||||
InputParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_PORT, MailParamsConstants.MAIL_SMTP_PORT)
|
InputNumberParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_PORT, MailParamsConstants.MAIL_SMTP_PORT)
|
||||||
.setValue("25")
|
.setValue(25)
|
||||||
.addValidate(Validate.newBuilder()
|
.addValidate(Validate.newBuilder()
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
|
.setType(DataType.NUMBER.getDataType())
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@ import org.apache.dolphinscheduler.alert.api.AlertChannel;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
||||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.base.DataType;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.input.number.InputNumberParam;
|
||||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -70,10 +72,12 @@ public final class FeiShuAlertChannelFactory implements AlertChannelFactory {
|
||||||
.setRequired(false).build())
|
.setRequired(false).build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
InputParam portParam =
|
InputNumberParam portParam =
|
||||||
InputParam.newBuilder(FeiShuParamsConstants.NAME_FEI_SHU_PORT, FeiShuParamsConstants.FEI_SHU_PORT)
|
InputNumberParam.newBuilder(FeiShuParamsConstants.NAME_FEI_SHU_PORT, FeiShuParamsConstants.FEI_SHU_PORT)
|
||||||
.addValidate(Validate.newBuilder()
|
.addValidate(Validate.newBuilder()
|
||||||
.setRequired(false).build())
|
.setRequired(false)
|
||||||
|
.setType(DataType.NUMBER.getDataType())
|
||||||
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
InputParam userParam =
|
InputParam userParam =
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@ import org.apache.dolphinscheduler.alert.api.AlertChannel;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
|
||||||
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
|
||||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.base.DataType;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||||
|
import org.apache.dolphinscheduler.spi.params.input.number.InputNumberParam;
|
||||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||||
import org.apache.dolphinscheduler.spi.params.select.SelectParam;
|
import org.apache.dolphinscheduler.spi.params.select.SelectParam;
|
||||||
|
|
||||||
|
|
@ -113,10 +115,12 @@ public final class TelegramAlertChannelFactory implements AlertChannelFactory {
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
InputParam portParam =
|
InputNumberParam portParam =
|
||||||
InputParam.newBuilder(TelegramParamsConstants.NAME_TELEGRAM_PORT, TelegramParamsConstants.TELEGRAM_PORT)
|
InputNumberParam
|
||||||
|
.newBuilder(TelegramParamsConstants.NAME_TELEGRAM_PORT, TelegramParamsConstants.TELEGRAM_PORT)
|
||||||
.addValidate(Validate.newBuilder()
|
.addValidate(Validate.newBuilder()
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
|
.setType(DataType.NUMBER.getDataType())
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import com.google.common.base.Functions;
|
||||||
public enum FormType {
|
public enum FormType {
|
||||||
|
|
||||||
INPUT("input"),
|
INPUT("input"),
|
||||||
INPUTNUMBER("inputNumber"),
|
INPUTNUMBER("input-number"),
|
||||||
RADIO("radio"),
|
RADIO("radio"),
|
||||||
SELECT("select"),
|
SELECT("select"),
|
||||||
SWITCH("switch"),
|
SWITCH("switch"),
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,13 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class InputNumberParam extends PluginParams {
|
public class InputNumberParam extends PluginParams {
|
||||||
|
|
||||||
|
private final InputNumberParamProps props;
|
||||||
|
|
||||||
private InputNumberParam(Builder builder) {
|
private InputNumberParam(Builder builder) {
|
||||||
super(builder);
|
super(builder);
|
||||||
|
this.props = builder.props;
|
||||||
}
|
}
|
||||||
|
|
||||||
private InputNumberParamProps props;
|
|
||||||
|
|
||||||
public static Builder newBuilder(String name, String title) {
|
public static Builder newBuilder(String name, String title) {
|
||||||
return new Builder(name, title);
|
return new Builder(name, title);
|
||||||
}
|
}
|
||||||
|
|
@ -95,6 +96,11 @@ public class InputNumberParam extends PluginParams {
|
||||||
this.display = display;
|
this.display = display;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputNumberParam build() {
|
||||||
|
return new InputNumberParam(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue