From 58566fa2773f5a89a63049853b9671b754baa968 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 26 May 2020 15:32:54 +0800 Subject: [PATCH 1/4] =?UTF-8?q?DEC-13363=20feat:=20=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/lib/background.less | 2 +- src/modules/components/test_status/tip_icon/tip_fail.ts | 6 +++--- src/modules/components/test_status/tip_icon/tip_icon.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/less/lib/background.less b/src/less/lib/background.less index 0264cf7..551cdf0 100644 --- a/src/less/lib/background.less +++ b/src/less/lib/background.less @@ -1,5 +1,5 @@ @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-success: "icon/upload_success.png"; @background-error-page: "background/error_page.png"; \ No newline at end of file diff --git a/src/modules/components/test_status/tip_icon/tip_fail.ts b/src/modules/components/test_status/tip_icon/tip_fail.ts index 1117637..d5fb9b9 100644 --- a/src/modules/components/test_status/tip_icon/tip_fail.ts +++ b/src/modules/components/test_status/tip_icon/tip_fail.ts @@ -29,7 +29,7 @@ export class TipFail extends BI.Widget { render() { const { tipCls, tipText, retryText } = this.options; - + return { type: CenterAdapt, items: [ @@ -42,8 +42,8 @@ export class TipFail extends BI.Widget { bgap: 20, items: [{ type: 'bi.icon', - width: 96, - height: 96, + width: 60, + height: 60, }], }, { type: Label, diff --git a/src/modules/components/test_status/tip_icon/tip_icon.ts b/src/modules/components/test_status/tip_icon/tip_icon.ts index 8c04341..167a894 100644 --- a/src/modules/components/test_status/tip_icon/tip_icon.ts +++ b/src/modules/components/test_status/tip_icon/tip_icon.ts @@ -9,7 +9,7 @@ export class TipIcon extends BI.Widget { } render() { const { tipCls, tipText } = this.options; - + return { type: CenterAdapt, items: [ @@ -22,8 +22,8 @@ export class TipIcon extends BI.Widget { bgap: 20, items: [{ type: 'bi.icon', - width: 96, - height: 96, + width: 60, + height: 60, }], }, { type: Label, From 89001f077079848bd58ea73dc2bdb3744beb9325 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 26 May 2020 15:35:29 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=97=A0JIRA=20=E4=BF=AE=E5=A4=8Dhusky=20p?= =?UTF-8?q?re-push=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/pages/database/database.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/pages/database/database.ts b/src/modules/pages/database/database.ts index e7fa658..d563fe0 100644 --- a/src/modules/pages/database/database.ts +++ b/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 { FilterXtype } from './filter/filter'; import { DatebaseModel, DatebaseModelXtype } from './database.model'; @@ -45,7 +45,7 @@ export class Datebase extends BI.Widget { datebaseTypes: () => { this.datebaseType.populate(this.renderDatebaseType()); }, - 'isInternal || isPlugin' : () => { + 'isInternal || isPlugin': () => { this.internalWidget.setSelected(this.model.isInternal); this.pluginWidget.setSelected(this.model.isPlugin); if (this.model.filter === DATEBASE_FILTER_TYPE.ALL) { @@ -215,7 +215,7 @@ export class Datebase extends BI.Widget { if (this.model.datebaseTypes.length === 0) { return this.renderNoResult(); } - + return this.model.datebaseTypes.map(item => { return { type: DatebaseTypeXtype, From 0a4648decb643a53c223c63da551349d91493356 Mon Sep 17 00:00:00 2001 From: congqiu Date: Tue, 2 Jun 2020 19:13:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?DEC-13518=20fix:=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E9=AB=98=E7=BA=A7=E5=B1=9E=E6=80=A7=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E4=BF=AE=E6=94=B9=E2=80=9C=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E7=A9=BA=E9=97=B2=E5=9B=9E=E6=94=B6=E5=99=A8=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E2=80=9D=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/api.ts | 5 +++++ src/modules/crud/decision.api.ts | 4 ++++ src/modules/crud/design.api.ts | 5 +++++ src/modules/pages/maintain/forms/components/form.jdbc.ts | 7 +++++-- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/modules/crud/api.ts b/src/modules/crud/api.ts index bdc44a6..c29aa3e 100644 --- a/src/modules/crud/api.ts +++ b/src/modules/crud/api.ts @@ -61,4 +61,9 @@ export interface Api { * 判断是否是驱动的错误 */ isDriverError(errorCode: string): boolean; + + /** + * 获取加密后文本 + */ + getCipher(password: string): string; } diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index d046519..3c51680 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -93,6 +93,10 @@ export class DecisionApi implements Api { return false; } + getCipher(password: string) { + return BI.Providers.getProvider('dec.provider.cipher').getCipher(password); + } + private sendEditStatusEvent(name: string, type: string): Promise { return new Promise(resolve => { if (Dec && Dec.socket.connected) { diff --git a/src/modules/crud/design.api.ts b/src/modules/crud/design.api.ts index a551e36..f7863e6 100644 --- a/src/modules/crud/design.api.ts +++ b/src/modules/crud/design.api.ts @@ -66,4 +66,9 @@ export class DesignApi implements Api { // 设计器暂不校验 return false; } + + getCipher(password: string) { + // 设计器加密方法 + return password; + } } diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index 3af4cf6..22752cd 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/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 { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; 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'; @shortcut(FormJdbcXtype) export class FormJdbc extends BI.Widget { @@ -742,7 +745,7 @@ export class FormJdbc extends BI.Widget { driver: this.form.driver.getValue(), url: this.form.url.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: '', newCharsetName: originalCharsetName ? 'gbk' : '', // 后台要求,originalCharsetName不为空时,newCharsetName为gbk originalCharsetName, @@ -761,7 +764,7 @@ export class FormJdbc extends BI.Widget { validationQuery: 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.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(), numTestsPerEvictionRun: this.form.numTestsPerEvictionRun.getValue(), minEvictableIdleTimeMillis: this.form.minEvictableIdleTimeMillis.getValue(), From 0e6c33e42422d300e8ed66aa9ead526a6915c767 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Thu, 18 Jun 2020 16:57:15 +0800 Subject: [PATCH 4/4] =?UTF-8?q?BI-66943=20fix:=20=E3=80=90513=E3=80=91?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=EF=BC=8C=E6=98=8E=E7=BB=86=E9=A2=91?= =?UTF-8?q?=E7=8E=87=E6=89=A7=E8=A1=8C=EF=BC=8C=E5=BA=94=E8=AF=A5=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E9=80=89=E9=A1=B9=E5=89=8D=E9=9D=A2=E7=9A=84=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=98=AF=E5=8B=BE=E9=80=89=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E6=95=B4=E4=B8=80=E8=A1=8C=E6=B2=A1=E6=9C=89=E8=93=9D=E8=89=B2?= =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/connection/list/list_item/list_item.ts | 16 ++++++++-------- .../pages/connection_pool/list_item/list_item.ts | 2 +- src/modules/pages/database/filter/filter.less | 6 ------ src/modules/pages/database/filter/filter.ts | 5 ++--- 4 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 src/modules/pages/database/filter/filter.less diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index be73a60..70489bd 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -16,7 +16,7 @@ export class ListItem extends BI.BasicButton { creator: '', databaseType: '', 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']; @@ -39,7 +39,7 @@ export class ListItem extends BI.BasicButton { render() { const { name, databaseType } = this.options; - + return { type: Htape, items: [{ @@ -80,7 +80,7 @@ export class ListItem extends BI.BasicButton { this.store.setIsEdit(false, name); this.nameLabel.setText(name); this.nameEditor.setValue(name); - + return; } this.store.changeName(name, newName).then(re => { @@ -124,10 +124,10 @@ export class ListItem extends BI.BasicButton { this.downListCombo.setValue(''); }, }], - + } : { - type: Layout, - }, + type: Layout, + }, width: 25, }], }; @@ -153,7 +153,7 @@ export class ListItem extends BI.BasicButton { if (!isRegistered) { return [otherIcons]; } - + return [ [ { @@ -211,7 +211,7 @@ export class ListItem extends BI.BasicButton { this.store.setPageIndex(PAGE_INDEX.MAINTAIN); this.store.setDatebaseTypeSelected(''); }) - .catch(() => {}); + .catch(() => { }); }, changeName: () => { this.store.setIsEdit(true, name); diff --git a/src/modules/pages/connection_pool/list_item/list_item.ts b/src/modules/pages/connection_pool/list_item/list_item.ts index 814255e..54a498e 100644 --- a/src/modules/pages/connection_pool/list_item/list_item.ts +++ b/src/modules/pages/connection_pool/list_item/list_item.ts @@ -8,7 +8,7 @@ export class ListItem extends BI.BasicButton { props = { name: '', 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']; diff --git a/src/modules/pages/database/filter/filter.less b/src/modules/pages/database/filter/filter.less deleted file mode 100644 index daeacb4..0000000 --- a/src/modules/pages/database/filter/filter.less +++ /dev/null @@ -1,6 +0,0 @@ -@import "../../../../less/index.less"; -.bi-list-item-active{ - &:active, &.active { - background-color: @color-bi-light-blue-60; - } -} \ No newline at end of file diff --git a/src/modules/pages/database/filter/filter.ts b/src/modules/pages/database/filter/filter.ts index b4ea449..2f6e819 100644 --- a/src/modules/pages/database/filter/filter.ts +++ b/src/modules/pages/database/filter/filter.ts @@ -1,7 +1,6 @@ import { shortcut, store } from '@core/core'; import { Label } from 'ui'; import { FilterModel, FilterModelXtype } from './filter.model'; -import './filter.less'; export const FilterXtype = 'dec.dcm.datebase.filter'; @shortcut(FilterXtype) @@ -11,12 +10,12 @@ export class Filter extends BI.BasicButton { props = { text: '', value: '', - baseCls: 'bi-list-item-active', + baseCls: 'bi-list-item-active2', } render() { const { text } = this.options; - + return { type: Label, textAlign: 'left',