Browse Source

Pull request #9509: 无jira 解决冲突

Merge in DESIGN/design from ~JOHN.YING/design:feature/x to feature/x

* commit '6e9f7d67c3ad7e81a0eff3219845d5ab1c78ecd8':
  REPORT-75072 fix:SocketIO启动失败,端口被占用
  KERNEL-11853 设置的分钟数可以支持小数,但不能小于1分钟
feature/x
John.Ying 2 years ago
parent
commit
518e43bb38
  1. 13
      designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java
  2. 1
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

13
designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java

@ -133,7 +133,7 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
ob = StrategyConfigHelper.createStrategyConfig(true, false, true); ob = StrategyConfigHelper.createStrategyConfig(true, false, true);
} }
this.strategyConfig = ob; this.strategyConfig = ob;
this.updateInterval.setText(ob.getUpdateInterval() <= 0 ? "0" : String.format("%.0f", ob.getUpdateInterval() / (double) CacheConstants.MILLIS_OF_MINUTE)); this.updateInterval.setText(ob.getUpdateInterval() <= 0 ? "0" : String.valueOf(ob.getUpdateInterval() / (double) CacheConstants.MILLIS_OF_MINUTE));
this.schemaTime.setText(StringUtils.join(",", ob.getUpdateSchema().toArray(new String[0]))); this.schemaTime.setText(StringUtils.join(",", ob.getUpdateSchema().toArray(new String[0])));
this.shouldEvolve.setSelected(ob.shouldEvolve()); this.shouldEvolve.setSelected(ob.shouldEvolve());
this.selectBySchema.setSelected(ob.isScheduleBySchema()); this.selectBySchema.setSelected(ob.isScheduleBySchema());
@ -185,7 +185,6 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
this.schemaTimeCheckTips.setVisible(true); this.schemaTimeCheckTips.setVisible(true);
throw new IllegalArgumentException("[ESD]Update schema time interval is to short."); throw new IllegalArgumentException("[ESD]Update schema time interval is to short.");
} }
} else { } else {
Collections.addAll(schemaTimes, text.split(",")); Collections.addAll(schemaTimes, text.split(","));
} }
@ -200,8 +199,15 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
String interval = this.updateInterval.getText(); String interval = this.updateInterval.getText();
if (checkUpdateInterval(interval)) { if (checkUpdateInterval(interval)) {
long intervalMillis = StringUtils.isEmpty(interval) ? 0 : (long) (Double.parseDouble(interval) * CacheConstants.MILLIS_OF_MINUTE); long intervalMillis = StringUtils.isEmpty(interval) ? 0 : (long) (Double.parseDouble(interval) * CacheConstants.MILLIS_OF_MINUTE);
if (intervalMillis >= CacheConstants.MILLIS_OF_MINUTE) {
config.setUpdateInterval(intervalMillis); config.setUpdateInterval(intervalMillis);
} else { } else {
this.updateIntervalCheckTips.setText(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Error_Time_Interval_Too_Short"));
this.updateIntervalCheckTips.setVisible(true);
throw new IllegalArgumentException("[ESD]Update schema time interval is to short.");
}
} else {
this.updateIntervalCheckTips.setText(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Error_Time_Format"));
this.updateIntervalCheckTips.setVisible(true); this.updateIntervalCheckTips.setVisible(true);
throw new IllegalArgumentException("[ESD]Error update interval format."); throw new IllegalArgumentException("[ESD]Error update interval format.");
} }
@ -220,7 +226,7 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
private boolean checkUpdateInterval(String intervalValue) { private boolean checkUpdateInterval(String intervalValue) {
try { try {
return !StringUtils.isEmpty(intervalValue) && !(Integer.parseInt(intervalValue) <= 0); return !StringUtils.isEmpty(intervalValue) && !(Double.parseDouble(intervalValue) <= 0);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
@ -228,6 +234,7 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
return false; return false;
} }
private boolean checkCornTimeInterval (String cronText) { private boolean checkCornTimeInterval (String cronText) {
// 判断后两次更新时间间隔,如果小于1分钟就返回false // 判断后两次更新时间间隔,如果小于1分钟就返回false
try { try {

1
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -521,7 +521,6 @@ public class DesignerActivator extends Activator implements Prepare {
@Override @Override
public void prepare() { public void prepare() {
if (!OptimizeUtil.isOpen()) { if (!OptimizeUtil.isOpen()) {
LoginAuthServer.getInstance().compatibleStart(); LoginAuthServer.getInstance().compatibleStart();
} }

Loading…
Cancel
Save