Browse Source

Merging in latest from upstream (BA/design:refs/heads/feature/10.0)

* commit '401b9fc48a3f2110afe8e0590b2dd9586ecadb74':
  REPORT-7059 数据连接无法保存的问题
  无
  REPORT-6956 删除无用逻辑
  REPORT-6956 设计器适配10.0配置写法
  无jira任务,10.0启动
  无JIRA任务 配置文件克隆
master
richie 7 years ago
parent
commit
0ff932565d
  1. 2
      designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java
  2. 2
      designer/src/com/fr/design/actions/server/StyleListAction.java
  3. 2
      designer/src/com/fr/design/actions/server/WidgetManagerAction.java
  4. 2
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  5. 13
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  6. 40
      designer_base/src/com/fr/design/actions/server/ConnectionListAction.java
  7. 2
      designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java
  8. 2
      designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java
  9. 40
      designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java
  10. 2
      designer_base/src/com/fr/design/actions/server/ProcedureListAction.java
  11. 2
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  12. 2
      designer_base/src/com/fr/design/file/TemplateTreePane.java

2
designer/src/com/fr/design/actions/server/ServerConfigManagerAction.java

@ -42,7 +42,7 @@ public class ServerConfigManagerAction extends UpdateAction {
final EditReportServerParameterPane editReportServerParameterPane = new EditReportServerParameterPane() { final EditReportServerParameterPane editReportServerParameterPane = new EditReportServerParameterPane() {
@Override @Override
public void complete() { public void complete() {
populate(config.copy()); populate(config.mirror());
} }
}; };

2
designer/src/com/fr/design/actions/server/StyleListAction.java

@ -55,7 +55,7 @@ public class StyleListAction extends UpdateAction {
} }
}); });
styleListPane.populate(ServerConfig.getInstance().copy()); styleListPane.populate(ServerConfig.getInstance().mirror());
styleListDialog.setVisible(true); styleListDialog.setVisible(true);
} }

2
designer/src/com/fr/design/actions/server/WidgetManagerAction.java

@ -37,7 +37,7 @@ public class WidgetManagerAction extends UpdateAction {
final WidgetManagerPane widgetManagerPane = new WidgetManagerPane() { final WidgetManagerPane widgetManagerPane = new WidgetManagerPane() {
@Override @Override
public void complete() { public void complete() {
populate(widgetManager.copy()); populate(widgetManager.mirror());
} }
}; };

2
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -95,10 +95,8 @@ public class UserInfoLabel extends UILabel {
private void init(UserInfoPane userInfoPane) { private void init(UserInfoPane userInfoPane) {
this.userInfoPane = userInfoPane; this.userInfoPane = userInfoPane;
String userName = ServerConfig.getInstance().getBbsUsername();
this.addMouseListener(userInfoAdapter); this.addMouseListener(userInfoAdapter);
this.setHorizontalAlignment(SwingConstants.CENTER); this.setHorizontalAlignment(SwingConstants.CENTER);
this.setText(userName);
if (StableUtils.getMajorJavaVersion() == VERSION_8) { if (StableUtils.getMajorJavaVersion() == VERSION_8) {
LoginWebBridge.getHelper().setUILabel(UserInfoLabel.this); LoginWebBridge.getHelper().setUILabel(UserInfoLabel.this);

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);
}
} }
} }
}); });

40
designer_base/src/com/fr/design/actions/server/ConnectionListAction.java

@ -108,39 +108,8 @@ public class ConnectionListAction extends UpdateAction {
* @return boolean 是否更新成功 * @return boolean 是否更新成功
*/ */
public static boolean doWithDatasourceManager(ConnectionConfig datasourceManager, ConnectionShowPane connectionShowPane, BasicDialog databaseListDialog) { public static boolean doWithDatasourceManager(ConnectionConfig datasourceManager, ConnectionShowPane connectionShowPane, BasicDialog databaseListDialog) {
// HashMap<String, Connection> modifyDetails = datasourceManager.getConnectionModifyDetails(); connectionShowPane.update(datasourceManager);
// modifyDetails.clear();
// Env currentEnv = FRContext.getCurrentEnv();
// ModifiedTable localModifiedTable = datasourceManager.checkConnectionModifyTable(backupManager, currentEnv.getUserID());
boolean isFailed = false; 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); int index = isConnectionMapContainsRename(datasourceManager);
if (index != -1) { if (index != -1) {
@ -148,12 +117,7 @@ public class ConnectionListAction extends UpdateAction {
connectionShowPane.setSelectedIndex(index); connectionShowPane.setSelectedIndex(index);
} }
databaseListDialog.setDoOKSucceed(!isFailed); databaseListDialog.setDoOKSucceed(!isFailed);
// //如果修改成功,则去远程端增量修改修改表
// if (!isFailed && !currentEnv.isSupportLocalFileOperate()) {
// currentEnv.writeDataSourceModifiedTables(localModifiedTable, DatasourceManager.CONNECTION);
// localModifiedTable.clear();
// modifyDetails.clear();
// }
return !isFailed; return !isFailed;
} }

2
designer_base/src/com/fr/design/actions/server/FunctionManagerAction.java

@ -59,7 +59,7 @@ public class FunctionManagerAction extends UpdateAction {
} }
}); });
functionManagerPane.populate(functionManager.copy()); functionManagerPane.populate(functionManager.mirror());
functionManagerDialog.setVisible(true); functionManagerDialog.setVisible(true);
} }

