From 75ce9ba2040a45c305e9a1438c5d9448a60563e8 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 6 Mar 2018 09:52:04 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C10.?= =?UTF-8?q?0=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index bdd5352f2b..65e6dea54d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -95,10 +95,8 @@ public class UserInfoLabel extends UILabel { private void init(UserInfoPane userInfoPane) { this.userInfoPane = userInfoPane; - String userName = ServerConfig.getInstance().getBbsUsername(); this.addMouseListener(userInfoAdapter); this.setHorizontalAlignment(SwingConstants.CENTER); - this.setText(userName); if (StableUtils.getMajorJavaVersion() == VERSION_8) { LoginWebBridge.getHelper().setUILabel(UserInfoLabel.this); From 2b251d599a9cea8f9063caa19e59f938231896ff Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 6 Mar 2018 10:44:03 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-6956=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=80=82=E9=85=8D10.0=E9=85=8D=E7=BD=AE=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/server/ConnectionListAction.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java b/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java index a018ffb2c2..758bcd359e 100644 --- a/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java @@ -108,6 +108,7 @@ public class ConnectionListAction extends UpdateAction { * @return boolean 是否更新成功 */ public static boolean doWithDatasourceManager(ConnectionConfig datasourceManager, ConnectionShowPane connectionShowPane, BasicDialog databaseListDialog) { + connectionShowPane.update(datasourceManager); // HashMap modifyDetails = datasourceManager.getConnectionModifyDetails(); // modifyDetails.clear(); // Env currentEnv = FRContext.getCurrentEnv(); From 8d7f932c6fe45ed9f8ab378ca544538f604b76b9 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 6 Mar 2018 10:49:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-6956=20=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/server/ConnectionListAction.java | 39 +------------------ .../actions/server/GlobalTableDataAction.java | 32 +-------------- 2 files changed, 2 insertions(+), 69 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java b/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java index 758bcd359e..6fbad6de4d 100644 --- a/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer_base/src/com/fr/design/actions/server/ConnectionListAction.java @@ -109,39 +109,7 @@ public class ConnectionListAction extends UpdateAction { */ public static boolean doWithDatasourceManager(ConnectionConfig datasourceManager, ConnectionShowPane connectionShowPane, BasicDialog databaseListDialog) { connectionShowPane.update(datasourceManager); -// HashMap modifyDetails = datasourceManager.getConnectionModifyDetails(); -// modifyDetails.clear(); -// Env currentEnv = FRContext.getCurrentEnv(); -// ModifiedTable localModifiedTable = datasourceManager.checkConnectionModifyTable(backupManager, currentEnv.getUserID()); boolean isFailed = false; -// if (currentEnv.isSupportLocalFileOperate() && !((LocalEnv) currentEnv).isNoRemoteUser()) { -// //如果是本地,并且有远程用户时则更新自己的修改表 -// datasourceManager.updateSelfConnectionTotalModifiedTable(localModifiedTable, ModifiedTable.LOCAL_MODIFIER); -// } else { -// if (!currentEnv.isSupportLocalFileOperate()) { -// //如果是远程,则去取服务器的最新的修改表,检查有没有冲突 -// ModifiedTable currentServerModifyTable = currentEnv.getDataSourceModifiedTables(DatasourceManager.CONNECTION); -// if (localModifiedTable.checkModifiedTableConflictWithServer(currentServerModifyTable, currentEnv.getUserID())) { -// //有冲突,进行提示 -// String title = Inter.getLocText(new String[]{"Select", "Single", "Setting"}); -// int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), localModifiedTable.getWaringMessage(), title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); -// if (returnVal == JOptionPane.YES_OPTION) { -// //点击是,进行相应刷新去冲突 -// datasourceManager.synchronizedWithServer(backupManager, DatasourceManager.CONNECTION); -// //要是有重命名冲突的,则对详细的修改表先进行修改 -// datasourceManager.doWithConnectionConflict(localModifiedTable); -// localModifiedTable.removeConfilct(); -// modifyDetails.clear(); -// //更新面板 -// connectionShowPane.populate(datasourceManager); -// } else { -// //更新失败,继续停留页面 -// isFailed = true; -// } -// -// } -// } -// } //存在请重命名则不能更新 int index = isConnectionMapContainsRename(datasourceManager); if (index != -1) { @@ -149,12 +117,7 @@ public class ConnectionListAction extends UpdateAction { connectionShowPane.setSelectedIndex(index); } databaseListDialog.setDoOKSucceed(!isFailed); -// //如果修改成功,则去远程端增量修改修改表 -// if (!isFailed && !currentEnv.isSupportLocalFileOperate()) { -// currentEnv.writeDataSourceModifiedTables(localModifiedTable, DatasourceManager.CONNECTION); -// localModifiedTable.clear(); -// modifyDetails.clear(); -// } + return !isFailed; } diff --git a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java index 744dfea2a4..5e172d475c 100644 --- a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java @@ -131,38 +131,8 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS * @return */ private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) { -// HashMap modifyDetails = datasourceManager.getTableDataModifyDetails(); -// modifyDetails.clear(); -// Env currentEnv = FRContext.getCurrentEnv(); -// ModifiedTable localModifiedTable = datasourceManager.checkTableDataModifyTable(backupManager, currentEnv.getUserID()); boolean isFailed = false; -// if (currentEnv.isSupportLocalFileOperate() && !((LocalEnv) currentEnv).isNoRemoteUser()) { -// //如果是本地,并且有远程用户时则更新自己的修改表 -// datasourceManager.updateSelfTableDataTotalModifiedTable(localModifiedTable, ModifiedTable.LOCAL_MODIFIER); -// } else { -// if (!currentEnv.isSupportLocalFileOperate()) { -// //如果是远程,则去取服务器的最新的修改表,检查有没有冲突 -// ModifiedTable currentServerModifyTable = currentEnv.getDataSourceModifiedTables(DatasourceManager.TABLEDATA); -// if (localModifiedTable.checkModifiedTableConflictWithServer(currentServerModifyTable, currentEnv.getUserID())) { -// //有冲突,进行提示 -// String title = Inter.getLocText(new String[]{"Select", "Single", "Setting"}); -// int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), localModifiedTable.getWaringMessage(), title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); -// if (returnVal == JOptionPane.YES_OPTION) { -// //点击是,进行相应刷新去冲突 -// datasourceManager.synchronizedWithServer(backupManager, DatasourceManager.TABLEDATA); -// //要是有重命名冲突的,则对详细的修改表先进行修改 -// datasourceManager.doWithTableDataConfilct(localModifiedTable); -// localModifiedTable.removeConfilct(); -// modifyDetails.clear(); -// //更新面板 -// tableDataManagerPane.populate(datasourceManager); -// } else { -// //更新失败,继续停留页面 -// isFailed = true; -// } -// } -// } -// } +// //存在请重命名则不能更新 int index = isTableDataMapContainsRename(datasourceManager); if (index != -1) { From d12c86ea2e9ed9cf25b7cde87bc439db5cc2a4a5 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 6 Mar 2018 10:50:08 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/server/GlobalTableDataAction.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java index 5e172d475c..3085dc589f 100644 --- a/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java @@ -140,12 +140,6 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS tableDataManagerPane.setSelectedIndex(index); } databaseListDialog.setDoOKSucceed(!isFailed); - //如果修改成功,则去远程端增量修改修改表 -// if (!isFailed && !currentEnv.isSupportLocalFileOperate()) { -// currentEnv.writeDataSourceModifiedTables(localModifiedTable, DatasourceManager.TABLEDATA); -// localModifiedTable.clear(); -// modifyDetails.clear(); -// } return !isFailed; } From cee1fe749f4aba4fc7face484bbfdf4d5805002a Mon Sep 17 00:00:00 2001 From: rinoux Date: Tue, 6 Mar 2018 14:46:56 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-7059=20=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/bbs/UserInfoPane.java | 13 ++++++++----- .../src/com/fr/design/file/TemplateTreePane.java | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index 5138654887..0b16bbfaba 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -4,6 +4,7 @@ package com.fr.design.mainframe.bbs; import com.fr.base.FRContext; +import com.fr.config.DBEnv; import com.fr.config.ServerConfig; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; @@ -78,11 +79,13 @@ public class UserInfoPane extends BasicPane{ GeneralContext.addEnvChangedListener(new EnvChangedListener() { @Override public void envChanged() { - String username = ServerConfig.getInstance().getBbsUsername(); - if (StringUtils.isEmpty(username)){ - markUnSignIn(); - } else { - markSignIn(username); + if (DBEnv.isDBEnvAvailable()) { + String username = ServerConfig.getInstance().getBbsUsername(); + if (StringUtils.isEmpty(username)){ + markUnSignIn(); + } else { + markSignIn(username); + } } } }); diff --git a/designer_base/src/com/fr/design/file/TemplateTreePane.java b/designer_base/src/com/fr/design/file/TemplateTreePane.java index b49ad3bee1..69d5b83579 100644 --- a/designer_base/src/com/fr/design/file/TemplateTreePane.java +++ b/designer_base/src/com/fr/design/file/TemplateTreePane.java @@ -320,7 +320,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { try { fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))}); //todo 走下这个流程,否则集群下其它节点无法同步删除 - //FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); } catch (IOException e) { FRLogger.getLogger().info(e.getMessage()); FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());