Browse Source

REPORT-9856【10.0二轮回归】远程设计用户名密码错误时提示不明确

master
hzzz 6 years ago
parent
commit
9d5157989f
  1. 2
      designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java
  3. 11
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

2
designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java

@ -125,7 +125,7 @@ public class SwitchExistEnv extends MenuDef {
}
});
} catch (AuthException exception) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed", "Failed"}),
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed"}),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java

@ -153,7 +153,7 @@ public class TemplatePane extends JPanel implements MouseListener {
}
setJLabel(selectedName);
} catch (AuthException e) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed", "Failed"}),
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed"}),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
return false;
}

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

@ -16,12 +16,14 @@ import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.guava.base.Strings;
import com.fr.workspace.WorkContext;
import com.fr.workspace.connect.AuthException;
import com.fr.workspace.connect.WorkspaceConnection;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
@ -488,8 +490,13 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
WorkspaceConnection connection = remoteEnv.getConnection();
DesignerEnvManager.getEnvManager().setCertificatePath(connection.getCertPath());
DesignerEnvManager.getEnvManager().setCertificatePass(connection.getCertSecretKey());
return WorkContext.getConnector().testConnection(connection);
try {
return WorkContext.getConnector().testConnection(connection);
} catch (AuthException e) {
message.setText(Inter.getLocText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"));
uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
return null;
}
}
@Override

Loading…
Cancel
Save