Browse Source

Merge pull request #15074 in DESIGN/design from fbp/release to fbp/feature

* commit '05631d59a091d62e26f724f4e51a902dfcb59bfe':
  调整控件弹窗高度计算
  REPORT-137581 【fr-fbp冒烟】【数据源】数据连接-SSH设置连接异常
fbp/feature
superman 1 month ago
parent
commit
bb4b12b94c
  1. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java
  2. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java

@ -27,7 +27,6 @@ import com.fr.module.tool.ActivatorToolBox;
import com.fr.security.encryption.transmission.TransmissionEncryptionManager;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import com.fr.third.fasterxml.jackson.core.JsonProcessingException;
import com.fr.third.fasterxml.jackson.databind.ObjectMapper;
import com.fr.third.springframework.beans.BeanUtils;
import com.fr.workspace.server.repository.WorkplaceConstants;
@ -180,7 +179,7 @@ public class ConnectionInfoBeanHelper {
.redirectPort(jdbcConnection.getSsh().getRedirectPort())
.redirectIp((jdbcConnection.getSsh()).getRedirectIp())
.sshTimeOut(((BaseSsh) jdbcConnection.getSsh()).getTimeOut())
.sshSecret(withPassword ? ((BaseSsh) jdbcConnection.getSsh()).getSecret() : DecisionServiceConstants.DEFAULT_PASSWORD)
.sshSecret(withPassword ? DataEncryptionHelper.encrypt(((BaseSsh) jdbcConnection.getSsh()).getSecret()) : DecisionServiceConstants.DEFAULT_PASSWORD)
.sshPrivateKeyPath(jdbcConnection.getSsh().getSshType() == SshType.KEY ? ((KeyVerifySsh) jdbcConnection.getSsh()).getPrivateKeyPath() : StringUtils.EMPTY)
.usingSsl((jdbcConnection.getSsl()).isUsingSsl())
.sslType(jdbcConnection.getSsl().getSslType().toString())

6
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java

@ -17,6 +17,8 @@ import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import java.awt.event.MouseEvent;
import static com.fine.theme.utils.FineUIScale.scale;
//august:
public class FormWidgetPopWindow extends JWindow {
private WidgetOption[] options;
@ -127,8 +129,8 @@ public class FormWidgetPopWindow extends JWindow {
public Dimension preferredLayoutSize(Container parent) {
Insets insets = parent.getInsets();
int nmembers = parent.getComponentCount();
return new Dimension(maxLine * 28 + insets.left + insets.right + right + left, (nmembers / maxLine + 1)
* 24 + insets.top + insets.bottom + top + bottom);
return new Dimension(maxLine * scale(28) + insets.left + insets.right + scale(right) + scale(left),
(int) Math.ceil((float) nmembers / maxLine) * scale(26) + insets.top + insets.bottom + scale(top) + scale(bottom));
}
@Override

Loading…
Cancel
Save