Browse Source

Pull request #1115: KERNEL-6541 引用类型规范化

Merge in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:release/10.0 to release/10.0

* commit '529104a32f95969f97e8bb726c273fcbd48db42c':
  KERNEL-6541 引用类型规范化
release/10.0
alan 4 years ago
parent
commit
5a927d7dd6
  1. 5
      src/modules/app.ts
  2. 3
      src/modules/components/collapse/collapse.ts
  3. 3
      src/modules/components/link_button/link.ts
  4. 21
      src/modules/components/test_status/test_status.ts
  5. 9
      src/modules/components/test_status/tip_icon/tip_fail.ts
  6. 7
      src/modules/components/test_status/tip_icon/tip_icon.ts
  7. 3
      src/modules/components/text_checker/text_checker.ts
  8. 5
      src/modules/pages/connection/components/form_item/form_item.ts
  9. 33
      src/modules/pages/connection/connection.ts
  10. 10
      src/modules/pages/connection/connection_jdbc/connection_jdbc.ts
  11. 16
      src/modules/pages/connection/connection_jndi/connection_jndi.ts
  12. 7
      src/modules/pages/connection/list/list.ts
  13. 8
      src/modules/pages/connection/list/list_item/list_item.ts
  14. 13
      src/modules/pages/connection_pool/connection_pool.ts
  15. 3
      src/modules/pages/connection_pool/list_item/list_item.ts
  16. 21
      src/modules/pages/connection_pool/pool/pool.ts
  17. 19
      src/modules/pages/database/database.ts
  18. 5
      src/modules/pages/database/database_type/database_type.ts
  19. 3
      src/modules/pages/maintain/components/form_item/form_item.ts
  20. 37
      src/modules/pages/maintain/forms/components/form.jdbc.ts
  21. 18
      src/modules/pages/maintain/forms/components/form.jndi.ts
  22. 18
      src/modules/pages/maintain/maintain.ts
  23. 5
      src/modules/title/title.ts
  24. 5
      src/modules/title/title_database/title_datebase.ts
  25. 5
      src/modules/title/title_maintain/title_maintain.ts
  26. 20
      src/ui/fineui.ts
  27. 1
      src/ui/index.ts
  28. 6
      yarn.lock

