Browse Source

去掉测试连接时旧的版本提示

feature/big-screen
Maksim 5 years ago
parent
commit
73039732f4
  1. 4
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 6
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  3. 13
      designer-base/src/main/java/com/fr/env/TestConnectionResult.java

4
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -250,6 +250,10 @@ public class EnvChangeEntrance {
FineLoggerFactory.getLogger().info("workspace service {} get annotation failed", clazz);
continue;
}
//一些不想暴露给用户的服务,可以在注解中不添加description,检测但不做提示,如固件回传
if(StringUtils.isEmpty(workspaceAPI.description())){
continue;
}
String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
textBuilder.append(descriptionOfCN).append("\n");
}

6
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

@ -20,6 +20,7 @@ import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextPane;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.ActionEvent;
@ -49,7 +50,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
JLabel imageLabel = new JLabel();
imageLabel.setIcon(icon);
imagePanel.add(imageLabel);
imagePanel.setPreferredSize(new Dimension(110,80));
imagePanel.setPreferredSize(new Dimension(110,100));
JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
FRFont font = FRFont.getInstance();
@ -68,7 +69,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
JTextPane tipsPane = new JTextPane();
tipsPane.setEditable(false);
tipsPane.setBackground(verticalPanel.getBackground());
tipsPane.setPreferredSize(new Dimension(500,30));
tipsPane.setPreferredSize(new Dimension(500,40));
tipsPane.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update"));
verticalPanel.add(label);
@ -77,6 +78,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
topPanel.add(imagePanel,BorderLayout.WEST);
topPanel.add(verticalPanel,BorderLayout.CENTER);
topPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));
//中间的文本域面板
centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();

13
designer-base/src/main/java/com/fr/env/TestConnectionResult.java vendored

@ -34,7 +34,7 @@ public enum TestConnectionResult {
},
/**
* 不完全成功版本不匹配但测试连接成功
* 不完全成功版本不匹配但测试连接成功该状态先保留
*/
PARTLY_SUCCESS {
@Override
@ -89,16 +89,7 @@ public enum TestConnectionResult {
if (!value) {
return FULLY_FAILED;
}
try {
String serverVersion = new FunctionalHttpRequest(info).getServerVersion();
if (AssistUtils.equals(serverVersion, WorkContext.getVersion())) {
//去掉测试连接时所做的检测
return FULLY_SUCCESS;
}
return PARTLY_SUCCESS;
} catch (Exception e) {
// 发生异常,说明没连接上。返回完全失败。
FineLoggerFactory.getLogger().error(e.getMessage());
return FULLY_FAILED;
}
}
}

Loading…
Cancel
Save