From 58566fa2773f5a89a63049853b9671b754baa968 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 26 May 2020 15:32:54 +0800 Subject: [PATCH 01/11] =?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 02/11] =?UTF-8?q?=E6=97=A0JIRA=20=E4=BF=AE=E5=A4=8Dhusky?= =?UTF-8?q?=20pre-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 03/11] =?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 04/11] =?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', From 5aeaa87b7af79d751f64970af23506ea99edf937 Mon Sep 17 00:00:00 2001 From: congqiu Date: Fri, 19 Jun 2020 11:41:57 +0800 Subject: [PATCH 05/11] =?UTF-8?q?DEC-13832=20chore=EF=BC=9A=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/components/collapse/collapse.ts | 1 + .../components/text_checker/text_checker.ts | 3 ++- .../components/form_item/form_item.ts | 1 + src/modules/pages/connection/connection.ts | 1 + .../connection_jndi/connection_jndi.ts | 1 + .../connection/list/list_item/list_item.ts | 13 ++++++++-- .../connection_pool/list_item/list_item.ts | 1 + .../pages/connection_pool/pool/pool.ts | 9 +++++++ src/modules/pages/database/database.ts | 1 + .../database/database_type/database_type.ts | 1 + src/modules/pages/database/filter/filter.ts | 1 + .../components/form_item/form_item.ts | 1 + .../maintain/forms/components/form.jdbc.ts | 26 +++++++++++++++++++ .../maintain/forms/components/form.jndi.ts | 19 ++++++++++++++ src/modules/pages/maintain/maintain.ts | 1 + src/modules/title/title.ts | 2 ++ .../title/title_database/title_datebase.ts | 2 ++ .../title/title_maintain/title_maintain.ts | 3 +++ 18 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/modules/components/collapse/collapse.ts b/src/modules/components/collapse/collapse.ts index a313d10..7e332d2 100644 --- a/src/modules/components/collapse/collapse.ts +++ b/src/modules/components/collapse/collapse.ts @@ -10,6 +10,7 @@ export class Collapse extends BI.BasicButton { props = { name: '', isCollapse: true, + $testId: 'dec-dcm-components-collapse', } rightFont: any; diff --git a/src/modules/components/text_checker/text_checker.ts b/src/modules/components/text_checker/text_checker.ts index 430e761..26b45d2 100644 --- a/src/modules/components/text_checker/text_checker.ts +++ b/src/modules/components/text_checker/text_checker.ts @@ -26,7 +26,7 @@ export class TextChecker extends BI.Widget { } render() { - const { width, allowBlank, value, watermark, validationChecker } = this.options; + const { width, allowBlank, value, watermark, validationChecker, $value } = this.options; this.value = value; return { @@ -36,6 +36,7 @@ export class TextChecker extends BI.Widget { items: [{ el: { type: TextEditor, + $value, width, allowBlank, value, diff --git a/src/modules/pages/connection/components/form_item/form_item.ts b/src/modules/pages/connection/components/form_item/form_item.ts index 723ecaa..1b1c743 100644 --- a/src/modules/pages/connection/components/form_item/form_item.ts +++ b/src/modules/pages/connection/components/form_item/form_item.ts @@ -9,6 +9,7 @@ export class FormItem extends BI.Widget { unit: '', isBold: true, nameWidth: 140, + $testId: 'dec-dcm-connection-form-item', } render () { diff --git a/src/modules/pages/connection/connection.ts b/src/modules/pages/connection/connection.ts index b7bab2b..f5aa1e1 100644 --- a/src/modules/pages/connection/connection.ts +++ b/src/modules/pages/connection/connection.ts @@ -102,6 +102,7 @@ export class Connection extends BI.Widget { type: VerticalAdapt, items: [{ type: Button, + $value: 'connection-edit', invisible: true, text: BI.i18nText('Dec-Dcm_Edit'), ref: (_ref: any) => { diff --git a/src/modules/pages/connection/connection_jndi/connection_jndi.ts b/src/modules/pages/connection/connection_jndi/connection_jndi.ts index db99250..b6ec3a9 100644 --- a/src/modules/pages/connection/connection_jndi/connection_jndi.ts +++ b/src/modules/pages/connection/connection_jndi/connection_jndi.ts @@ -21,6 +21,7 @@ export class ConnectionJdbc extends BI.Widget { return { type: Vertical, + $testId: 'dec-dcm-connection-jndi', hgap, vgap, items: [ 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 70489bd..adab6b2 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -17,6 +17,7 @@ export class ListItem extends BI.BasicButton { databaseType: '', height: 25, baseCls: 'dec-dcm-connection-list-item bi-list-item-active2', + $testId: 'dec-dcm-connection-list-item', } store: ListItemModel['store']; @@ -42,6 +43,7 @@ export class ListItem extends BI.BasicButton { return { type: Htape, + $scope: name, items: [{ el: { type: IconLabel, @@ -64,6 +66,7 @@ export class ListItem extends BI.BasicButton { }, { type: SignEditor, + $value: 'connection-name', value: name, invisible: !this.model.isEdit, ref: (_ref: any) => { @@ -107,6 +110,7 @@ export class ListItem extends BI.BasicButton { hgap: 8, el: { type: IconButton, + $value: 'other-edit', cls: 'dcm-link-other-font icon-size-16', }, items: this.renderDownList(), @@ -126,8 +130,8 @@ export class ListItem extends BI.BasicButton { }], } : { - type: Layout, - }, + type: Layout, + }, width: 25, }], }; @@ -158,29 +162,34 @@ export class ListItem extends BI.BasicButton { [ { text: BI.i18nText('Dec-Dcm_Test_Connection'), + $testId: 'dec-dcm-connection-list-btn', cls: 'dcm-test-font', value: 'test', }, { text: BI.i18nText('Dec-Dcm_Edit'), + $testId: 'dec-dcm-connection-list-btn', cls: 'dcm-link-edit-font', value: 'edit', invisible: !canEdit, }, { text: BI.i18nText('Dec-Dcm_Change_Name'), + $testId: 'dec-dcm-connection-list-btn', cls: 'dcm-change-name-font', value: 'changeName', invisible: !canEdit, }, { text: BI.i18nText('Dec-Dcm_Copy'), + $testId: 'dec-dcm-connection-list-btn', cls: 'copy-font', value: 'copy', invisible: !canEdit, }, { text: BI.i18nText('Dec-Dcm_Delete'), + $testId: 'dec-dcm-connection-list-btn', cls: 'dcm-delete-font', value: 'delete', invisible: !canEdit, 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 54a498e..f49289e 100644 --- a/src/modules/pages/connection_pool/list_item/list_item.ts +++ b/src/modules/pages/connection_pool/list_item/list_item.ts @@ -9,6 +9,7 @@ export class ListItem extends BI.BasicButton { name: '', height: 25, baseCls: 'dec-dcm-connection-pool-list-item bi-list-item-active2', + $testId: 'dec-dcm-connection-pool-list-item', } store: ListItemModel['store']; diff --git a/src/modules/pages/connection_pool/pool/pool.ts b/src/modules/pages/connection_pool/pool/pool.ts index 6259dd5..508c3ec 100644 --- a/src/modules/pages/connection_pool/pool/pool.ts +++ b/src/modules/pages/connection_pool/pool/pool.ts @@ -10,6 +10,7 @@ export const PoolXtype = 'dec.dcm.connection_pool.pool'; export class Pool extends BI.Widget { props = { baseCls: 'dec-dcm-connection-pool', + $testId: 'dec-dcm-connection-pool', } model: PoolModel['model']; @@ -54,6 +55,8 @@ export class Pool extends BI.Widget { items: [ { type: Label, + $testId: 'dec-dcm-pool-status-number', + $value: 'active', cls: 'bi-high-light card-font-heighlight', ref: (_ref: any) => { this.numActive = _ref; @@ -65,6 +68,8 @@ export class Pool extends BI.Widget { }, { type: Label, + $testId: 'dec-dcm-pool-status-max', + $value: 'active', ref: (_ref: any) => { this.maxActive = _ref; }, @@ -98,6 +103,8 @@ export class Pool extends BI.Widget { items: [ { type: Label, + $testId: 'dec-dcm-pool-status-number', + $value: 'idle', cls: 'bi-high-light card-font-heighlight', ref: (_ref: any) => { this.numIdle = _ref; @@ -109,6 +116,8 @@ export class Pool extends BI.Widget { }, { type: Label, + $testId: 'dec-dcm-pool-status-max', + $value: 'idle', ref: (_ref: any) => { this.maxIdle = _ref; }, diff --git a/src/modules/pages/database/database.ts b/src/modules/pages/database/database.ts index d563fe0..4e9af98 100644 --- a/src/modules/pages/database/database.ts +++ b/src/modules/pages/database/database.ts @@ -81,6 +81,7 @@ export class Datebase extends BI.Widget { items: [ { type: SearchEditor, + $value: 'database-type', width: 300, watermark: BI.i18nText('BI-Basic_Search'), ref: (_ref: any) => { diff --git a/src/modules/pages/database/database_type/database_type.ts b/src/modules/pages/database/database_type/database_type.ts index 3e1a419..346f3fc 100644 --- a/src/modules/pages/database/database_type/database_type.ts +++ b/src/modules/pages/database/database_type/database_type.ts @@ -19,6 +19,7 @@ export class DatebaseType extends BI.BasicButton { databaseType: '', iconUrl: '', baseCls: 'dec-dcm-datebase-type', + $testId: 'dec-dcm-datebase-type', } img: any; diff --git a/src/modules/pages/database/filter/filter.ts b/src/modules/pages/database/filter/filter.ts index 2f6e819..77f072a 100644 --- a/src/modules/pages/database/filter/filter.ts +++ b/src/modules/pages/database/filter/filter.ts @@ -11,6 +11,7 @@ export class Filter extends BI.BasicButton { text: '', value: '', baseCls: 'bi-list-item-active2', + $testId: 'dec-dcm-datebase-filter', } render() { diff --git a/src/modules/pages/maintain/components/form_item/form_item.ts b/src/modules/pages/maintain/components/form_item/form_item.ts index 159332d..47398e0 100644 --- a/src/modules/pages/maintain/components/form_item/form_item.ts +++ b/src/modules/pages/maintain/components/form_item/form_item.ts @@ -9,6 +9,7 @@ export class FormItem extends BI.Widget { forms: '', nameWidth: 140, isBold: true, + $testId: 'dec-dcm-maintain-form-item', } render () { diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index 22752cd..a52a625 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -81,6 +81,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Name'), forms: [{ type: TextCheckerXtype, + $value: 'connection-name', width: 300, value: connectionName, allowBlank: true, @@ -95,6 +96,8 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), forms: [{ type: EdirotIconCheckCombo, + $testId: 'dec-editor-icon-check-combo', + $value: 'driver', width: 300, value: driver, ref: (_ref: any) => { @@ -122,6 +125,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), forms: [{ type: TextEditor, + $value: 'database-name', width: 300, allowBlank: true, watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), @@ -142,6 +146,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Host'), forms: [{ type: TextEditor, + $value: 'database-host', width: 300, allowBlank: true, value: host, @@ -162,6 +167,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), forms: [{ type: TextCheckerXtype, + $value: 'database-port', width: 300, allowBlank: true, value: port, @@ -188,6 +194,7 @@ export class FormJdbc extends BI.Widget { invisible: !databaseType.kerberos, forms: [{ type: TextValueCombo, + $value: 'auth-type', width: 300, value: authType, ref: (_ref: any) => { @@ -227,6 +234,7 @@ export class FormJdbc extends BI.Widget { }, forms: [{ type: TextEditor, + $value: 'username', width: 300, allowBlank: true, value: user, @@ -245,6 +253,7 @@ export class FormJdbc extends BI.Widget { }, forms: [{ type: Editor, + $value: 'password', cls: 'bi-border bi-border-radius', width: 300, height: 20, @@ -266,6 +275,7 @@ export class FormJdbc extends BI.Widget { }, forms: [{ type: TextEditor, + $value: 'principal', width: 300, allowBlank: true, value: principal, @@ -284,6 +294,7 @@ export class FormJdbc extends BI.Widget { }, forms: [{ type: Editor, + $value: 'key-path', cls: 'bi-border', width: 300, height: 20, @@ -310,6 +321,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), forms: [{ type: TextValueCombo, + $value: 'original-charset-name', width: 300, value: originalCharsetName ? originalCharsetName : '', items: CONNECT_CHARSET, @@ -342,6 +354,7 @@ export class FormJdbc extends BI.Widget { }], }, { type: TextValueCombo, + $value: 'schema', width: 300, vgap: 15, disabled: true, @@ -363,6 +376,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), forms: [{ type: TextEditor, + $value: 'database-url', width: 300, allowBlank: true, value: url, @@ -410,6 +424,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), forms: [{ type: TextCheckerXtype, + $value: 'initial-size', width: 300, allowBlank: false, value: initialSize, @@ -429,6 +444,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), forms: [{ type: TextCheckerXtype, + $value: 'max-active', width: 300, allowBlank: false, value: maxActive, @@ -448,6 +464,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), forms: [{ type: TextCheckerXtype, + $value: 'max-idle', width: 300, allowBlank: false, value: maxIdle, @@ -467,6 +484,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), forms: [{ type: TextCheckerXtype, + $value: 'min-idle', width: 300, allowBlank: false, value: minIdle, @@ -487,6 +505,7 @@ export class FormJdbc extends BI.Widget { forms: [ { type: TextCheckerXtype, + $value: 'max-wait', width: 300, allowBlank: false, value: maxWait, @@ -513,6 +532,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), forms: [{ type: TextAreaEditor, + $value: 'validation-query', cls: 'bi-border', allowBlank: true, watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), @@ -529,6 +549,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), forms: [{ type: TextValueCombo, + $value: 'check', width: 300, allowBlank: true, value: testOnBorrow, @@ -544,6 +565,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), forms: [{ type: TextValueCombo, + $value: 'test-on-return', width: 300, allowBlank: true, value: testOnReturn, @@ -559,6 +581,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_While_Idle'), forms: [{ type: TextValueCombo, + $value: 'test-while-idle', width: 300, allowBlank: true, value: testWhileIdle, @@ -575,6 +598,7 @@ export class FormJdbc extends BI.Widget { forms: [ { type: TextCheckerXtype, + $value: 'test-between-evicition-millis', width: 300, allowBlank: false, value: timeBetweenEvictionRunsMillis, @@ -601,6 +625,7 @@ export class FormJdbc extends BI.Widget { name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num'), forms: [{ type: TextCheckerXtype, + $value: 'test-pereviction-run-num', width: 300, allowBlank: false, value: numTestsPerEvictionRun, @@ -621,6 +646,7 @@ export class FormJdbc extends BI.Widget { forms: [ { type: TextCheckerXtype, + $value: 'min-evictable-idle-time-millis', width: 300, allowBlank: false, value: minEvictableIdleTimeMillis, diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index 360e3bb..0161a7e 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/src/modules/pages/maintain/forms/components/form.jndi.ts @@ -51,6 +51,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextCheckerXtype, + $value: 'connection-name', width: 300, value: connectionName, ref: (_ref: any) => { @@ -64,6 +65,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'jdni-name', width: 300, allowBlank: true, value: jndiName, @@ -102,6 +104,8 @@ export class FormJndi extends BI.Widget { isBold: false, forms: [{ type: EdirotIconCheckCombo, + $testId: 'dec-editor-icon-check-combo', + $value: 'initial', width: 300, value: contextHashtable['java.naming.factory.initial'], ref: (_ref: any) => { @@ -130,6 +134,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'provider-url', width: 300, allowBlank: true, value: contextHashtable['java.naming.provider.url'], @@ -145,6 +150,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'security-principal', width: 300, allowBlank: true, value: contextHashtable['java.naming.security.principal'], @@ -160,6 +166,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'security-credentials', width: 300, allowBlank: true, value: contextHashtable['java.naming.security.credentials'], @@ -185,6 +192,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextValueCombo, + $value: 'new-charset-name', width: 300, value: newCharsetName ? newCharsetName : '', items: CONNECT_CHARSET, @@ -221,6 +229,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'factory-object', width: 300, allowBlank: true, value: contextHashtable['java.naming.factory.object'], @@ -235,6 +244,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'factory-state', width: 300, allowBlank: true, value: contextHashtable['java.naming.factory.state'], @@ -249,6 +259,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'factory-url-pkgs', width: 300, allowBlank: true, value: contextHashtable['java.naming.factory.url.pkgs'], @@ -263,6 +274,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'dns-url', width: 300, allowBlank: true, value: contextHashtable['java.naming.dns.url'], @@ -277,6 +289,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'authoritative', width: 300, allowBlank: true, value: contextHashtable['java.naming.authoritative'], @@ -291,6 +304,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'batchsize', width: 300, allowBlank: true, value: contextHashtable['java.naming.batchsize'], @@ -305,6 +319,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'referral', width: 300, allowBlank: true, value: contextHashtable['java.naming.referral'], @@ -319,6 +334,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'security-protocol', width: 300, allowBlank: true, value: contextHashtable['java.naming.security.protocol'], @@ -333,6 +349,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'security-authentication', width: 300, allowBlank: true, value: contextHashtable['java.naming.security.authentication'], @@ -347,6 +364,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'language', width: 300, allowBlank: true, value: contextHashtable['java.naming.language'], @@ -361,6 +379,7 @@ export class FormJndi extends BI.Widget { nameWidth: 200, forms: [{ type: TextEditor, + $value: 'applet', width: 300, allowBlank: true, value: contextHashtable['java.naming.applet'], diff --git a/src/modules/pages/maintain/maintain.ts b/src/modules/pages/maintain/maintain.ts index 7f25441..5090ace 100644 --- a/src/modules/pages/maintain/maintain.ts +++ b/src/modules/pages/maintain/maintain.ts @@ -35,6 +35,7 @@ export class Maintain extends BI.Widget { items: [ { type: IconButton, + $value: 'back-databases', cls: 'dcm-back-font', height: 15, invisible: this.model.isCopy || isEdit, diff --git a/src/modules/title/title.ts b/src/modules/title/title.ts index 26c2694..abb89d5 100644 --- a/src/modules/title/title.ts +++ b/src/modules/title/title.ts @@ -44,12 +44,14 @@ export class Title extends BI.Widget { items: [ { text: BI.i18nText('Dec-Dcm_Connection_Management'), + $testId: 'dec-dcm-connection-tab', selected: true, value: PAGE_INDEX.CONNECTION, hgap: 15, }, { text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'), + $testId: 'dec-dcm-connection-tab', value: PAGE_INDEX.POOL, hgap: 15, }, diff --git a/src/modules/title/title_database/title_datebase.ts b/src/modules/title/title_database/title_datebase.ts index 96ec4d2..acda335 100644 --- a/src/modules/title/title_database/title_datebase.ts +++ b/src/modules/title/title_database/title_datebase.ts @@ -29,6 +29,7 @@ export class TitleDatabaseWidget extends BI.Widget { items: [ { type: Button, + $value: 'title-database-cancel', text: BI.i18nText('BI-Basic_Cancel'), level: 'ignore', handler: () => { @@ -37,6 +38,7 @@ export class TitleDatabaseWidget extends BI.Widget { }, { type: Button, + $value: 'title-database-save', text: BI.i18nText('BI-Basic_Save'), disabled: !this.model.datebaseTypeSelected, ref: (_ref: any) => { diff --git a/src/modules/title/title_maintain/title_maintain.ts b/src/modules/title/title_maintain/title_maintain.ts index 24b2b12..d9be407 100644 --- a/src/modules/title/title_maintain/title_maintain.ts +++ b/src/modules/title/title_maintain/title_maintain.ts @@ -19,6 +19,7 @@ export class TitleMaintainWidget extends BI.Widget { items: [ { type: Button, + $value: 'title-maintain-cancel', text: BI.i18nText('BI-Basic_Cancel'), level: 'ignore', handler: () => { @@ -29,6 +30,7 @@ export class TitleMaintainWidget extends BI.Widget { }, { type: Button, + $value: 'title-maintain-connection-test', text: BI.i18nText('Dec-Dcm_Connection_Test'), level: 'ignore', handler: () => { @@ -37,6 +39,7 @@ export class TitleMaintainWidget extends BI.Widget { }, { type: Button, + $value: 'title-maintain-save', text: BI.i18nText('BI-Basic_Save'), handler: () => { this.store.setSaveEvent(); From d0174b50a56256440b723d9157c3189025379cd6 Mon Sep 17 00:00:00 2001 From: congqiu Date: Tue, 23 Jun 2020 15:55:31 +0800 Subject: [PATCH 06/11] =?UTF-8?q?DEC-13832=20fix:=20=E8=B0=83=E6=95=B4id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/pages/database/database_type/database_type.ts | 2 +- src/modules/pages/database/filter/filter.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/pages/database/database_type/database_type.ts b/src/modules/pages/database/database_type/database_type.ts index 346f3fc..290bf74 100644 --- a/src/modules/pages/database/database_type/database_type.ts +++ b/src/modules/pages/database/database_type/database_type.ts @@ -19,7 +19,7 @@ export class DatebaseType extends BI.BasicButton { databaseType: '', iconUrl: '', baseCls: 'dec-dcm-datebase-type', - $testId: 'dec-dcm-datebase-type', + $testId: 'dec-dcm-database-type', } img: any; diff --git a/src/modules/pages/database/filter/filter.ts b/src/modules/pages/database/filter/filter.ts index 77f072a..c0fda51 100644 --- a/src/modules/pages/database/filter/filter.ts +++ b/src/modules/pages/database/filter/filter.ts @@ -11,7 +11,7 @@ export class Filter extends BI.BasicButton { text: '', value: '', baseCls: 'bi-list-item-active2', - $testId: 'dec-dcm-datebase-filter', + $testId: 'dec-dcm-database-filter', } render() { From c46e0215185969a4a8db7cb0c4159895ebac97c4 Mon Sep 17 00:00:00 2001 From: congqiu Date: Tue, 23 Jun 2020 15:57:12 +0800 Subject: [PATCH 07/11] =?UTF-8?q?fix=EF=BC=9A=E8=B0=83=E6=95=B4=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/pages/database/database_type/database_type.less | 2 +- src/modules/pages/database/database_type/database_type.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/pages/database/database_type/database_type.less b/src/modules/pages/database/database_type/database_type.less index 3fac961..e0a1aa1 100644 --- a/src/modules/pages/database/database_type/database_type.less +++ b/src/modules/pages/database/database_type/database_type.less @@ -1,6 +1,6 @@ @import '../../../../less/index.less'; -.dec-dcm-datebase-type{ +.dec-dcm-database-type{ .bi-list-item-active{ &:hover{ .box-shadow(0 1px 5px 0, fade(@color-bi-background-black, 20)); diff --git a/src/modules/pages/database/database_type/database_type.ts b/src/modules/pages/database/database_type/database_type.ts index 290bf74..68b6f7e 100644 --- a/src/modules/pages/database/database_type/database_type.ts +++ b/src/modules/pages/database/database_type/database_type.ts @@ -18,7 +18,7 @@ export class DatebaseType extends BI.BasicButton { keyword: '', databaseType: '', iconUrl: '', - baseCls: 'dec-dcm-datebase-type', + baseCls: 'dec-dcm-database-type', $testId: 'dec-dcm-database-type', } From 60eb6a5e9a6cfd6f4ce14b303a0d92a3719340e6 Mon Sep 17 00:00:00 2001 From: qcc Date: Tue, 7 Jul 2020 10:18:26 +0800 Subject: [PATCH 08/11] =?UTF-8?q?DEC-14009=201.8=E4=BB=A5=E4=B8=8A?= =?UTF-8?q?=E7=89=88=E6=9C=ACJDK=E6=94=AF=E6=8C=81ODBC=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/constants/constant.ts | 3 +++ src/modules/pages/maintain/forms/form.server.ts | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index 2a5c9d2..1caf7b9 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -9,6 +9,9 @@ export const PAGE_INDEX = { export const OTHER_JDBC = 'otherJDBC'; +export const JDBC_ODBC_DRIVER = 'sun.jdbc.odbc.JdbcOdbcDriver'; +export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst.Hyperlink.Database.OTHER_ODBC; + export const DATEBASE_FILTER_TYPE = { COMMONLY: 'commonly', ALL: 'all', diff --git a/src/modules/pages/maintain/forms/form.server.ts b/src/modules/pages/maintain/forms/form.server.ts index 8ec4473..e144378 100644 --- a/src/modules/pages/maintain/forms/form.server.ts +++ b/src/modules/pages/maintain/forms/form.server.ts @@ -1,6 +1,6 @@ import { Connection, ConnectionJDBC } from '../../../crud/crud.typings'; import { connectionType, errorCode } from '@constants/env'; -import { DATA_BASE_DRIVER_LINK } from '@constants/constant'; +import { DATA_BASE_DRIVER_LINK, JDBC_ODBC_DRIVER, JDBC_ODBC_DRIVER_HELP_LINK } from '@constants/constant'; import { TestStatusXtype, EVENT_RELOAD, EVENT_CLOSE } from '../../../components/test_status/test_status'; import { ApiFactory } from '../../../crud/apiFactory'; const api = new ApiFactory().create(); @@ -23,6 +23,12 @@ export function testConnection(value: Connection): Promise { if (api.isDriverError(re.errorCode)) { if (formValue.connectionType === connectionType.JDBC) { const driver = (formValue.connectionData as ConnectionJDBC).driver; + // DEC-14009 1.8以上版本JDK支持ODBC连接 + if (driver === JDBC_ODBC_DRIVER) { + testStatus.setFail(re.errorMsg, driver, Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][JDBC_ODBC_DRIVER_HELP_LINK]); + + return; + } const databaseType = (formValue.connectionData as ConnectionJDBC).database; const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link'); testStatus.setFail(re.errorMsg, driver, Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink]); From 45b5acc225ceb9c027279da2b25c18c697e71fd0 Mon Sep 17 00:00:00 2001 From: qcc Date: Tue, 7 Jul 2020 13:56:18 +0800 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/constants/constant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index 1caf7b9..deb0df8 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -10,7 +10,7 @@ export const PAGE_INDEX = { export const OTHER_JDBC = 'otherJDBC'; export const JDBC_ODBC_DRIVER = 'sun.jdbc.odbc.JdbcOdbcDriver'; -export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst.Hyperlink.Database.OTHER_ODBC; +export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst && DecCst.Hyperlink ? DecCst.Hyperlink.Database.OTHER_ODBC : ''; export const DATEBASE_FILTER_TYPE = { COMMONLY: 'commonly', From 9a82045c0cc1ebee85521e4eeeb3643e1b6f6151 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 14 Jul 2020 20:10:33 +0800 Subject: [PATCH 10/11] =?UTF-8?q?KERNEL-4727=20refactor:=20=E3=80=90?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E3=80=91=E4=BD=BF=E7=94=A8babel-preset-fineu?= =?UTF-8?q?i=E6=8F=92=E4=BB=B6=E9=85=8D=E7=BD=AEbabel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 2 ++ babel.config.js | 30 ++---------------------------- package.json | 5 ++--- 3 files changed, 6 insertions(+), 31 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..92937ea --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +puppeteer_download_host=https://npm.taobao.org/mirrors +@fui:registry=https://npm.fineres.com/ diff --git a/babel.config.js b/babel.config.js index d83931d..9085ac7 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,29 +1,3 @@ -module.exports = function(api) { - api.cache(true); - const presets = [ - [ - '@babel/preset-env', - { - targets: { - ie: 9, - chrome: 47, - }, - }, - ], - '@babel/preset-typescript', - ]; - const plugins = [ - [ - '@babel/plugin-proposal-decorators', - { - legacy: true, - }, - ], - '@babel/plugin-proposal-class-properties', - ]; - - return { - presets, - plugins, - }; +module.exports = function (api) { + return require("@fui/babel-preset-fineui").configs.base(api) }; diff --git a/package.json b/package.json index 9cd2bb5..1395fd6 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,7 @@ "webpack-cli": "3.3.5", "webpack-dev-server": "3.7.2", "webpack-merge": "4.2.1", - "ydoc": "4.1.0", - "ydoc-plugin-jsdoc": "0.0.3" + "@fui/babel-preset-fineui": "^1.0.0" }, "optionalDependencies": { "fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git", @@ -79,4 +78,4 @@ "pre-push": "npm run eslint && npm run test" } } -} +} \ No newline at end of file From 7a728342e743b2d9c76170a1a2f7062980c1f444 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 14 Jul 2020 20:41:42 +0800 Subject: [PATCH 11/11] =?UTF-8?q?KERNEL-4727=20refactor:=20=E3=80=90?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E3=80=91=E4=BD=BF=E7=94=A8babel-preset-fineu?= =?UTF-8?q?i=E6=8F=92=E4=BB=B6=E9=85=8D=E7=BD=AEbabel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/jest.environment.js | 2 +- index.html | 50 +++++++++++++++----------------------- package.json | 10 ++------ webpack/webpack.dev.js | 2 +- 4 files changed, 23 insertions(+), 41 deletions(-) diff --git a/config/jest.environment.js b/config/jest.environment.js index b564081..2a3541f 100644 --- a/config/jest.environment.js +++ b/config/jest.environment.js @@ -12,7 +12,7 @@ class FineUiEnvironment extends JsdomEnvironment { [ '../node_modules/fineui/dist/fineui.js', - '../node_modules/fineui-materials/docs/materials.js', + '../node_modules/@fui/materials/docs/materials.js', '../config/fineui.prepare.js', './fineui.setup.js', ].forEach(scriptRelativePath => { diff --git a/index.html b/index.html index cfb9c39..f8c5d5f 100644 --- a/index.html +++ b/index.html @@ -1,34 +1,22 @@ - - - Fine Report - - - - - - -
- - - - - - - + + + Fine Report + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/package.json b/package.json index 1395fd6..e0abeca 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,6 @@ "nprogress": "0.2.0" }, "devDependencies": { - "@babel/core": "7.4.5", - "@babel/plugin-proposal-class-properties": "^7.5.0", - "@babel/plugin-proposal-decorators": "7.4.4", - "@babel/polyfill": "^7.8.3", - "@babel/preset-env": "7.4.5", - "@babel/preset-typescript": "7.3.3", "@types/jest": "24.0.11", "@typescript-eslint/eslint-plugin": "1.7.0", "@typescript-eslint/parser": "1.7.0", @@ -60,8 +54,8 @@ "@fui/babel-preset-fineui": "^1.0.0" }, "optionalDependencies": { - "fineui": "git+ssh://git@cloud.finedevelop.com:7999/visual/fineui.git", - "fineui-materials": "git+ssh://git@cloud.finedevelop.com:7999/fui/fineui-materials.git#release/10.0" + "fineui": "^2.0.0", + "@fui/materials": "10.0.0-release - 10.0.0-release.99999999999999" }, "scripts": { "dev": "cross-env NODE_ENV=mock webpack-dev-server -p --progress --config=webpack/webpack.dev.js --mode development --open", diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js index 2c6e1ab..d93e397 100644 --- a/webpack/webpack.dev.js +++ b/webpack/webpack.dev.js @@ -36,7 +36,7 @@ chokidar module.exports = merge(common, { devtool: 'eval-source-map', entry: { - show: ['babel-polyfill', './src/i18n.ts', './src/request.ts', './src/index.ts'], + show: ['./src/i18n.ts', './src/request.ts', './src/index.ts'], }, output: { path: dirs.DEST,