Browse Source

DEC-17971 feat: 服务器数据集sql传输加密-前端

feature/10.0
zsmj1994 4 years ago
parent
commit
3c8bc2bebd
  1. 5
      src/modules/crud/api.ts
  2. 4
      src/modules/crud/decision.api.ts
  3. 11
      src/modules/crud/design.api.ts
  4. 4
      src/modules/pages/maintain/forms/components/form.jdbc.ts

5
src/modules/crud/api.ts

@ -67,6 +67,11 @@ export interface Api {
*/
getCipher(password: string): string;
/**
*
*/
getPlain(cipher: string): string;
/**
*
*/

4
src/modules/crud/decision.api.ts

@ -97,6 +97,10 @@ export class DecisionApi implements Api {
return BI.Providers.getProvider('dec.provider.cipher').getCipher(password);
}
getPlain(cipher: string) {
return BI.Providers.getProvider('dec.provider.cipher').getPlain(cipher);
}
getHyperlink(name: string) {
return Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][name];
}

11
src/modules/crud/design.api.ts

@ -36,12 +36,14 @@ export class DesignApi implements Api {
getConnectionPool(name: string): Promise<{ data: ConnectionPoolType }> {
return new Promise(resolve => {
resolve({ data: {
resolve({
data: {
maxActive: 1,
maxIdle: 1,
numActive: 1,
numIdle: 1,
} });
}
});
});
}
@ -72,6 +74,11 @@ export class DesignApi implements Api {
return password;
}
getPlain(cipher: string) {
// 设计器解密方法
return cipher;
}
getHyperlink(name: string) {
// 设计器获取超链
return '';

4
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -537,7 +537,7 @@ export class FormJdbc extends BI.Widget {
cls: 'bi-border',
allowBlank: true,
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'),
value: validationQuery,
value: api.getPlain(validationQuery),
width: 300,
height: 100,
ref: (_ref: TextAreaEditor) => {
@ -788,7 +788,7 @@ export class FormJdbc extends BI.Widget {
maxIdle: this.form.maxIdle.getValue(),
minIdle: this.form.minIdle.getValue(),
maxWait: this.form.maxWait.getValue(),
validationQuery: this.form.validationQuery.getValue(),
validationQuery: api.getCipher(this.form.validationQuery.getValue()),
testOnBorrow: BI.size(this.form.testOnBorrow.getValue()) > 0 ? this.form.testOnBorrow.getValue()[0] : connectionPoolAttr.testOnBorrow,
testOnReturn: BI.size(this.form.testOnReturn.getValue()) > 0 ? this.form.testOnReturn.getValue()[0] : connectionPoolAttr.testOnReturn,
testWhileIdle: BI.size(this.form.testWhileIdle.getValue()) > 0 ? this.form.testWhileIdle.getValue()[0] : connectionPoolAttr.testWhileIdle,

Loading…
Cancel
Save