From 0c7bc0425d51303940aa8f21ad56901144cfbda6 Mon Sep 17 00:00:00 2001 From: alan Date: Fri, 24 May 2019 10:05:03 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- private/constants.ts | 157 +++++++++--------- src/app/{app.component.ts => app.ts} | 6 +- src/app/link_set/left/left.service.ts | 2 +- .../left/{left.component.ts => left.ts} | 4 +- .../{left.item.component.ts => left_item.ts} | 4 +- ...em.icon.component.ts => left_item_icon.ts} | 2 +- .../{link-set.model.ts => link_set.model.ts} | 2 +- ...ink-set.service.ts => link_set.service.ts} | 0 .../{link-set.component.ts => link_set.ts} | 8 +- ...e.link.service.ts => more_link.service.ts} | 4 +- .../{more.link.component.ts => more_link.ts} | 6 +- ...nk.item.component.ts => more_link_item.ts} | 10 +- .../{nothing.component.ts => nothing.ts} | 4 +- .../right/{right.component.ts => right.ts} | 12 +- ...ail.service.ts => right_detail.service.ts} | 12 +- ...ht.detail.component.ts => right_detail.ts} | 4 +- ....edit.service.ts => right_edit.service.ts} | 0 ...{right.edit.component.ts => right_edit.ts} | 8 +- ...t.jndi.component.ts => right_edit_jndi.ts} | 2 +- ...mysql.component.ts => right_edit_mysql.ts} | 8 +- ...{right.show.component.ts => right_show.ts} | 6 +- ...w.jndi.component.ts => right_show_jndi.ts} | 2 +- ...ight.title.component.ts => right_title.ts} | 8 +- .../select/{select.component.ts => select.ts} | 4 +- src/app/link_status/left/left.service.ts | 2 +- .../left/{left.component.ts => left.ts} | 0 .../{left.item.component.ts => left_item.ts} | 0 ...ink_status.component.ts => link_status.ts} | 4 +- .../right/{right.component.ts => right.ts} | 14 +- ...{right.card.component.ts => right_card.ts} | 8 +- .../title/{title.component.ts => title.ts} | 2 +- ...{title_item.component.ts => title_item.ts} | 0 src/index.ts | 4 +- .../{both.side.component.ts => both_side.ts} | 2 +- .../{form.item.component.ts => form_item.ts} | 0 .../{title.component.ts => title.ts} | 0 36 files changed, 158 insertions(+), 153 deletions(-) rename src/app/{app.component.ts => app.ts} (83%) rename src/app/link_set/left/{left.component.ts => left.ts} (92%) rename src/app/link_set/left/left_item/{left.item.component.ts => left_item.ts} (95%) rename src/app/link_set/left/left_item/{left.item.icon.component.ts => left_item_icon.ts} (98%) rename src/app/link_set/{link-set.model.ts => link_set.model.ts} (99%) rename src/app/link_set/{link-set.service.ts => link_set.service.ts} (100%) rename src/app/link_set/{link-set.component.ts => link_set.ts} (84%) rename src/app/link_set/more/{more.link.service.ts => more_link.service.ts} (95%) rename src/app/link_set/more/{more.link.component.ts => more_link.ts} (88%) rename src/app/link_set/more/{more.link.item.component.ts => more_link_item.ts} (84%) rename src/app/link_set/right/{nothing.component.ts => nothing.ts} (94%) rename src/app/link_set/right/{right.component.ts => right.ts} (78%) rename src/app/link_set/right/right_detail/{right.detail.service.ts => right_detail.service.ts} (76%) rename src/app/link_set/right/right_detail/{right.detail.component.ts => right_detail.ts} (88%) rename src/app/link_set/right/right_edit/{right.edit.service.ts => right_edit.service.ts} (100%) rename src/app/link_set/right/right_edit/{right.edit.component.ts => right_edit.ts} (97%) rename src/app/link_set/right/right_edit/{right.edit.jndi.component.ts => right_edit_jndi.ts} (98%) rename src/app/link_set/right/right_edit/{right.edit.mysql.component.ts => right_edit_mysql.ts} (96%) rename src/app/link_set/right/right_show/{right.show.component.ts => right_show.ts} (92%) rename src/app/link_set/right/right_show/{right.show.jndi.component.ts => right_show_jndi.ts} (98%) rename src/app/link_set/right/right_title/{right.title.component.ts => right_title.ts} (92%) rename src/app/link_set/select/{select.component.ts => select.ts} (95%) rename src/app/link_status/left/{left.component.ts => left.ts} (100%) rename src/app/link_status/left/{left.item.component.ts => left_item.ts} (100%) rename src/app/link_status/{link_status.component.ts => link_status.ts} (93%) rename src/app/link_status/right/{right.component.ts => right.ts} (89%) rename src/app/link_status/right/{right.card.component.ts => right_card.ts} (93%) rename src/app/title/{title.component.ts => title.ts} (95%) rename src/app/title/title_item/{title_item.component.ts => title_item.ts} (100%) rename src/shared/components/{both.side.component.ts => both_side.ts} (97%) rename src/shared/components/{form.item.component.ts => form_item.ts} (100%) rename src/shared/components/{title.component.ts => title.ts} (100%) diff --git a/private/constants.ts b/private/constants.ts index 7c1a515..68aa3a3 100644 --- a/private/constants.ts +++ b/private/constants.ts @@ -12,81 +12,7 @@ export const TAB_LINK_POOL = 'TAB_LINK_POOL'; export const DATA_LINKS = ['APACHE KYLIN', 'DERBY', 'HP Vertica', 'IBM DB2', 'INFORMIX', 'Microsoft SQL Server', 'MySQL', 'Oracle', 'Privotal Greenplum Database', 'Postgresql', 'GaussDB 200', 'JNDI']; -export const DATA_BASE_TYPE = [ - { - text: 'APACHE KYLIN', - databaseType: 'apache-kylin', - driver: 'org.apache.kylin.jdbc.Driver', - url: 'jdbc:kylin://:/', - }, - { - text: 'DERBY', - databaseType: 'derby', - driver: 'org.apache.derby.jdbc.ClientDriver', - url: 'jdbc:derby://localhost:1527/', - }, - { - text: 'HP Vertica', - databaseType: 'hp-vertica', - driver: 'com.vertica.jdbc.Driver', - url: 'jdbc:vertica://ip:port/databaseName', - }, - { - text: 'IBM DB2', - databaseType: 'ibm-db2', - driver: 'com.ibm.db2.jcc.DB2Driver', - url: 'jdbc:db2://hostname:port/dbname', - }, - { - text: 'INFORMIX', - databaseType: 'informix', - driver: 'com.informix.jdbc.IfxDriver', - url: 'jdbc:informix-sqli://{host}:{port}/{database}:INFORMIXSERVER={server}', - }, - { - text: 'Microsoft SQL Server', - databaseType: 'sql-server', - driver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver', - url: 'jdbc:sqlserver://localhost:1433;databaseName=', - }, - { - text: 'Oracle', - databaseType: 'oracle', - driver: 'oracle.jdbc.driver.OracleDriver', - url: 'jdbc:oracle:thin:@localhost:1521:databaseName', - }, - { - text: 'Privotal Greenplum Database', - databaseType: 'pivotal-greenplum-database', - driver: 'org.postgresql.Driver', - url: 'jdbc:postgresql://hostname:port/dbname', - }, - { - text: 'Postgresql', - databaseType: 'postgresql', - driver: 'org.postgresql.Driver', - url: 'jdbc:postgresql://hostname:port/dbname', - }, - { - text: 'GaussDB 200', - databaseType: 'hw-libr-a', - driver: 'org.postgresql.Driver', - url: 'jdbc:postgresql://hostname:port/dbname', - }, - { - text: 'MySQL', - databaseType: 'mysql', - driver: 'com.mysql.jdbc.Driver', - drivers: ['com.mysql.jdbc.Driver', 'org.gjt.mm.mysql.Driver'], - url: 'jdbc:mysql://localhost/dbname', - }, - { - text: OTHER_CONNECT, - databaseType: 'other', - driver: 'org.h2.Driver', - drivers: ['org.h2.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], - url: 'jdbc:h2://${ENV_HOME}/../databaseName', - }, +export const DATA_BASE_TYPE_OTHER = [ { text: 'ADS', databaseType: 'ads', @@ -269,7 +195,86 @@ export const DATA_BASE_TYPE = [ databaseType: 'transwarp-inceptor', driver: 'org.apache.hive.jdbc.HiveDriver', url: 'jdbc:hive2://hostname:port/databasename', - }, { + }, +]; + +export const DATA_BASE_TYPE = [ + { + text: 'APACHE KYLIN', + databaseType: 'apache-kylin', + driver: 'org.apache.kylin.jdbc.Driver', + url: 'jdbc:kylin://:/', + }, + { + text: 'DERBY', + databaseType: 'derby', + driver: 'org.apache.derby.jdbc.ClientDriver', + url: 'jdbc:derby://localhost:1527/', + }, + { + text: 'HP Vertica', + databaseType: 'hp-vertica', + driver: 'com.vertica.jdbc.Driver', + url: 'jdbc:vertica://ip:port/databaseName', + }, + { + text: 'IBM DB2', + databaseType: 'ibm-db2', + driver: 'com.ibm.db2.jcc.DB2Driver', + url: 'jdbc:db2://hostname:port/dbname', + }, + { + text: 'INFORMIX', + databaseType: 'informix', + driver: 'com.informix.jdbc.IfxDriver', + url: 'jdbc:informix-sqli://{host}:{port}/{database}:INFORMIXSERVER={server}', + }, + { + text: 'Microsoft SQL Server', + databaseType: 'sql-server', + driver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver', + url: 'jdbc:sqlserver://localhost:1433;databaseName=', + }, + { + text: 'Oracle', + databaseType: 'oracle', + driver: 'oracle.jdbc.driver.OracleDriver', + url: 'jdbc:oracle:thin:@localhost:1521:databaseName', + }, + { + text: 'Privotal Greenplum Database', + databaseType: 'pivotal-greenplum-database', + driver: 'org.postgresql.Driver', + url: 'jdbc:postgresql://hostname:port/dbname', + }, + { + text: 'Postgresql', + databaseType: 'postgresql', + driver: 'org.postgresql.Driver', + url: 'jdbc:postgresql://hostname:port/dbname', + }, + { + text: 'GaussDB 200', + databaseType: 'hw-libr-a', + driver: 'org.postgresql.Driver', + url: 'jdbc:postgresql://hostname:port/dbname', + }, + { + text: 'MySQL', + databaseType: 'mysql', + driver: 'com.mysql.jdbc.Driver', + drivers: ['com.mysql.jdbc.Driver', 'org.gjt.mm.mysql.Driver'], + url: 'jdbc:mysql://localhost/dbname', + }, + { + text: OTHER_CONNECT, + databaseType: 'other', + driver: 'org.h2.Driver', + drivers: ['org.h2.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], + url: 'jdbc:h2://${ENV_HOME}/../databaseName', + }, + ...DATA_BASE_TYPE_OTHER, + { text: JNDI_CONNECT, }, ]; diff --git a/src/app/app.component.ts b/src/app/app.ts similarity index 83% rename from src/app/app.component.ts rename to src/app/app.ts index 96b5730..6682d8d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.ts @@ -1,9 +1,9 @@ import {Vtape} from '../ui/index'; import {LinkType} from '@ui/type'; import appModel from './app.model'; -import title from './title/title.component'; -import linkSet from './link_set/link-set.component'; -import linkStatus from './link_status/link_status.component'; +import title from './title/title'; +import linkSet from './link_set/link_set'; +import linkStatus from './link_status/link_status'; import {fetchLinkList} from '../shared/crud/crud.request'; import './app.component.scss'; diff --git a/src/app/link_set/left/left.service.ts b/src/app/link_set/left/left.service.ts index 8f792c4..4d8c58f 100644 --- a/src/app/link_set/left/left.service.ts +++ b/src/app/link_set/left/left.service.ts @@ -1,5 +1,5 @@ import {LinkType} from '@ui/type'; -import LeftItem from './left_item/left.item.component'; +import LeftItem from './left_item/left_item'; export const getLinks = (linkList: LinkType[]): any => { const links: any[] = []; diff --git a/src/app/link_set/left/left.component.ts b/src/app/link_set/left/left.ts similarity index 92% rename from src/app/link_set/left/left.component.ts rename to src/app/link_set/left/left.ts index 0d4c53a..dad09bd 100644 --- a/src/app/link_set/left/left.component.ts +++ b/src/app/link_set/left/left.ts @@ -1,5 +1,5 @@ import {WidgetType, Vertical} from '@ui'; -import Model from '../link-set.model'; +import Model from '../link_set.model'; import {LinkType} from '@ui/type'; import {getLinks} from './left.service'; const className = 'fr.component.linkset.left'; @@ -8,7 +8,7 @@ const Widget: WidgetType = { _store() { return BI.Models.getModel(Model); }, - watch:{ + watch: { linkList(linkList: LinkType[]) { leftContent.populate(BI.createItems(getLinks(linkList))); }, diff --git a/src/app/link_set/left/left_item/left.item.component.ts b/src/app/link_set/left/left_item/left_item.ts similarity index 95% rename from src/app/link_set/left/left_item/left.item.component.ts rename to src/app/link_set/left/left_item/left_item.ts index 660d803..c75dfa6 100644 --- a/src/app/link_set/left/left_item/left.item.component.ts +++ b/src/app/link_set/left/left_item/left_item.ts @@ -1,6 +1,6 @@ import {WidgetType, Left, Label, Icon, TextButton} from '@ui'; -import ItemIcon from './left.item.icon.component'; -import Model from '../../link-set.model'; +import ItemIcon from './left_item_icon'; +import Model from '../../link_set.model'; import {ACTION_COPY, ACTION_TEST, ACTION_DELETE, DEFAULT_INFO} from '@private/constants'; const className = 'fr.component.linkSet.left.item'; const Widget: WidgetType = { diff --git a/src/app/link_set/left/left_item/left.item.icon.component.ts b/src/app/link_set/left/left_item/left_item_icon.ts similarity index 98% rename from src/app/link_set/left/left_item/left.item.icon.component.ts rename to src/app/link_set/left/left_item/left_item_icon.ts index 3079d35..9bffb2e 100644 --- a/src/app/link_set/left/left_item/left.item.icon.component.ts +++ b/src/app/link_set/left/left_item/left_item_icon.ts @@ -1,5 +1,5 @@ import {WidgetType, Icon, BubbleCombo, TextBubblePopupBarView, IconButton} from '@ui/index'; -import Model from '../../link-set.model'; +import Model from '../../link_set.model'; import {ACTION_DELETE} from '@private/constants'; const className = 'fr.component.linkSet.left.item.icon'; diff --git a/src/app/link_set/link-set.model.ts b/src/app/link_set/link_set.model.ts similarity index 99% rename from src/app/link_set/link-set.model.ts rename to src/app/link_set/link_set.model.ts index 2ce1b2b..ba8aae4 100644 --- a/src/app/link_set/link-set.model.ts +++ b/src/app/link_set/link_set.model.ts @@ -4,7 +4,7 @@ import {deleteConnection, testConnection} from '@shared/crud/crud.request'; import {getCnnectionName} from './select/select.service'; import {DATA_BASE_TYPE} from '@private/constants'; import dialog from '@shared/service/dialog.service'; -import {saveConnection} from './link-set.service'; +import {saveConnection} from './link_set.service'; const className = 'fr.model.linkset'; const Model: ModelType = { diff --git a/src/app/link_set/link-set.service.ts b/src/app/link_set/link_set.service.ts similarity index 100% rename from src/app/link_set/link-set.service.ts rename to src/app/link_set/link_set.service.ts diff --git a/src/app/link_set/link-set.component.ts b/src/app/link_set/link_set.ts similarity index 84% rename from src/app/link_set/link-set.component.ts rename to src/app/link_set/link_set.ts index 4795ca7..599efb2 100644 --- a/src/app/link_set/link-set.component.ts +++ b/src/app/link_set/link_set.ts @@ -1,8 +1,8 @@ import {Htape, WidgetType, Vtape, Left} from '@ui'; -import LeftList from './left/left.component'; -import linkSetModel from './link-set.model'; -import Select from './select/select.component'; -import Right from './right/right.component'; +import LeftList from './left/left'; +import linkSetModel from './link_set.model'; +import Select from './select/select'; +import Right from './right/right'; import {TAB_LINK_SET} from '@private/constants'; const className = 'fr.linkset'; const Widget: WidgetType = { diff --git a/src/app/link_set/more/more.link.service.ts b/src/app/link_set/more/more_link.service.ts similarity index 95% rename from src/app/link_set/more/more.link.service.ts rename to src/app/link_set/more/more_link.service.ts index cf2c654..b225ccc 100644 --- a/src/app/link_set/more/more.link.service.ts +++ b/src/app/link_set/more/more_link.service.ts @@ -1,4 +1,4 @@ -import MoreLink from './more.link.component'; +import MoreLink from './more_link'; let SubbitButton: any = null; let selectKey = ''; export const moreLink = (onConfirm?: Function): void => { @@ -22,7 +22,7 @@ export const moreLink = (onConfirm?: Function): void => { }, ], }, - footer:{ + footer: { type: 'bi.right_vertical_adapt', lgap: 10, items: [{ diff --git a/src/app/link_set/more/more.link.component.ts b/src/app/link_set/more/more_link.ts similarity index 88% rename from src/app/link_set/more/more.link.component.ts rename to src/app/link_set/more/more_link.ts index 32fbc90..00715c2 100644 --- a/src/app/link_set/more/more.link.component.ts +++ b/src/app/link_set/more/more_link.ts @@ -1,6 +1,6 @@ import {WidgetType, Vertical, SearchEditor, Left, Vtape} from '@ui/index'; -import {DATA_BASE_TYPE} from '@private/constants'; -import MoreLinkItem from './more.link.item.component'; +import {DATA_BASE_TYPE_OTHER} from '@private/constants'; +import MoreLinkItem from './more_link_item'; const className = 'fr.component.linkSet.morelink'; let morkLinkItem: any = null; const Widget: WidgetType = { @@ -34,7 +34,7 @@ const Widget: WidgetType = { this._renderItems(); }, _renderItems(text = '') { - const databaseLink = DATA_BASE_TYPE.slice(12, 12 + 33); + const databaseLink = DATA_BASE_TYPE_OTHER; const items: any[] = []; const that = this; databaseLink.forEach(item => { diff --git a/src/app/link_set/more/more.link.item.component.ts b/src/app/link_set/more/more_link_item.ts similarity index 84% rename from src/app/link_set/more/more.link.item.component.ts rename to src/app/link_set/more/more_link_item.ts index 0b2724f..1f5f187 100644 --- a/src/app/link_set/more/more.link.item.component.ts +++ b/src/app/link_set/more/more_link_item.ts @@ -6,24 +6,24 @@ const Widget: WidgetType = { return { type: Vertical, - cls:'link-item', + cls: 'link-item', width: 120, height: 117, - items:[ + items: [ { type: Img, width: 120, height: 90, - src:`./img/${name}.jpg`, + src: `./img/${name}.jpg`, }, { type: Layout, cls: 'selected', invisible: !selected, - width:30, + width: 30, height: 30, }, { type: Label, - cls:'text', + cls: 'text', text, }, ], diff --git a/src/app/link_set/right/nothing.component.ts b/src/app/link_set/right/nothing.ts similarity index 94% rename from src/app/link_set/right/nothing.component.ts rename to src/app/link_set/right/nothing.ts index d3d4343..b98307f 100644 --- a/src/app/link_set/right/nothing.component.ts +++ b/src/app/link_set/right/nothing.ts @@ -8,7 +8,7 @@ const Widget: WidgetType = { type: Vertical, width: 260, height: 180, - items:[ + items: [ { type: Layout, cls: 'data-connection-background', @@ -16,7 +16,7 @@ const Widget: WidgetType = { height: 130, }, { - type:Label, + type: Label, height: 20, text: BI.i18nText('Dec-Dcm_Connection_Plase_Add_One'), }, diff --git a/src/app/link_set/right/right.component.ts b/src/app/link_set/right/right.ts similarity index 78% rename from src/app/link_set/right/right.component.ts rename to src/app/link_set/right/right.ts index 060a7fd..3daed45 100644 --- a/src/app/link_set/right/right.component.ts +++ b/src/app/link_set/right/right.ts @@ -1,15 +1,15 @@ import {WidgetType, Vertical} from '@ui'; import {LinkType} from '@ui/type'; -import Nothing from './nothing.component'; -import RightDetail from './right_detail/right.detail.component'; -import Model from '../link-set.model'; +import Nothing from './nothing'; +import RightDetail from './right_detail/right_detail'; +import Model from '../link_set.model'; let rightContent: any = null; const className = 'fr.component.right'; const Widget: WidgetType = { _store() { return BI.Models.getModel(Model); }, - watch:{ + watch: { linkSelected(linkSelected: LinkType) { rightContent.populate(BI.createItems([ { @@ -20,8 +20,8 @@ const Widget: WidgetType = { }, render() { return { - type:Vertical, - cls:'database-right', + type: Vertical, + cls: 'database-right', ref(_ref: any) { rightContent = _ref; }, diff --git a/src/app/link_set/right/right_detail/right.detail.service.ts b/src/app/link_set/right/right_detail/right_detail.service.ts similarity index 76% rename from src/app/link_set/right/right_detail/right.detail.service.ts rename to src/app/link_set/right/right_detail/right_detail.service.ts index b1b2dd5..392a317 100644 --- a/src/app/link_set/right/right_detail/right.detail.service.ts +++ b/src/app/link_set/right/right_detail/right_detail.service.ts @@ -1,9 +1,9 @@ -import Title from '../right_title/right.title.component'; -import RightShow from '../right_show/right.show.component'; -import RightShowJndi from '../right_show/right.show.jndi.component'; -import RightEdit from '../right_edit/right.edit.component'; -import RightEditMysql from '../right_edit/right.edit.mysql.component'; -import RightEditJndi from '../right_edit/right.edit.jndi.component'; +import Title from '../right_title/right_title'; +import RightShow from '../right_show/right_show'; +import RightShowJndi from '../right_show/right_show_jndi'; +import RightEdit from '../right_edit/right_edit'; +import RightEditMysql from '../right_edit/right_edit_mysql'; +import RightEditJndi from '../right_edit/right_edit_jndi'; import {LinkType} from '@ui/type'; import pluginListConstant from '../../../app.constant'; import {MYSQL_CONNECT, JNDI_CONNECT} from '@private/constants'; diff --git a/src/app/link_set/right/right_detail/right.detail.component.ts b/src/app/link_set/right/right_detail/right_detail.ts similarity index 88% rename from src/app/link_set/right/right_detail/right.detail.component.ts rename to src/app/link_set/right/right_detail/right_detail.ts index ed73d26..66f546d 100644 --- a/src/app/link_set/right/right_detail/right.detail.component.ts +++ b/src/app/link_set/right/right_detail/right_detail.ts @@ -1,6 +1,6 @@ import {WidgetType, Vertical} from '@ui/index'; -import Model from '../../link-set.model'; -import {renderEdit} from './right.detail.service'; +import Model from '../../link_set.model'; +import {renderEdit} from './right_detail.service'; import {LinkType} from '@ui/type'; const className = 'fr.component.right.detail'; diff --git a/src/app/link_set/right/right_edit/right.edit.service.ts b/src/app/link_set/right/right_edit/right_edit.service.ts similarity index 100% rename from src/app/link_set/right/right_edit/right.edit.service.ts rename to src/app/link_set/right/right_edit/right_edit.service.ts diff --git a/src/app/link_set/right/right_edit/right.edit.component.ts b/src/app/link_set/right/right_edit/right_edit.ts similarity index 97% rename from src/app/link_set/right/right_edit/right.edit.component.ts rename to src/app/link_set/right/right_edit/right_edit.ts index 0b943bd..b9bc1c2 100644 --- a/src/app/link_set/right/right_edit/right.edit.component.ts +++ b/src/app/link_set/right/right_edit/right_edit.ts @@ -1,10 +1,10 @@ import {WidgetType, Vertical, MultiSelectItem, TextAreaEditor, Editor, Button, TextValueCombo} from '@ui/index'; import {LinkType} from '@ui/type'; import {CONNECT_CHARSET} from '@private/constants'; -import Model from '../../link-set.model'; -import FormItem from '@shared/components/form.item.component'; -import Title from '@shared/components/title.component'; -import {getDrivers, connectNameChecker} from './right.edit.service'; +import Model from '../../link_set.model'; +import FormItem from '@shared/components/form_item'; +import Title from '@shared/components/title'; +import {getDrivers, connectNameChecker} from './right_edit.service'; let ConnectionName: any = null; const className = 'fr.component.right.edit'; const Widget: WidgetType = { diff --git a/src/app/link_set/right/right_edit/right.edit.jndi.component.ts b/src/app/link_set/right/right_edit/right_edit_jndi.ts similarity index 98% rename from src/app/link_set/right/right_edit/right.edit.jndi.component.ts rename to src/app/link_set/right/right_edit/right_edit_jndi.ts index 02d0e76..cfb252b 100644 --- a/src/app/link_set/right/right_edit/right.edit.jndi.component.ts +++ b/src/app/link_set/right/right_edit/right_edit_jndi.ts @@ -1,5 +1,5 @@ import {Vertical, Editor, TextValueCombo, TextButton, Label} from '@ui'; -import FormItem from '@shared/components/form.item.component'; +import FormItem from '@shared/components/form_item'; import {JNDI_FACTORYS, OTHER_ATTRIBUTES, CONNECT_CHARSET} from '@private/constants'; import {AttributeType} from '../right.typing'; diff --git a/src/app/link_set/right/right_edit/right.edit.mysql.component.ts b/src/app/link_set/right/right_edit/right_edit_mysql.ts similarity index 96% rename from src/app/link_set/right/right_edit/right.edit.mysql.component.ts rename to src/app/link_set/right/right_edit/right_edit_mysql.ts index b7b55a5..8ed5437 100644 --- a/src/app/link_set/right/right_edit/right.edit.mysql.component.ts +++ b/src/app/link_set/right/right_edit/right_edit_mysql.ts @@ -1,10 +1,10 @@ import {WidgetType, Vertical, MultiSelectItem, TextAreaEditor, Editor, Button, TextValueCombo} from '@ui/index'; import {LinkType} from '@ui/type'; import {CONNECT_CHARSET} from '@private/constants'; -import Model from '../../link-set.model'; -import FormItem from '@shared/components/form.item.component'; -import Title from '@shared/components/title.component'; -import {getDrivers, connectNameChecker} from './right.edit.service'; +import Model from '../../link_set.model'; +import FormItem from '@shared/components/form_item'; +import Title from '@shared/components/title'; +import {getDrivers, connectNameChecker} from './right_edit.service'; const className = 'fr.component.right.edit.mysql'; const Widget: WidgetType = { _store() { diff --git a/src/app/link_set/right/right_show/right.show.component.ts b/src/app/link_set/right/right_show/right_show.ts similarity index 92% rename from src/app/link_set/right/right_show/right.show.component.ts rename to src/app/link_set/right/right_show/right_show.ts index 74d293f..57b34cc 100644 --- a/src/app/link_set/right/right_show/right.show.component.ts +++ b/src/app/link_set/right/right_show/right_show.ts @@ -1,7 +1,7 @@ import {WidgetType, Vertical} from '@ui/index'; -import RightShowModel from '../../link-set.model'; -import BothSide from '@shared/components/both.side.component'; -import Title from '@shared/components/title.component'; +import RightShowModel from '../../link_set.model'; +import BothSide from '@shared/components/both_side'; +import Title from '@shared/components/title'; import {LinkType} from '@ui/type'; const className = 'fr.component.right.show'; const Widget: WidgetType = { diff --git a/src/app/link_set/right/right_show/right.show.jndi.component.ts b/src/app/link_set/right/right_show/right_show_jndi.ts similarity index 98% rename from src/app/link_set/right/right_show/right.show.jndi.component.ts rename to src/app/link_set/right/right_show/right_show_jndi.ts index b102726..a1365eb 100644 --- a/src/app/link_set/right/right_show/right.show.jndi.component.ts +++ b/src/app/link_set/right/right_show/right_show_jndi.ts @@ -1,5 +1,5 @@ import {Vertical, TextButton, Label} from '@ui'; -import FormItem from '@shared/components/form.item.component'; +import FormItem from '@shared/components/form_item'; import {OTHER_ATTRIBUTES} from '@private/constants'; import {AttributeType} from '../right.typing'; diff --git a/src/app/link_set/right/right_title/right.title.component.ts b/src/app/link_set/right/right_title/right_title.ts similarity index 92% rename from src/app/link_set/right/right_title/right.title.component.ts rename to src/app/link_set/right/right_title/right_title.ts index 5a1281f..1e44851 100644 --- a/src/app/link_set/right/right_title/right.title.component.ts +++ b/src/app/link_set/right/right_title/right_title.ts @@ -1,5 +1,5 @@ import {WidgetType, Left, Label, Button} from '@ui/index'; -import RightTitleModel from '../../link-set.model'; +import RightTitleModel from '../../link_set.model'; import {LinkType} from '@ui/type'; import {OTHER_CONNECT} from '@private/constants'; const className = 'fr.component.right.title'; @@ -26,7 +26,7 @@ const Widget: WidgetType = { }, { type: Button, - cls:'right-title-button', + cls: 'right-title-button', invisible: isEdit, text: BI.i18nText('Dec-Dcm_Edit'), handler() { @@ -35,7 +35,7 @@ const Widget: WidgetType = { }, { type: Button, - cls:'right-title-button', + cls: 'right-title-button', invisible: !isEdit, text: BI.i18nText('Dec-Dcm_Save'), handler() { @@ -49,7 +49,7 @@ const Widget: WidgetType = { }, { type: Button, - cls:'right-title-button', + cls: 'right-title-button', invisible: !isEdit, level: 'ignore', text: BI.i18nText('BI-Basic_Cancel'), diff --git a/src/app/link_set/select/select.component.ts b/src/app/link_set/select/select.ts similarity index 95% rename from src/app/link_set/select/select.component.ts rename to src/app/link_set/select/select.ts index 243dc04..ce333c9 100644 --- a/src/app/link_set/select/select.component.ts +++ b/src/app/link_set/select/select.ts @@ -1,6 +1,6 @@ import {WidgetType, Combo, ButtonGroup, TextItem, Vertical} from '@ui'; -import selectModel from '../link-set.model'; -import {moreLink} from '../more/more.link.service'; +import selectModel from '../link_set.model'; +import {moreLink} from '../more/more_link.service'; import connectList from '../../app.constant'; import {DATA_LINKS} from '@private/constants'; const className = 'fr.linkset.select'; diff --git a/src/app/link_status/left/left.service.ts b/src/app/link_status/left/left.service.ts index 2bfdf88..e2863e7 100644 --- a/src/app/link_status/left/left.service.ts +++ b/src/app/link_status/left/left.service.ts @@ -1,5 +1,5 @@ import {LinkType} from '@ui/type'; -import LeftItem from './left.item.component'; +import LeftItem from './left_item'; export const getLinks = (linkList: LinkType[], selectTitle = ''): any => { const links: any[] = []; diff --git a/src/app/link_status/left/left.component.ts b/src/app/link_status/left/left.ts similarity index 100% rename from src/app/link_status/left/left.component.ts rename to src/app/link_status/left/left.ts diff --git a/src/app/link_status/left/left.item.component.ts b/src/app/link_status/left/left_item.ts similarity index 100% rename from src/app/link_status/left/left.item.component.ts rename to src/app/link_status/left/left_item.ts diff --git a/src/app/link_status/link_status.component.ts b/src/app/link_status/link_status.ts similarity index 93% rename from src/app/link_status/link_status.component.ts rename to src/app/link_status/link_status.ts index c68caaf..85579d3 100644 --- a/src/app/link_status/link_status.component.ts +++ b/src/app/link_status/link_status.ts @@ -1,7 +1,7 @@ import {WidgetType, Htape, Vtape, Left, Label} from '@ui'; import linkStatusModel from './link_status.model'; -import LeftList from './left/left.component'; -import Right from './right/right.component'; +import LeftList from './left/left'; +import Right from './right/right'; import {TAB_LINK_POOL} from '@private/constants'; const className = 'fr.linkstatus'; diff --git a/src/app/link_status/right/right.component.ts b/src/app/link_status/right/right.ts similarity index 89% rename from src/app/link_status/right/right.component.ts rename to src/app/link_status/right/right.ts index c5da67c..22d73db 100644 --- a/src/app/link_status/right/right.component.ts +++ b/src/app/link_status/right/right.ts @@ -1,7 +1,7 @@ import {WidgetType, Vertical, Left, Label} from '@ui/index'; import Model from './right.model'; import {info} from '@shared/crud/crud.request'; -import RightCard from './right.card.component'; +import RightCard from './right_card'; import {InfoType} from './right.typings'; import {LinkType} from '@ui/type'; import pluginListConstant from '../../app.constant'; @@ -14,7 +14,7 @@ const Widget: WidgetType = { _store() { return BI.Models.getModel(Model); }, - watch:{ + watch: { statusSelected(title: string) { const link = BI.find(this.model.linkList, (index: number, item: LinkType) => item.connectionName === title); const plugins: string[] = BI.Constants.getConstant(pluginListConstant); @@ -31,17 +31,17 @@ const Widget: WidgetType = { }, render() { return { - type:Vertical, - cls:'database-right', - items:[ + type: Vertical, + cls: 'database-right', + items: [ { type: Left, height: 40, cls: 'right-status-title', - items:[ + items: [ { type: Label, - text:BI.i18nText('Dec-Dcm_Data_Connections'), + text: BI.i18nText('Dec-Dcm_Data_Connections'), }, ], ref(ref: any) { diff --git a/src/app/link_status/right/right.card.component.ts b/src/app/link_status/right/right_card.ts similarity index 93% rename from src/app/link_status/right/right.card.component.ts rename to src/app/link_status/right/right_card.ts index fc73314..3b9f86c 100644 --- a/src/app/link_status/right/right.card.component.ts +++ b/src/app/link_status/right/right_card.ts @@ -13,11 +13,11 @@ const Widget: WidgetType = { items: [ { type: Vertical, - cls:'right-status-board', + cls: 'right-status-board', items: [ { type: Vertical, - cls:'right-status-board-item', + cls: 'right-status-board-item', items: [ { type: Label, @@ -52,11 +52,11 @@ const Widget: WidgetType = { items: [ { type: Vertical, - cls:'right-status-board', + cls: 'right-status-board', items: [ { type: Vertical, - cls:'right-status-board-item', + cls: 'right-status-board-item', items: [ { type: Label, diff --git a/src/app/title/title.component.ts b/src/app/title/title.ts similarity index 95% rename from src/app/title/title.component.ts rename to src/app/title/title.ts index 7a7afb6..fafcbd7 100644 --- a/src/app/title/title.component.ts +++ b/src/app/title/title.ts @@ -1,5 +1,5 @@ import {Left, WidgetType, IconButton} from '@ui/index'; -import TitleItem from './title_item/title_item.component'; +import TitleItem from './title_item/title_item'; import {isDesigner, closeWindow} from '@shared/crud/crud.request'; import {TAB_LINK_SET, TAB_LINK_POOL} from '@private/constants'; const className = 'fr.title'; diff --git a/src/app/title/title_item/title_item.component.ts b/src/app/title/title_item/title_item.ts similarity index 100% rename from src/app/title/title_item/title_item.component.ts rename to src/app/title/title_item/title_item.ts diff --git a/src/index.ts b/src/index.ts index 6c892fe..ceb3a40 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,10 @@ import i18n from '../private/i18n'; BI.DOM.ready(() => { - const app = require('./app/app.component').default; + const app = require('./app/app').default; // TODO: 先采用这种方式方便前端调试 BI.addI18n(i18n); BI.createWidget({ - type:app, + type: app, element: 'body', }); }); diff --git a/src/shared/components/both.side.component.ts b/src/shared/components/both_side.ts similarity index 97% rename from src/shared/components/both.side.component.ts rename to src/shared/components/both_side.ts index 819f2f9..5e7b654 100644 --- a/src/shared/components/both.side.component.ts +++ b/src/shared/components/both_side.ts @@ -7,7 +7,7 @@ const Widget: WidgetType = { return { type: Htape, cls: 'both-side', - height:24, + height: 24, items: [{ el: { type: Label, diff --git a/src/shared/components/form.item.component.ts b/src/shared/components/form_item.ts similarity index 100% rename from src/shared/components/form.item.component.ts rename to src/shared/components/form_item.ts diff --git a/src/shared/components/title.component.ts b/src/shared/components/title.ts similarity index 100% rename from src/shared/components/title.component.ts rename to src/shared/components/title.ts