Browse Source

Merge pull request #1428 in DESIGN/design from ~HUGH.C/design:release/10.0 to release/10.0

* commit '806392a3cddb4dd59f15c3e9ad2a12d05c61d227':
  REPORT-26672 review 改进
  REPORT-26672 设计器和服务器都注册的lic都没有勾选远程设计功能点,还是可以远程连接
feature/big-screen
Hugh.C 5 years ago
parent
commit
5f9263f3af
  1. 12
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  2. 4
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

12
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -1,10 +1,12 @@
package com.fr.design.env;
import com.fr.log.FineLoggerFactory;
import com.fr.security.SecurityToolbox;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
import com.fr.workspace.WorkContext;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@ -90,7 +92,13 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override
public boolean checkValid() {
return true;
boolean result = false;
try {
result = WorkContext.getConnector().testConnection(connection);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return result;
}
return result;
}
}

4
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -17,6 +17,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.license.exception.RegistEditionException;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.guava.base.Strings;
@ -564,6 +565,9 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
return TestConnectionResult.parse(WorkContext.getConnector().testConnection(connection), connection);
} catch (WorkspaceAuthException ignored) {
return AUTH_FAILED;
} catch (RegistEditionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
throw e;
}
}

Loading…
Cancel
Save