Browse Source

Pull request #1: Final/10.0

Merge in ~ABBY/decision-webui-dcm from final/10.0 to persist/10.0

* commit '7d1c4587c445e3c6e06f2ca8cc2ce453aca85bb3':
  BI-66943 fix: 【513】全局更新设置定时更新,明细频率执行,应该只有选项前面的选项是勾选状态,整一行没有蓝色选中
  DEC-13518 fix: 数据连接高级属性,单独修改“开启空闲回收器检验”不生效
  无JIRA 修复husky pre-push报错
  DEC-13363 feat: 加载动画统一
qufenxi
Abby 4 years ago
parent
commit
f5bb33d386
  1. 2
      src/less/lib/background.less
  2. 6
      src/modules/components/test_status/tip_icon/tip_fail.ts
  3. 6
      src/modules/components/test_status/tip_icon/tip_icon.ts
  4. 5
      src/modules/crud/api.ts
  5. 4
      src/modules/crud/decision.api.ts
  6. 5
      src/modules/crud/design.api.ts
  7. 16
      src/modules/pages/connection/list/list_item/list_item.ts
  8. 2
      src/modules/pages/connection_pool/list_item/list_item.ts
  9. 6
      src/modules/pages/database/database.ts
  10. 6
      src/modules/pages/database/filter/filter.less
  11. 5
      src/modules/pages/database/filter/filter.ts
  12. 7
      src/modules/pages/maintain/forms/components/form.jdbc.ts

2
src/less/lib/background.less

@ -1,5 +1,5 @@
@background-data-connection: "background/data-connection-tip.png"; @background-data-connection: "background/data-connection-tip.png";
@icon-upload-loading: "icon/upload_loading.gif"; @icon-upload-loading: "icon/wave_loading.gif";
@icon-upload-fail: "icon/upload_fail.png"; @icon-upload-fail: "icon/upload_fail.png";
@icon-upload-success: "icon/upload_success.png"; @icon-upload-success: "icon/upload_success.png";
@background-error-page: "background/error_page.png"; @background-error-page: "background/error_page.png";

6
src/modules/components/test_status/tip_icon/tip_fail.ts