2
designer_base/src/com/fr/design/actions/server/GlobalParameterAction.java

@ -47,7 +47,7 @@ public class GlobalParameterAction extends UpdateAction {
//marks:读取服务器配置信息 //marks:读取服务器配置信息
final ServerConfig configManager = ServerConfig.getInstance(); final ServerConfig configManager = ServerConfig.getInstance();
parameterManagerPane.populate(configManager.copy()); parameterManagerPane.populate(configManager.mirror());
parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() { parameterManagerDialog.addDialogActionListener(new DialogActionAdapter() {
public void doOk() { public void doOk() {
Configurations.update(new Worker() { Configurations.update(new Worker() {

40
designer_base/src/com/fr/design/actions/server/GlobalTableDataAction.java

@ -69,7 +69,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
final TableDataConfig tableDataConfig = TableDataConfig.getInstance(); final TableDataConfig tableDataConfig = TableDataConfig.getInstance();
final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() { final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() {
public void complete() { public void complete() {
populate(tableDataConfig.copy()); populate(tableDataConfig.mirror());
} }
protected void renameConnection(final String oldName, final String newName) { protected void renameConnection(final String oldName, final String newName) {
@ -131,38 +131,8 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
* @return * @return
*/ */
private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) { private boolean doWithDatasourceManager(TableDataConfig datasourceManager, TableDataManagerPane tableDataManagerPane, BasicDialog databaseListDialog) {
// HashMap<String, TableData> modifyDetails = datasourceManager.getTableDataModifyDetails();
// modifyDetails.clear();
// Env currentEnv = FRContext.getCurrentEnv();
// ModifiedTable localModifiedTable = datasourceManager.checkTableDataModifyTable(backupManager, currentEnv.getUserID());
boolean isFailed = false; 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); int index = isTableDataMapContainsRename(datasourceManager);
if (index != -1) { if (index != -1) {
@ -170,12 +140,6 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
tableDataManagerPane.setSelectedIndex(index); tableDataManagerPane.setSelectedIndex(index);
} }
databaseListDialog.setDoOKSucceed(!isFailed); databaseListDialog.setDoOKSucceed(!isFailed);
//如果修改成功,则去远程端增量修改修改表
// if (!isFailed && !currentEnv.isSupportLocalFileOperate()) {
// currentEnv.writeDataSourceModifiedTables(localModifiedTable, DatasourceManager.TABLEDATA);
// localModifiedTable.clear();
// modifyDetails.clear();
// }
return !isFailed; return !isFailed;
} }

2
designer_base/src/com/fr/design/actions/server/ProcedureListAction.java

@ -36,7 +36,7 @@ public class ProcedureListAction extends UpdateAction {
final ProcedureConfig procedureConfig = ProcedureConfig.getInstance(); final ProcedureConfig procedureConfig = ProcedureConfig.getInstance();
final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() { final ProcedureManagerPane databaseManagerPane = new ProcedureManagerPane() {
public void complete() { public void complete() {
populate(procedureConfig.copy()); populate(procedureConfig.mirror());
} }
}; };
BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null); BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null);

2
designer_base/src/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

@ -89,7 +89,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
protected void editItems() { protected void editItems() {
final ConnectionListPane connectionListPane = new ConnectionListPane(); final ConnectionListPane connectionListPane = new ConnectionListPane();
final ConnectionConfig connectionConfig = ConnectionConfig.getInstance(); final ConnectionConfig connectionConfig = ConnectionConfig.getInstance();
ConnectionConfig cloned = connectionConfig.copy(); ConnectionConfig cloned = connectionConfig.mirror();
connectionListPane.populate(cloned); connectionListPane.populate(cloned);
final BasicDialog connectionListDialog = connectionListPane.showLargeWindow( final BasicDialog connectionListDialog = connectionListPane.showLargeWindow(
SwingUtilities.getWindowAncestor(ConnectionComboBoxPanel.this), null); SwingUtilities.getWindowAncestor(ConnectionComboBoxPanel.this), null);

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