5
src/modules/app.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Vtape, Absolute } from 'ui';
import { TitleXtype } from './title/title';
import { PAGE_INDEX } from './constants/constant';
import { ConnectionXtype, DatebaseXtype, MaintainXtype, ConnectionPoolXtype } from './pages';
@ -25,7 +24,7 @@ export class App extends BI.Widget {
render() {
return {
type: Vtape,
type: BI.VTapeLayout.xtype,
items: [
{
el: {
@ -35,7 +34,7 @@ export class App extends BI.Widget {
height: 40,
},
{
type: Absolute,
type: BI.AbsoluteLayout.xtype,
cls: 'bi-background',
items: [{
el: {

3
src/modules/components/collapse/collapse.ts

@ -1,4 +1,3 @@
import { Left } from 'ui';
import { shortcut, store } from '@core/core';
import { CollapseModel, CollapseModelXtype } from './collapse.model';
import { IconLabel } from '@fui/core';
@ -32,7 +31,7 @@ export class Collapse extends BI.BasicButton {
this.store.setCollapse(this.options.isCollapse);
return {
type: Left,
type: BI.FloatLeftLayout.xtype,
items: [
{
type: BI.IconLabel.xtype,

3
src/modules/components/link_button/link.ts

@ -1,4 +1,3 @@
import { CenterAdapt } from 'ui';
import { shortcut } from '@core/core';
import { Label } from '@fui/core';
@ -21,7 +20,7 @@ export class LinkButton extends BI.BasicButton {
render() {
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
cls: 'bi-high-light',
items: [
{

21
src/modules/components/test_status/test_status.ts

@ -1,10 +1,9 @@
import { shortcut, store } from '@core/core';
import { TestStatusModelXtype, TestStatusModel } from './test_status.model';
import { CenterAdapt, Vertical, Left } from 'ui';
import { TEST_STATUS } from '@constants/constant';
import { TipIconXtype } from './tip_icon/tip_icon';
import { TipFailXtype, EVENT_CLOSE, EVENT_RELOAD, EVENT_DETAIL } from './tip_icon/tip_fail';
import { Label, Tab } from '@fui/core';
import { FloatLeftLayout, Label, Tab, VerticalLayout } from '@fui/core';
export const TestStatusXtype = 'dec.dcm.components.test_status';
export {
EVENT_CLOSE,
@ -29,8 +28,8 @@ export class TestStatus extends BI.Widget {
tab: Tab;
failMessage: Label;
failDriverMessage: Label;
driverLink: any;
detail: any;
driverLink: FloatLeftLayout;
detail: VerticalLayout;
watch = {
status: (status: string) => {
@ -42,11 +41,11 @@ export class TestStatus extends BI.Widget {
const { loadingCls, loadingText, successCls, successText, failCls, failText, retryText } = this.options;
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
cls: 'bi-z-index-mask',
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: BI.Tab.xtype,
@ -105,13 +104,13 @@ export class TestStatus extends BI.Widget {
},
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
cls: 'bi-card',
invisible: true,
bgap: 10,
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
cls: 'bi-header-background',
vgap: 5,
hgap: 10,
@ -137,7 +136,7 @@ export class TestStatus extends BI.Widget {
},
},
{
type: Left,
type: BI.FloatLeftLayout.xtype,
invisible: true,
items: [
{
@ -149,14 +148,14 @@ export class TestStatus extends BI.Widget {
},
},
],
ref: (_ref: any) => {
ref: (_ref: FloatLeftLayout) => {
this.driverLink = _ref;
},
},
],
},
],
ref: (_ref: any) => {
ref: (_ref: VerticalLayout) => {
this.detail = _ref;
},
},

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

@ -1,6 +1,5 @@
import { shortcut, store } from '@core/core';
import { Button } from '@fui/core';
import { Vertical, HorizotalAuto, CenterAdapt, VerticalAdapt } from 'ui';
import { TipFailModel, TipFailModelXtype } from './tip_fail.model';
export const TipFailXtype = 'dec.dcm.components.test_status.tip_fail';
export const EVENT_CLOSE = 'EVENT_CLOSE';
@ -32,13 +31,13 @@ export class TipFail extends BI.Widget {
const { tipCls, tipText, retryText } = this.options;
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: HorizotalAuto,
type: BI.HorizontalAutoLayout.xtype,
cls: tipCls,
bgap: 20,
items: [{
@ -53,7 +52,7 @@ export class TipFail extends BI.Widget {
text: tipText,
},
{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
hgap: 5,
items: [
{

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

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { Vertical, HorizotalAuto, CenterAdapt } from 'ui';
export const TipIconXtype = 'dec.dcm.components.test_status.tip_icon';
@shortcut(TipIconXtype)
export class TipIcon extends BI.Widget {
@ -11,13 +10,13 @@ export class TipIcon extends BI.Widget {
const { tipCls, tipText } = this.options;
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: HorizotalAuto,
type: BI.HorizontalAutoLayout.xtype,
cls: tipCls,
bgap: 20,
items: [{

3
src/modules/components/text_checker/text_checker.ts

@ -1,6 +1,5 @@
import { shortcut } from '@core/core';
import { Label, TextEditor } from '@fui/core';
import { Absolute } from 'ui';
export const TextCheckerXtype = 'dec.dcm.components.text_checker';
@shortcut(TextCheckerXtype)
export class TextChecker extends BI.Widget {
@ -32,7 +31,7 @@ export class TextChecker extends BI.Widget {
this.value = value;
return {
type: Absolute,
type: BI.AbsoluteLayout.xtype,
width,
height: 20,
items: [{

5
src/modules/pages/connection/components/form_item/form_item.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { Htape, Vertical } from 'ui';
export const FormItemXtype = 'dec.dcm.connection_form_item';
@shortcut(FormItemXtype)
export class FormItem extends BI.Widget {
@ -16,7 +15,7 @@ export class FormItem extends BI.Widget {
const { nameWidth, unit, value } = this.options;
return {
type: Htape,
type: BI.HTapeLayout.xtype,
height: 17,
items: [
{
@ -29,7 +28,7 @@ export class FormItem extends BI.Widget {
width: nameWidth,
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: BI.Label.xtype,

33
src/modules/pages/connection/connection.ts

@ -1,4 +1,3 @@
import { Htape, Vtape, VerticalAdapt, ListView, CenterAdapt, Layout } from 'ui';
import { shortcut, store } from '@core/core';
import { ConnectionModel, ConnectionModelXtype } from './connection.model';
import { PAGE_INDEX } from '@constants/constant';
@ -9,7 +8,7 @@ import { ConnectionPluginXtype } from './connection_plugin/connection_plugin';
import { connectionType } from '@constants/env';
import { getAllDatabaseTypes, connectionCanEdit, getJdbcDatabaseType, getTextByDatabaseType } from '../../app.service';
import { ConnectionJDBC } from '../../crud/crud.typings';
import { Button, Label } from '@fui/core';
import { Button, HTapeLayout, Label, ListView } from '@fui/core';
export const ConnectionXtype = 'dec.dcm.connection';
@shortcut(ConnectionXtype)
@ -20,8 +19,8 @@ export class Connection extends BI.Widget {
connectionTitleWidget: Label;
connectionEditWidget: Button;
listView: any;
title: any;
listView: ListView;
title: HTapeLayout;
watch = {
connectionSelected:(name: string) => {
@ -49,18 +48,18 @@ export class Connection extends BI.Widget {
this.store.setConnectionSelected('');
return {
type: Htape,
type: BI.HTapeLayout.xtype,
hgap: 10,
items: [
{
el: {
type: Vtape,
type: BI.VTapeLayout.xtype,
cls: 'bi-border-right',
rgap: 10,
items: [
{
el: {
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
cls: 'bi-border-bottom',
items: [{
type: BI.Button.xtype,
@ -81,12 +80,12 @@ export class Connection extends BI.Widget {
width: 275,
},
{
type: Vtape,
type: BI.VTapeLayout.xtype,
items: [
{
el: {
type: Htape,
ref: (_ref: any) => {
type: BI.HTapeLayout.xtype,
ref: (_ref: HTapeLayout) => {
this.title = _ref;
},
cls: 'bi-border-bottom',
@ -100,7 +99,7 @@ export class Connection extends BI.Widget {
},
{
el: {
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
items: [{
type: BI.Button.xtype,
$value: 'connection-edit',
@ -125,8 +124,8 @@ export class Connection extends BI.Widget {
height: 40,
},
{
type: ListView,
ref: (_ref: any) => {
type: BI.ListView.xtype,
ref: (_ref: ListView) => {
this.listView = _ref;
},
},
@ -159,17 +158,17 @@ export class Connection extends BI.Widget {
private renderNoRegistered() {
return [{
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
height: 500,
items: [
{
type: Vtape,
type: BI.VTapeLayout.xtype,
width: 300,
height: 150,
items: [
{
el: {
type: Layout,
type: BI.Layout.xtype,
cls: 'error-page-background',
},
height: 130,
@ -187,7 +186,7 @@ export class Connection extends BI.Widget {
private renderEmpty() {
return [{
type: Layout,
type: BI.Layout.xtype,
}];
}

10
src/modules/pages/connection/connection_jdbc/connection_jdbc.ts

@ -1,11 +1,11 @@
import { shortcut, store } from '@core/core';
import { Vertical, Layout } from 'ui';
import { FormItemXtype } from '../components/form_item/form_item';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { ConnectionJdbcModelXtype, ConnectionJdecModel } from './connection_jdbc.model';
import { ConnectionJDBC } from 'src/modules/crud/crud.typings';
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo } from '../../../app.service';
import { CONNECTION_LAYOUT } from '@constants/constant';
import { VerticalLayout } from '@fui/core';
export const ConnectionJdbcXtype = 'dec.dcm.connection_jdbc';
@shortcut(ConnectionJdbcXtype)
@store(ConnectionJdbcModelXtype)
@ -23,7 +23,7 @@ export class ConnectionJdbc extends BI.Widget {
const { hgap, vgap } = CONNECTION_LAYOUT;
return {
type: Vertical,
type: BI.VerticalLayout.xtype,
hgap,
vgap,
items: [
@ -53,7 +53,7 @@ export class ConnectionJdbc extends BI.Widget {
name: BI.i18nText('Dec-Dcm_Connection_Form_AuthType'),
value: authType,
} : {
type: Layout,
type: BI.Layout.xtype,
},
{
type: FormItemXtype,
@ -95,11 +95,11 @@ export class ConnectionJdbc extends BI.Widget {
],
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
tgap: -15,
vgap,
invisible: true,
ref: (_ref: any) => {
ref: (_ref: VerticalLayout) => {
this.advancedSet = _ref;
},
items: [

16
src/modules/pages/connection/connection_jndi/connection_jndi.ts

@ -1,10 +1,10 @@
import { shortcut, store } from '@core/core';
import { Vertical, Htape, Left } from 'ui';
import { FormItemXtype } from '../components/form_item/form_item';
import { ConnectionJndiModelXtype, ConnectionJndiModel } from './connection_jndi.model';
import { ConnectionJNDI } from 'src/modules/crud/crud.typings';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { CONNECTION_LAYOUT } from '@constants/constant';
import { VerticalLayout } from '@fui/core';
export const ConnectionJndiXtype = 'dec.dcm.connection_jndi';
@shortcut(ConnectionJndiXtype)
@ -12,7 +12,7 @@ export const ConnectionJndiXtype = 'dec.dcm.connection_jndi';
export class ConnectionJdbc extends BI.Widget {
model: ConnectionJndiModel['model'];
advancedSet: any;
advancedSet: VerticalLayout;
render() {
const connectionData = this.model.connectionSelectedOne.connectionData as ConnectionJNDI;
@ -20,7 +20,7 @@ export class ConnectionJdbc extends BI.Widget {
const { hgap, vgap } = CONNECTION_LAYOUT;
return {
type: Vertical,
type: BI.VerticalLayout.xtype,
$testId: 'dec-dcm-connection-jndi',
hgap,
vgap,
@ -32,12 +32,12 @@ export class ConnectionJdbc extends BI.Widget {
value: jndiName,
},
{
type: Htape,
type: BI.HTapeLayout.xtype,
height: 115,
items: [
{
el: {
type: Left,
type: BI.FloatLeftLayout.xtype,
items: [
{
type: BI.Label.xtype,
@ -50,7 +50,7 @@ export class ConnectionJdbc extends BI.Widget {
width: 200,
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
bgap: 15,
height: 115,
items: [
@ -107,11 +107,11 @@ export class ConnectionJdbc extends BI.Widget {
],
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
ref: (_ref: VerticalLayout) => {
this.advancedSet = _ref;
},
items: [

7
src/modules/pages/connection/list/list.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { CenterAdapt, Layout, Vtape } from 'ui';
import { ListItemXtype } from './list_item/list_item';
import { ConnectionListModel, ConnectionListModelXtype } from './list.model';
import { getDatabaseType } from './list.service';
@ -42,16 +41,16 @@ export class ConnectionList extends BI.LoadingPane {
cardCreator: (index: 'list' | 'none') => {
if (index === 'none') {
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: Vtape,
type: BI.VTapeLayout.xtype,
width: 260,
height: 150,
items: [
{
el: {
type: Layout,
type: BI.Layout.xtype,
cls: 'data-connection-background',
},
height: 130,

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

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Layout, Htape, Vertical } from 'ui';
import './list_item.less';
import { ListItemModel, ListItemModelXtype } from './list_item.model';
import { PAGE_INDEX } from '@constants/constant';
@ -24,7 +23,6 @@ export class ListItem extends BI.BasicButton {
store: ListItemModel['store'];
model: ListItemModel['model'];
comboWidget: any;
nameLabel: Label;
nameEditor: SignEditor;
downListCombo: DownListCombo;
@ -43,7 +41,7 @@ export class ListItem extends BI.BasicButton {
const { name, databaseType } = this.options;
return {
type: Htape,
type: BI.HTapeLayout.xtype,
$scope: name,
items: [{
el: {
@ -53,7 +51,7 @@ export class ListItem extends BI.BasicButton {
},
width: 25,
}, {
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: BI.Label.xtype,
@ -131,7 +129,7 @@ export class ListItem extends BI.BasicButton {
}],
} : {
type: Layout,
type: BI.Layout.xtype,
},
width: 25,
}],

13
src/modules/pages/connection_pool/connection_pool.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Htape, Vtape, Layout, CenterAdapt } from 'ui';
import { ConnectionPoolModel, ConnectionPoolModelXtype } from './connection_pool.model';
import { ListItemXtype } from './list_item/list_item';
import { PoolXtype } from './pool/pool';
@ -31,11 +30,11 @@ export class ConnectionPool extends BI.Widget {
}
return {
type: Htape,
type: BI.HTapeLayout.xtype,
items: [
{
el: {
type: Vtape,
type: BI.VTapeLayout.xtype,
cls: 'bi-border-right',
items: [
{
@ -66,7 +65,7 @@ export class ConnectionPool extends BI.Widget {
private renderPool() {
return {
type: Vtape,
type: BI.VTapeLayout.xtype,
items: [
{
el: {
@ -89,16 +88,16 @@ export class ConnectionPool extends BI.Widget {
private renderNoConnection() {
return {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: Vtape,
type: BI.VTapeLayout.xtype,
width: 260,
height: 150,
items: [
{
el: {
type: Layout,
type: BI.Layout.xtype,
cls: 'data-connection-background',
},
height: 130,

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

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { VerticalAdapt } from 'ui';
import { ListItemModel, ListItemModelXtype } from './list_item.model';
export const ListItemXtype = 'dec.dcm.connection_pool.list_item';
@shortcut(ListItemXtype)
@ -16,7 +15,7 @@ export class ListItem extends BI.BasicButton {
render() {
return {
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
lgap: 5,
items: [
{

21
src/modules/pages/connection_pool/pool/pool.ts

@ -1,6 +1,5 @@
import { shortcut, store } from '@core/core';
import { PoolModel, PoolModelXtype } from './pool.model';
import { FloatCenter, Vertical, CenterAdapt, VerticalAdapt } from 'ui';
import './pool.less';
import { ConnectionPoolType } from '../../../crud/crud.typings';
import { Label } from '@fui/core';
@ -31,28 +30,28 @@ export class Pool extends BI.Widget {
render() {
return {
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: FloatCenter,
type: BI.FloatCenterLayout.xtype,
hgap: 20,
vgap: 10,
height: 200,
items: [
{
el: {
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
cls: 'bi-background',
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
cls: 'right-status-board-item',
items: [
{
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
items: [
{
type: BI.Label.xtype,
@ -89,18 +88,18 @@ export class Pool extends BI.Widget {
},
},
{
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
cls: 'bi-background',
items: [
{
type: Vertical,
type: BI.VerticalLayout.xtype,
cls: 'right-status-board-item',
items: [
{
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
items: [
{
type: BI.Label.xtype,

19
src/modules/pages/database/database.ts

@ -1,4 +1,3 @@
import { Vtape, Right, Htape, Vertical, Left, CenterAdapt } from 'ui';
import { shortcut, store } from '@core/core';
import { FilterXtype } from './filter/filter';
import { DatebaseModel, DatebaseModelXtype } from './database.model';
@ -69,16 +68,16 @@ export class Datebase extends BI.Widget {
render() {
return {
type: Vtape,
type: BI.VTapeLayout.xtype,
vgap: 10,
hgap: 10,
items: [
{
el: {
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [
{
type: Right,
type: BI.FloatRightLayout.xtype,
items: [
{
type: BI.SearchEditor.xtype,
@ -104,14 +103,14 @@ export class Datebase extends BI.Widget {
height: 25,
},
{
type: Htape,
type: BI.HTapeLayout.xtype,
items: [
{
el: {
type: BI.ButtonGroup.xtype,
cls: 'bi-border-right',
layouts: [{
type: Vertical,
type: BI.VerticalLayout.xtype,
}],
ref: (_ref: ButtonGroup) => {
this.filter = _ref;
@ -138,11 +137,11 @@ export class Datebase extends BI.Widget {
width: 200,
},
{
type: Vtape,
type: BI.VTapeLayout.xtype,
items: [
{
el: {
type: Htape,
type: BI.HTapeLayout.xtype,
hgap: 20,
invisible: true,
items: [
@ -197,7 +196,7 @@ export class Datebase extends BI.Widget {
type: BI.ButtonGroup.xtype,
hgap: 15,
layouts: [{
type: Left,
type: BI.FloatLeftLayout.xtype,
scrolly: true,
}],
items: this.renderDatebaseType(),
@ -233,7 +232,7 @@ export class Datebase extends BI.Widget {
private renderNoResult() {
return [{
type: CenterAdapt,
type: BI.CenterAdaptLayout.xtype,
height: '100%',
width: '100%',
items: [{

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

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Vtape, Absolute } from 'ui';
import { DatebaseTypeModel, DatebaseTypeModelXtype } from './database_type.model';
import { ImgPrefix, PluginImgPrefix } from '@constants/env';
import './database_type.less';
@ -31,11 +30,11 @@ export class DatebaseType extends BI.BasicButton {
const { text, keyword, databaseType, iconUrl } = this.options;
return {
type: Absolute,
type: BI.AbsoluteLayout.xtype,
items: [
{
el: {
type: Vtape,
type: BI.VTapeLayout.xtype,
cls: 'bi-list-item-active bi-border',
items: [
{

3
src/modules/pages/maintain/components/form_item/form_item.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { Left } from 'ui';
import { CONNECTION_LAYOUT } from '@constants/constant';
export const FormItemXtype = 'dec.dcm.Maintain_form_item';
@shortcut(FormItemXtype)
@ -14,7 +13,7 @@ export class FormItem extends BI.Widget {
render () {
return {
type: Left,
type: BI.FloatLeftLayout.xtype,
items: [
{
type: BI.Label.xtype,

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

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { Vertical, Left, Layout } from 'ui';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { FormItemXtype } from '../../components/form_item/form_item';
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings';
@ -8,7 +7,8 @@ import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE } from
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service';
import { TextCheckerXtype } from '../../../../components/text_checker/text_checker';
import { ApiFactory } from 'src/modules/crud/apiFactory';
import { Editor, EditorIconCheckCombo, Label, TextAreaEditor, TextEditor, TextValueCombo } from '@fui/core';
import { Editor, EditorIconCheckCombo, Label, TextAreaEditor, TextEditor, TextValueCombo, VerticalLayout } from '@fui/core';
import { FormItem } from '../../../connection/components/form_item/form_item';
const api = new ApiFactory().create();
export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc';
@ -21,13 +21,12 @@ export class FormJdbc extends BI.Widget {
oldPassword = '';
allDatabaseTypes = getAllDatabaseTypes();
testStatus: any;
advancedSet: any;
formUser: any;
formPassword: any;
formPrincipal: any;
formKeyPath: any;
labelTips: any;
advancedSet: VerticalLayout;
formUser: FormItem;
formPassword: FormItem;
formPrincipal: FormItem;
formKeyPath: FormItem;
labelTips: Label;
form = {
connectionName: null,
@ -73,7 +72,7 @@ export class FormJdbc extends BI.Widget {
};
return {
type: Vertical,
type: BI.VerticalLayout.xtype,
hgap,
vgap,
items: [
@ -230,7 +229,7 @@ export class FormJdbc extends BI.Widget {
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_UserName'),
invisible: !!authType,
ref: (_ref: any) => {
ref: (_ref: FormItem) => {
this.formUser = _ref;
},
forms: [{
@ -249,7 +248,7 @@ export class FormJdbc extends BI.Widget {
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
invisible: !!authType,
ref: (_ref: any) => {
ref: (_ref: FormItem) => {
this.formPassword = _ref;
},
forms: [{
@ -272,7 +271,7 @@ export class FormJdbc extends BI.Widget {
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Principal'),
invisible: !authType,
ref: (_ref: any) => {
ref: (_ref: FormItem) => {
this.formPrincipal = _ref;
},
forms: [{
@ -291,7 +290,7 @@ export class FormJdbc extends BI.Widget {
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_KeyPath'),
invisible: !authType,
ref: (_ref: any) => {
ref: (_ref: FormItem) => {
this.formKeyPath = _ref;
},
forms: [{
@ -338,9 +337,9 @@ export class FormJdbc extends BI.Widget {
height: 64,
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'),
forms: [{
type: Vertical,
type: BI.VerticalLayout.xtype,
items: [{
type: Left,
type: BI.FloatLeftLayout.xtype,
items: [{
type: BI.TextButton.xtype,
cls: 'bi-high-light',
@ -369,7 +368,7 @@ export class FormJdbc extends BI.Widget {
}],
},
{
type: Layout,
type: BI.Layout.xtype,
cls: 'bi-border-top',
bgap: 8,
},
@ -412,11 +411,11 @@ export class FormJdbc extends BI.Widget {
],
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
ref: (_ref: VerticalLayout) => {
this.advancedSet = _ref;
},
items: [

18
src/modules/pages/maintain/forms/components/form.jndi.ts

@ -1,20 +1,18 @@
import { shortcut } from '@core/core';
import { Vertical, Htape, Left } from 'ui';
import { FormItemXtype } from '../../components/form_item/form_item';
import { ConnectionJNDI, Connection, ContextHashtable } from 'src/modules/crud/crud.typings';
import { CONNECT_CHARSET, CONNECTION_LAYOUT, JNDI_FACTORYS } from '@constants/constant';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { connectionType } from '@constants/env';
import { TextCheckerXtype } from '../../../../components/text_checker/text_checker';
import { EditorIconCheckCombo, TextEditor, TextValueCombo } from '@fui/core';
import { EditorIconCheckCombo, TextEditor, TextValueCombo, VerticalLayout } from '@fui/core';
export const FormJndiXtype = 'dec.dcm.maintain.form.jndi';
@shortcut(FormJndiXtype)
export class FormJndi extends BI.Widget {
props = {
formData: {} as Connection,
}
advancedSet: any;
testStatus: any;
advancedSet: VerticalLayout;
form = {
connectionName: null,
jndiName: null,
@ -42,7 +40,7 @@ export class FormJndi extends BI.Widget {
const { hgap, vgap } = CONNECTION_LAYOUT;
return {
type: Vertical,
type: BI.VerticalLayout.xtype,
hgap,
vgap,
items: [
@ -76,12 +74,12 @@ export class FormJndi extends BI.Widget {
}],
},
{
type: Htape,
type: BI.HTapeLayout.xtype,
height: 175,
items: [
{
el: {
type: Left,
type: BI.FloatLeftLayout.xtype,
items: [
{
type: BI.Label.xtype,
@ -94,7 +92,7 @@ export class FormJndi extends BI.Widget {
width: 200,
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
bgap: 15,
height: 175,
items: [
@ -216,11 +214,11 @@ export class FormJndi extends BI.Widget {
],
},
{
type: Vertical,
type: BI.VerticalLayout.xtype,
vgap,
tgap: -15,
invisible: true,
ref: (_ref: any) => {
ref: (_ref: VerticalLayout) => {
this.advancedSet = _ref;
},
items: [

18
src/modules/pages/maintain/maintain.ts

@ -1,8 +1,7 @@
import { Vtape, VerticalAdapt, ListView } from 'ui';
import { shortcut, store } from '@core/core';
import { MaintainModel, MaintainModelXtype } from './maintain.model';
import { MaintainFormXtype } from './forms/form';
import { LinkXtype } from 'src/modules/components/link_button/link';
import { LinkXtype, LinkButton } from 'src/modules/components/link_button/link';
import { PAGE_INDEX } from '@constants/constant';
import { ApiFactory } from 'src/modules/crud/apiFactory';
const api = new ApiFactory().create();
@ -10,6 +9,7 @@ import './maintain.less';
import { connectionType } from '@constants/env';
import { getJdbcDatabaseType, getTextByDatabaseType } from '../../app.service';
import { ConnectionJDBC } from 'src/modules/crud/crud.typings';
import { ListView } from '@fui/core';
export const MaintainXtype = 'dec.dcm.maintain';
@shortcut(MaintainXtype)
@ -18,19 +18,19 @@ export class Maintain extends BI.Widget {
model: MaintainModel['model'];
store: MaintainModel['store'];
listView: any;
socketTip: any;
listView: ListView;
socketTip: LinkButton;
render() {
const { isEdit, databaseType } = this.getEditConnection();
const titleText = getTextByDatabaseType(databaseType);
return {
type: Vtape,
type: BI.VTapeLayout.xtype,
hgap: 5,
items: [
{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
cls: 'bi-border-bottom',
height: 40,
hgap: 5,
@ -56,15 +56,15 @@ export class Maintain extends BI.Widget {
lgap: 10,
text: BI.i18nText('Dec-Dcm_Socket_Unable_Connect_Tip'),
link: api.getHyperlink(DecCst.Hyperlink.WEBSOCKET_CONNECT),
ref: (_ref: any) => {
ref: (_ref: LinkButton) => {
this.socketTip = _ref;
},
},
],
},
{
type: ListView,
ref: (_ref: any) => {
type: BI.ListView.xtype,
ref: (_ref: ListView) => {
this.listView = _ref;
},
items: this.renderItems(),

5
src/modules/title/title.ts

@ -1,4 +1,3 @@
import { LeftRightVerticalAdapt, VerticalAdapt } from 'ui';
import { shortcut, store } from '@core/core';
import { TitleModel, TitleModelXtype } from './title.model';
import { PAGE_INDEX } from '@constants/constant';
@ -28,7 +27,7 @@ export class Title extends BI.Widget {
render() {
return {
type: LeftRightVerticalAdapt,
type: BI.LeftRightVerticalAdaptLayout.xtype,
items: {
left: [
{
@ -37,7 +36,7 @@ export class Title extends BI.Widget {
height: 40,
hgap: 10,
layouts: [{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
}],
ref: (_ref: LinearSegment) => {
this.linearSegment = _ref;

5
src/modules/title/title_database/title_datebase.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Right, VerticalAdapt } from 'ui';
import { TitleDatebaseModel, TitleDatebaseModelXtype } from './title_datebase.model';
import { PAGE_INDEX } from '@constants/constant';
import { Button } from '@fui/core';
@ -22,9 +21,9 @@ export class TitleDatabaseWidget extends BI.Widget {
render() {
return {
type: Right,
type: BI.FloatRightLayout.xtype,
items: [{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
height: 40,
rgap: 5,
items: [

5
src/modules/title/title_maintain/title_maintain.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { Right, VerticalAdapt } from 'ui';
import { TitleMaintainModel, TitleMaintainModelXtype } from './title_maintain.model';
import { PAGE_INDEX } from '@constants/constant';
@ -11,9 +10,9 @@ export class TitleMaintainWidget extends BI.Widget {
model: TitleMaintainModel['model'];
render() {
return {
type: Right,
type: BI.FloatRightLayout.xtype,
items: [{
type: VerticalAdapt,
type: BI.VerticalAdaptLayout.xtype,
height: 40,
rgap: 5,
items: [

20
src/ui/fineui.ts

@ -1,20 +0,0 @@
// 布局
export const VerticalAdapt = 'bi.vertical_adapt';
export const Vtape = 'bi.vtape';
export const CenterAdapt = 'bi.center_adapt';
export const Htape = 'bi.htape';
export const Layout = 'bi.layout';
export const Absolute = 'bi.absolute';
export const Vertical = 'bi.vertical';
export const Left = 'bi.left';
export const Right = 'bi.right';
export const HorizontalAdapt = 'bi.horizontal_adapt';
export const AbsoluteCenterAdapt = 'bi.absolute_center_adapt';
export const TableAdapt = 'bi.table_adapt';
export const RightVerticalAdapt = 'bi.right_vertical_adapt';
export const LeftRightVerticalAdapt = 'bi.left_right_vertical_adapt';
export const ListView = 'bi.list_view';
export const VirtualGroup = 'bi.virtual_group';
export const HorizotalAuto = 'bi.horizontal_auto';
export const Horizotal = 'bi.horizontal';
export const FloatCenter = 'bi.float_center';

1
src/ui/index.ts

@ -1 +0,0 @@
export * from './fineui';

6
yarn.lock

@ -897,9 +897,9 @@
"@babel/preset-typescript" "7.3.3"
"@fui/core@^2.0.0":
version "2.0.20201221142205"
resolved "https://npm.fineres.com/@fui%2fcore/-/core-2.0.20201221142205.tgz#f3ff66a10df5b38e1955bb4337645a7fef697ef3"
integrity sha512-CaF/s14RnNlNXQi0GD9v4J3TFycTUebZzOIurVpfeR2tqhkKe6G/K7DreQGncVooggbRogrIDMJNVfs+d2nHtA==
version "2.0.20201221165218"
resolved "https://npm.fineres.com/@fui%2fcore/-/core-2.0.20201221165218.tgz#e63cb4ae91769b86e17915cc3a967ea9ae73863e"
integrity sha512-36cgFA80I2xOE5euK/KRuXOsZmd/2QpVJhjv4E6vzs4mrTg8UQlPk1oxtx+CU9/eBstBCrJ50/1z7fQLx+oqnA==
"@fui/materials@10.0.0-release - 10.0.0-release.99999999999999":
version "10.0.0-release.20201218163254"

Loading…
Cancel
Save