Browse Source

Merge pull request #9574 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '682081816a55dcfd58dccc9b65b984999a0dd5b7':
  REPORT-76370 提供一个数据连接前置检查接口&写错了应该是远程调用
  REPORT-76370 提供一个数据连接前置检查接口&设计器数据连接保存
  fix
  REPORT-74340 设计器菜单栏-登录,密码输错超过100次,没有错误提示
bugfix/11.0
superman 2 years ago
parent
commit
32adfa464a
  1. 16
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  2. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_en_US.js
  3. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ja_JP.js
  4. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ko_KR.js
  5. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_CN.js
  6. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_TW.js
  7. 2
      designer-base/src/main/resources/com/fr/design/login/login.js

16
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -1,13 +1,12 @@
package com.fr.design.data.datapane.connect;
import com.fr.base.TemplateUtils;
import com.fr.config.RemoteConfigEvent;
import com.fr.data.core.db.JDBCSecurityChecker;
import com.fr.data.impl.Connection;
import com.fr.data.impl.ConnectionBean;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.data.metric.utils.DatabaseConnectionMetricHandler;
import com.fr.data.operator.DataOperator;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.MapCompareUtils;
import com.fr.design.dialog.BasicDialog;
@ -187,7 +186,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
case ADDED:
case UPDATED:
addedOrUpdatedConnections.add(new ConnectionBean(s, StringUtils.EMPTY, connection));
if (connection instanceof JDBCDatabaseConnection){
if (connection instanceof JDBCDatabaseConnection) {
DatabaseConnectionMetricHandler.handleSaveConnection((JDBCDatabaseConnection) connection, null);
}
default:
@ -195,24 +194,21 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
}
});
this.checkSecurity(addedOrUpdatedConnections);
this.validateConnections(addedOrUpdatedConnections);
this.alterConnections(removedConnNames, addedOrUpdatedConnections);
}
private void checkSecurity(List<ConnectionBean> addedOrUpdatedConnections) throws Exception {
private void validateConnections(List<ConnectionBean> addedOrUpdatedConnections) throws Exception {
for (ConnectionBean connectionBean : addedOrUpdatedConnections) {
Connection connection = connectionBean.getConnection();
if (connection instanceof JDBCDatabaseConnection) {
try {
JDBCSecurityChecker.checkURL(TemplateUtils.render(((JDBCDatabaseConnection) connection).getURL()));
JDBCSecurityChecker.checkValidationQuery(((JDBCDatabaseConnection) connection).getDbcpAttr().getValidationQuery());
} catch (SQLException e) {
DataOperator.getInstance().validateConnectionSettings(connection);
} catch (Exception e) {
throw new SQLException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Invalid_Config", connectionBean.getName()) + ", " + e.getMessage(), e.getCause());
}
}
}
}

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_en_US.js

@ -54,6 +54,7 @@ var Store = {
'Designer-BBS_Username_Is_Register': 'The user has been registered',
'Designer-BBS_Please_Enter_Correct_Phone': 'Please enter the correct phone number',
'Designer-Login_Network_Connected_Failed': 'Network connection failed',
'Designer-Login_Failed_Exceed_Limit': 'Too many password errors, please try again after 24 hours',
}}
window.Store = Store;

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ja_JP.js

@ -54,6 +54,7 @@ var Store = {
'Designer-BBS_Username_Is_Register': 'このユーザは登録済みです。',
'Designer-BBS_Please_Enter_Correct_Phone': '正確な携帯番号を入力してください。',
'Designer-Login_Network_Connected_Failed': 'インターネット接続失敗',
'Designer-Login_Failed_Exceed_Limit': 'パスワードを連続で間違えています。24時間にもう一度試してください。',
}}
window.Store = Store;

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_ko_KR.js

@ -54,6 +54,7 @@ var Store = {
'Designer-BBS_Username_Is_Register': 'The user has been registered',
'Designer-BBS_Please_Enter_Correct_Phone': 'Please enter the correct phone number',
'Designer-Login_Network_Connected_Failed': 'Network connection failed',
'Designer-Login_Failed_Exceed_Limit': 'Too many password errors, please try again after 24 hours',
}}
window.Store = Store;

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_CN.js

@ -54,6 +54,7 @@ var Store = {
'Designer-BBS_Username_Is_Register': '该用户已被注册',
'Designer-BBS_Please_Enter_Correct_Phone': '请输入正确的手机号',
'Designer-Login_Network_Connected_Failed': '网络连接失败',
'Designer-Login_Failed_Exceed_Limit': '密码错误次数过多,请24小时后重试',
}}
window.Store = Store;

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_TW.js

@ -54,6 +54,7 @@ var Store = {
'Designer-BBS_Username_Is_Register': '該帳號已被註冊',
'Designer-BBS_Please_Enter_Correct_Phone': '請輸入正確的手機號',
'Designer-Login_Network_Connected_Failed': '網路連線失敗',
'Designer-Login_Failed_Exceed_Limit': '密碼錯誤次數過多,請24小時後重試',
}}
window.Store = Store;

2
designer-base/src/main/resources/com/fr/design/login/login.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save