@ -29,7 +29,7 @@ export class TipFail extends BI.Widget {
render() { render() {
const { tipCls, tipText, retryText } = this.options; const { tipCls, tipText, retryText } = this.options;
return { return {
type: CenterAdapt, type: CenterAdapt,
items: [ items: [
@ -42,8 +42,8 @@ export class TipFail extends BI.Widget {
bgap: 20, bgap: 20,
items: [{ items: [{
type: 'bi.icon', type: 'bi.icon',
width: 96, width: 60,
height: 96, height: 60,
}], }],
}, { }, {
type: Label, type: Label,

6
src/modules/components/test_status/tip_icon/tip_icon.ts

@ -9,7 +9,7 @@ export class TipIcon extends BI.Widget {
} }
render() { render() {
const { tipCls, tipText } = this.options; const { tipCls, tipText } = this.options;
return { return {
type: CenterAdapt, type: CenterAdapt,
items: [ items: [
@ -22,8 +22,8 @@ export class TipIcon extends BI.Widget {
bgap: 20, bgap: 20,
items: [{ items: [{
type: 'bi.icon', type: 'bi.icon',
width: 96, width: 60,
height: 96, height: 60,
}], }],
}, { }, {
type: Label, type: Label,

5
src/modules/crud/api.ts

@ -61,4 +61,9 @@ export interface Api {
* *
*/ */
isDriverError(errorCode: string): boolean; isDriverError(errorCode: string): boolean;
/**
*
*/
getCipher(password: string): string;
} }

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

@ -93,6 +93,10 @@ export class DecisionApi implements Api {
return false; return false;
} }
getCipher(password: string) {
return BI.Providers.getProvider('dec.provider.cipher').getCipher(password);
}
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> {
return new Promise(resolve => { return new Promise(resolve => {
if (Dec && Dec.socket.connected) { if (Dec && Dec.socket.connected) {

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

@ -66,4 +66,9 @@ export class DesignApi implements Api {
// 设计器暂不校验 // 设计器暂不校验
return false; return false;
} }
getCipher(password: string) {
// 设计器加密方法
return password;
}
} }

16
src/modules/pages/connection/list/list_item/list_item.ts

@ -16,7 +16,7 @@ export class ListItem extends BI.BasicButton {
creator: '', creator: '',
databaseType: '', databaseType: '',
height: 25, height: 25,
baseCls: 'dec-dcm-connection-list-item bi-list-item-active', baseCls: 'dec-dcm-connection-list-item bi-list-item-active2',
} }
store: ListItemModel['store']; store: ListItemModel['store'];
@ -39,7 +39,7 @@ export class ListItem extends BI.BasicButton {
render() { render() {
const { name, databaseType } = this.options; const { name, databaseType } = this.options;
return { return {
type: Htape, type: Htape,
items: [{ items: [{
@ -80,7 +80,7 @@ export class ListItem extends BI.BasicButton {
this.store.setIsEdit(false, name); this.store.setIsEdit(false, name);
this.nameLabel.setText(name); this.nameLabel.setText(name);
this.nameEditor.setValue(name); this.nameEditor.setValue(name);
return; return;
} }
this.store.changeName(name, newName).then(re => { this.store.changeName(name, newName).then(re => {
@ -124,10 +124,10 @@ export class ListItem extends BI.BasicButton {
this.downListCombo.setValue(''); this.downListCombo.setValue('');
}, },
}], }],
} : { } : {
type: Layout, type: Layout,
}, },
width: 25, width: 25,
}], }],
}; };
@ -153,7 +153,7 @@ export class ListItem extends BI.BasicButton {
if (!isRegistered) { if (!isRegistered) {
return [otherIcons]; return [otherIcons];
} }
return [ return [
[ [
{ {
@ -211,7 +211,7 @@ export class ListItem extends BI.BasicButton {
this.store.setPageIndex(PAGE_INDEX.MAINTAIN); this.store.setPageIndex(PAGE_INDEX.MAINTAIN);
this.store.setDatebaseTypeSelected(''); this.store.setDatebaseTypeSelected('');
}) })
.catch(() => {}); .catch(() => { });
}, },
changeName: () => { changeName: () => {
this.store.setIsEdit(true, name); this.store.setIsEdit(true, name);

2
src/modules/pages/connection_pool/list_item/list_item.ts

@ -8,7 +8,7 @@ export class ListItem extends BI.BasicButton {
props = { props = {
name: '', name: '',
height: 25, height: 25,
baseCls: 'dec-dcm-connection-pool-list-item bi-list-item-active', baseCls: 'dec-dcm-connection-pool-list-item bi-list-item-active2',
} }
store: ListItemModel['store']; store: ListItemModel['store'];

6
src/modules/pages/database/database.ts

@ -1,4 +1,4 @@
import { SearchEditor, Vtape, Right, Htape, Vertical, ButtonGroup, Left, VerticalAdapt, Label, MultiSelectItem, CenterAdapt } from 'ui'; import { SearchEditor, Vtape, Right, Htape, Vertical, ButtonGroup, Left, Label, MultiSelectItem, CenterAdapt } from 'ui';
import { shortcut, store } from '@core/core'; import { shortcut, store } from '@core/core';
import { FilterXtype } from './filter/filter'; import { FilterXtype } from './filter/filter';
import { DatebaseModel, DatebaseModelXtype } from './database.model'; import { DatebaseModel, DatebaseModelXtype } from './database.model';
@ -45,7 +45,7 @@ export class Datebase extends BI.Widget {
datebaseTypes: () => { datebaseTypes: () => {
this.datebaseType.populate(this.renderDatebaseType()); this.datebaseType.populate(this.renderDatebaseType());
}, },
'isInternal || isPlugin' : () => { 'isInternal || isPlugin': () => {
this.internalWidget.setSelected(this.model.isInternal); this.internalWidget.setSelected(this.model.isInternal);
this.pluginWidget.setSelected(this.model.isPlugin); this.pluginWidget.setSelected(this.model.isPlugin);
if (this.model.filter === DATEBASE_FILTER_TYPE.ALL) { if (this.model.filter === DATEBASE_FILTER_TYPE.ALL) {
@ -215,7 +215,7 @@ export class Datebase extends BI.Widget {
if (this.model.datebaseTypes.length === 0) { if (this.model.datebaseTypes.length === 0) {
return this.renderNoResult(); return this.renderNoResult();
} }
return this.model.datebaseTypes.map(item => { return this.model.datebaseTypes.map(item => {
return { return {
type: DatebaseTypeXtype, type: DatebaseTypeXtype,

6
src/modules/pages/database/filter/filter.less

@ -1,6 +0,0 @@
@import "../../../../less/index.less";
.bi-list-item-active{
&:active, &.active {
background-color: @color-bi-light-blue-60;
}
}

5
src/modules/pages/database/filter/filter.ts

@ -1,7 +1,6 @@
import { shortcut, store } from '@core/core'; import { shortcut, store } from '@core/core';
import { Label } from 'ui'; import { Label } from 'ui';
import { FilterModel, FilterModelXtype } from './filter.model'; import { FilterModel, FilterModelXtype } from './filter.model';
import './filter.less';
export const FilterXtype = 'dec.dcm.datebase.filter'; export const FilterXtype = 'dec.dcm.datebase.filter';
@shortcut(FilterXtype) @shortcut(FilterXtype)
@ -11,12 +10,12 @@ export class Filter extends BI.BasicButton {
props = { props = {
text: '', text: '',
value: '', value: '',
baseCls: 'bi-list-item-active', baseCls: 'bi-list-item-active2',
} }
render() { render() {
const { text } = this.options; const { text } = this.options;
return { return {
type: Label, type: Label,
textAlign: 'left', textAlign: 'left',

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

@ -7,6 +7,9 @@ import { connectionType } from '@constants/env';
import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE } from '@constants/constant'; import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE } from '@constants/constant';
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service';
import { TextCheckerXtype } from '../../../../components/text_checker/text_checker'; import { TextCheckerXtype } from '../../../../components/text_checker/text_checker';
import { ApiFactory } from 'src/modules/crud/apiFactory';
const api = new ApiFactory().create();
export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc'; export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc';
@shortcut(FormJdbcXtype) @shortcut(FormJdbcXtype)
export class FormJdbc extends BI.Widget { export class FormJdbc extends BI.Widget {
@ -742,7 +745,7 @@ export class FormJdbc extends BI.Widget {
driver: this.form.driver.getValue(), driver: this.form.driver.getValue(),
url: this.form.url.getValue(), url: this.form.url.getValue(),
user: this.form.user.getValue(), user: this.form.user.getValue(),
password: this.oldPassword === this.form.password.getValue() ? this.oldPassword : BI.Providers.getProvider('dec.provider.cipher').getCipher(this.form.password.getValue()), password: this.oldPassword === this.form.password.getValue() ? this.oldPassword : api.getCipher(this.form.password.getValue()),
queryType: '', queryType: '',
newCharsetName: originalCharsetName ? 'gbk' : '', // 后台要求,originalCharsetName不为空时,newCharsetName为gbk newCharsetName: originalCharsetName ? 'gbk' : '', // 后台要求,originalCharsetName不为空时,newCharsetName为gbk
originalCharsetName, originalCharsetName,
@ -761,7 +764,7 @@ export class FormJdbc extends BI.Widget {
validationQuery: this.form.validationQuery.getValue(), validationQuery: this.form.validationQuery.getValue(),
testOnBorrow: BI.size(this.form.testOnBorrow.getValue()) > 0 ? this.form.testOnBorrow.getValue()[0] : connectionPoolAttr.testOnBorrow, 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, testOnReturn: BI.size(this.form.testOnReturn.getValue()) > 0 ? this.form.testOnReturn.getValue()[0] : connectionPoolAttr.testOnReturn,
testWhileIdle: BI.size(this.form.testOnReturn.getValue()) > 0 ? this.form.testWhileIdle.getValue()[0] : connectionPoolAttr.testWhileIdle, testWhileIdle: BI.size(this.form.testWhileIdle.getValue()) > 0 ? this.form.testWhileIdle.getValue()[0] : connectionPoolAttr.testWhileIdle,
timeBetweenEvictionRunsMillis: this.form.timeBetweenEvictionRunsMillis.getValue(), timeBetweenEvictionRunsMillis: this.form.timeBetweenEvictionRunsMillis.getValue(),
numTestsPerEvictionRun: this.form.numTestsPerEvictionRun.getValue(), numTestsPerEvictionRun: this.form.numTestsPerEvictionRun.getValue(),
minEvictableIdleTimeMillis: this.form.minEvictableIdleTimeMillis.getValue(), minEvictableIdleTimeMillis: this.form.minEvictableIdleTimeMillis.getValue(),

Loading…
Cancel
Save