Browse Source

Merge pull request #1705 in BA/design from ~RINOUX/design:feature/10.0 to feature/10.0

* commit 'cee1fe749f4aba4fc7face484bbfdf4d5805002a':
  REPORT-7059 数据连接无法保存的问题
master
superman 7 years ago
parent
commit
401b9fc48a
  1. 13
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  2. 2
      designer_base/src/com/fr/design/file/TemplateTreePane.java

13
designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -4,6 +4,7 @@
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.config.DBEnv;
import com.fr.config.ServerConfig; import com.fr.config.ServerConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -78,11 +79,13 @@ public class UserInfoPane extends BasicPane{
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override @Override
public void envChanged() { public void envChanged() {
String username = ServerConfig.getInstance().getBbsUsername(); if (DBEnv.isDBEnvAvailable()) {
if (StringUtils.isEmpty(username)){ String username = ServerConfig.getInstance().getBbsUsername();
markUnSignIn(); if (StringUtils.isEmpty(username)){
} else { markUnSignIn();
markSignIn(username); } else {
markSignIn(username);
}
} }
} }
}); });

2
designer_base/src/com/fr/design/file/TemplateTreePane.java

@ -320,7 +320,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
try { try {
fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))}); fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))});
//todo 走下这个流程,否则集群下其它节点无法同步删除 //todo 走下这个流程,否则集群下其它节点无法同步删除
//FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());
} catch (IOException e) { } catch (IOException e) {
FRLogger.getLogger().info(e.getMessage()); FRLogger.getLogger().info(e.getMessage());
FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());

Loading…
Cancel
Save