Browse Source

KERNEL-6540 rafactor: 类型引用规范化

pull/3/head
youki 3 years ago
parent
commit
151179763f
  1. 14
      src/main/resources/com/fr/plugin/db/redis/web/redis.js
  2. 4
      src/web/src/index.edit.ts
  3. 33
      src/web/src/modules/app.dataset.ts
  4. 21
      src/web/src/modules/app.edit.ts
  5. 41
      src/web/src/modules/app.program.ts
  6. 21
      src/web/src/modules/app.show.ts
  7. 8
      src/web/src/modules/components/database_index/database_index.service.ts
  8. 7
      src/web/src/modules/components/database_index/database_index.ts
  9. 5
      src/web/src/modules/components/form_item/form_item.ts
  10. 15
      src/web/src/modules/components/pool/pool.ts
  11. 15
      src/web/src/modules/components/pool/pool_edit.ts
  12. 19
      src/web/src/modules/components/proxy/proxy.ts
  13. 19
      src/web/src/modules/components/proxy/proxy_edit.ts
  14. 9
      src/web/src/modules/table_list/list_item.ts
  15. 25
      src/web/src/modules/table_list/table_list.ts
  16. 81
      src/web/src/ui/fineui.ts
  17. 1
      src/web/src/ui/index.ts

14
src/main/resources/com/fr/plugin/db/redis/web/redis.js

File diff suppressed because one or more lines are too long

4
src/web/src/index.edit.ts

@ -1,6 +1,6 @@
import { TableList } from './modules/table_list/table_list';
import { RedisEdit } from './modules/app.edit';
BI.createWidget({
type: TableList.xtype,
type: RedisEdit.xtype,
element: '#wrapper',
});

33
src/web/src/modules/app.dataset.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { VerticalXtype, HtapeXtype, LabelXtype, IconComboXtype, ComponentsStyleTable, ButtonXtype, IconTextValue_Combo, TextAreaEditorXtype } from 'ui';
import { TableList } from './table_list/table_list';
import '../less/index.less';
import { DatabaseIndex } from './components/database_index/database_index';
@ -50,7 +49,7 @@ export class RedisDataset extends BI.Widget {
const inputType = typeof orderValue === 'string' ? 'formula' : 'int';
return {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
tgap: 15,
items: [{
el: {
@ -63,24 +62,24 @@ export class RedisDataset extends BI.Widget {
},
width: 300,
}, {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
lgap: 5,
bgap: 10,
items: [{
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 22,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_DB_Index'),
textAlign: 'left',
},
width: this.textWidth,
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
items: [{
el: {
type: IconComboXtype,
type: BI.IconCombo.xtype,
height: 22,
width: 28,
value: inputType,
@ -116,18 +115,18 @@ export class RedisDataset extends BI.Widget {
}],
}],
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 200,
rgap: 5,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Query_Condition'),
textAlign: 'left',
},
width: this.textWidth,
}, {
type: TextAreaEditorXtype,
type: BI.TextAreaEditor.xtype,
cls: 'bi-border',
height: 200,
allowBlank: true,
@ -144,17 +143,17 @@ export class RedisDataset extends BI.Widget {
}],
}],
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 24,
rgap: 5,
items: [{
type: LabelXtype,
type: BI.Label.xtype,
height: 24,
text: BI.i18nText('Plugin-Redis_Set_Parameter'),
textAlign: 'left',
}, {
el: {
type: ButtonXtype,
type: BI.Button.xtype,
text: BI.i18nText('Plugin-Redis_Refresh'),
level: 'ignore',
handler: () => {
@ -167,7 +166,7 @@ export class RedisDataset extends BI.Widget {
width: 80,
}, {
el: {
type: ButtonXtype,
type: BI.Button.xtype,
text: BI.i18nText('Plugin-Redis_Preview'),
disabled: !BI.get(this.model, 'ableSave'),
handler: () => {
@ -180,7 +179,7 @@ export class RedisDataset extends BI.Widget {
width: 80,
}],
}, {
type: ComponentsStyleTable,
type: BI.StyleTable.xtype,
cls: 'param-table',
height: 200,
columnSize: [300, 300, ''],
@ -198,13 +197,13 @@ export class RedisDataset extends BI.Widget {
const self = this;
return this.model.parameters.map((item, index) => [{
type: LabelXtype,
type: BI.Label.xtype,
text: item.name,
textAlign: 'left',
height: 30,
lgap: 10,
}, {
type: IconTextValue_Combo,
type: BI.IconTextValueCombo.xtype,
cls: 'field-type-change',
height: 30,
items: redisField,

21
src/web/src/modules/app.edit.ts

@ -1,6 +1,5 @@
import { shortcut } from '@core/core';
import { POOL_CONFIG, PROXY_CONFIG, BASIC_CONFIG, CONNECT_CHARSET } from '@constants/constant';
import { VerticalXtype, TextEditorXtype, TextValueComboXtype, LeftXtype, TextButtonXtype, BarPopOverXtype, EditorXtype } from 'ui';
import { FormItem } from './components/form_item/form_item';
import { PoolEdit } from './components/pool/pool_edit';
import { ProxyEdit } from './components/proxy/proxy_edit';
@ -43,7 +42,7 @@ export class RedisEdit extends BI.Widget {
this.oldPassword = password;
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -51,7 +50,7 @@ export class RedisEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Host'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
ref: _ref => {
@ -64,7 +63,7 @@ export class RedisEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Port'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
ref: _ref => {
@ -77,7 +76,7 @@ export class RedisEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Password'),
forms: [{
type: EditorXtype,
type: BI.Editor.xtype,
cls: 'bi-border',
height: 20,
width: 300,
@ -90,17 +89,17 @@ export class RedisEdit extends BI.Widget {
}],
},
{
type: LeftXtype,
type: BI.FloatLeftLayout.xtype,
hgap: 20,
items: [
{
type: TextButtonXtype,
type: BI.TextButton.xtype,
cls: 'bi-high-light',
text: BI.i18nText('Plugin-Redis_Pool_Config'),
handler: () => {
const id = BI.UUID();
BI.Popovers.create(id, {
type: BarPopOverXtype,
type: BI.BarPopover.xtype,
width: 500,
height: 320,
header: BI.i18nText('Plugin-Redis_Pool_Config'),
@ -121,13 +120,13 @@ export class RedisEdit extends BI.Widget {
},
},
{
type: TextButtonXtype,
type: BI.TextButton.xtype,
cls: 'bi-high-light',
text: BI.i18nText('Plugin-Redis_Proxy_Config'),
handler: () => {
const id = BI.UUID();
BI.Popovers.create(id, {
type: BarPopOverXtype,
type: BI.BarPopover.xtype,
width: 650,
height: 320,
header: BI.i18nText('Plugin-Redis_Pool_Config'),
@ -153,7 +152,7 @@ export class RedisEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Connection_Form_OriginalCharsetName'),
forms: [{
type: TextValueComboXtype,
type: BI.TextValueCombo.xtype,
width: 300,
value: originalCharsetName ? originalCharsetName : '',
items: CONNECT_CHARSET,

41
src/web/src/modules/app.program.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { VerticalXtype, HtapeXtype, LabelXtype, IconComboXtype, TextValueComboXtype, TextAreaEditorXtype, ComponentsStyleTable, ButtonXtype, IconTextValue_Combo } from 'ui';
import { TableList } from './table_list/table_list';
import '../less/index.less';
import { DatabaseIndex } from './components/database_index/database_index';
@ -52,7 +51,7 @@ export class RedisProgram extends BI.Widget {
const inputType = typeof orderValue === 'string' ? 'formula' : 'int';
return {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
tgap: 15,
items: [{
el: {
@ -65,24 +64,24 @@ export class RedisProgram extends BI.Widget {
},
width: 300,
}, {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
lgap: 5,
bgap: 10,
items: [{
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 22,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_DB_Index'),
textAlign: 'left',
},
width: this.textWidth,
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
items: [{
el: {
type: IconComboXtype,
type: BI.IconCombo.xtype,
height: 22,
width: 28,
value: inputType,
@ -118,18 +117,18 @@ export class RedisProgram extends BI.Widget {
}],
}],
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 22,
rgap: 5,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Script_Engine_Type'),
textAlign: 'left',
},
width: this.textWidth,
}, {
type: TextValueComboXtype,
type: BI.TextValueCombo.xtype,
value: engineType,
ref: (_ref: any) => {
this.engineTypeSelect = _ref;
@ -143,18 +142,18 @@ export class RedisProgram extends BI.Widget {
}],
}],
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 200,
rgap: 5,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Script_Query_Text'),
textAlign: 'left',
},
width: this.textWidth,
}, {
type: TextAreaEditorXtype,
type: BI.TextAreaEditor.xtype,
cls: 'bi-border',
height: 200,
allowBlank: true,
@ -171,17 +170,17 @@ export class RedisProgram extends BI.Widget {
}],
}],
}, {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
height: 24,
rgap: 5,
items: [{
type: LabelXtype,
type: BI.Label.xtype,
height: 24,
text: BI.i18nText('Plugin-Redis_Set_Parameter'),
textAlign: 'left',
}, {
el: {
type: ButtonXtype,
type: BI.Button.xtype,
text: BI.i18nText('Plugin-Redis_Refresh'),
level: 'ignore',
handler: () => {
@ -194,7 +193,7 @@ export class RedisProgram extends BI.Widget {
width: 80,
}, {
el: {
type: ButtonXtype,
type: BI.Button.xtype,
text: BI.i18nText('Plugin-Redis_Preview'),
disabled: !BI.get(this.model, 'ableSave'),
handler: () => {
@ -207,7 +206,7 @@ export class RedisProgram extends BI.Widget {
width: 80,
}],
}, {
type: ComponentsStyleTable,
type: BI.StyleTable.xtype,
cls: 'param-table',
height: 200,
columnSize: [300, 300, ''],
@ -225,13 +224,13 @@ export class RedisProgram extends BI.Widget {
const self = this;
return this.model.parameters.map((item, index) => [{
type: LabelXtype,
type: BI.Label.xtype,
text: item.name,
textAlign: 'left',
height: 30,
lgap: 10,
}, {
type: IconTextValue_Combo,
type: BI.IconTextValueCombo.xtype,
cls: 'field-type-change',
height: 30,
items: redisField,
@ -243,7 +242,7 @@ export class RedisProgram extends BI.Widget {
},
}],
}, {
type: LabelXtype,
type: BI.Label.xtype,
text: item.name,
textAlign: 'left',
height: 30,

21
src/web/src/modules/app.show.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { LabelXtype, VerticalXtype, LeftXtype, TextButtonXtype, BarPopOverXtype } from 'ui';
import { FormItem } from './components/form_item/form_item';
import { PoolConfig } from './components/pool/pool';
import { ProxyConfig } from './components/proxy/proxy';
@ -29,7 +28,7 @@ export class RedisShow extends BI.Widget {
const { host, port, newCharsetName } = basicConfig;
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -37,7 +36,7 @@ export class RedisShow extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Host'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: host,
}],
},
@ -45,7 +44,7 @@ export class RedisShow extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Port'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: port,
}],
},
@ -53,22 +52,22 @@ export class RedisShow extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Password'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: '*****',
}],
},
{
type: LeftXtype,
type: BI.FloatLeftLayout.xtype,
hgap: 20,
items: [
{
type: TextButtonXtype,
type: BI.TextButton.xtype,
cls: 'bi-high-light',
text: BI.i18nText('Plugin-Redis_Pool_Config'),
handler: () => {
const id = BI.UUID();
BI.Popovers.create(id, {
type: BarPopOverXtype,
type: BI.BarPopover.xtype,
width: 400,
height: 300,
header: BI.i18nText('Plugin-Redis_Pool_Config'),
@ -81,13 +80,13 @@ export class RedisShow extends BI.Widget {
},
},
{
type: TextButtonXtype,
type: BI.TextButton.xtype,
cls: 'bi-high-light',
text: BI.i18nText('Plugin-Redis_Proxy_Config'),
handler: () => {
const id = BI.UUID();
BI.Popovers.create(id, {
type: BarPopOverXtype,
type: BI.BarPopover.xtype,
width: 650,
height: 280,
header: BI.i18nText('Plugin-Redis_Pool_Config'),
@ -105,7 +104,7 @@ export class RedisShow extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Connection_Form_OriginalCharsetName'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: newCharsetName ? newCharsetName : BI.i18nText('BI-Basic_Auto'),
}],
},

8
src/web/src/modules/components/database_index/database_index.service.ts

@ -1,4 +1,4 @@
import { BarPopoverXtype } from 'ui';
import { FormulaOpeartingPanel } from '@fui/materials';
import { fetchFormulaConfig } from '../../crud/crud.request';
/**
@ -8,17 +8,17 @@ export function openFormulaPopover<T extends {formula: string}>(value: T, insert
return new Promise((resolve, reject) => {
const id = BI.UUID();
let formulaPane: typeof BI.FormulaOpeartingPanel;
let formulaPane: FormulaOpeartingPanel;
BI.Popovers.create(id, {
type: BarPopoverXtype,
type: BI.BarPopover.xtype,
width: 900,
height: 600,
header: BI.i18nText('Plugin-JSON_Function_Definition'),
body: {
type: BI.FormulaOpeartingPanel.xtype,
configLoader: fetchFormulaConfig,
ref: (_ref: typeof BI.FormulaOpeartingPanel) => {
ref: (_ref: FormulaOpeartingPanel) => {
formulaPane = _ref;
},
inserterType,

7
src/web/src/modules/components/database_index/database_index.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { TabXtype, TextEditorXtype } from 'ui';
import { DatabaseIndexModel } from './database_index.model';
import { openFormulaPopover } from './database_index.service';
@ -26,7 +25,7 @@ export class DatabaseIndex extends BI.Widget {
this.store.setInputType(inputType);
return {
type: TabXtype,
type: BI.Tab.xtype,
single: true,
showIndex: this.model.inputType,
ref: (_ref: any) => {
@ -35,7 +34,7 @@ export class DatabaseIndex extends BI.Widget {
cardCreator: (index: 'int'|'formula') => {
if (index === 'int') {
return {
type: TextEditorXtype,
type: BI.TextEditor.xtype,
warningTitle: '',
value: parseInt(this.model.inputValue as string, 10) || 0,
validationChecker: (v: string) => this.checkInteger(v),
@ -53,7 +52,7 @@ export class DatabaseIndex extends BI.Widget {
}
return {
type: TextEditorXtype,
type: BI.TextEditor.xtype,
allowBlank: true,
value: this.model.inputValue,
ref: (_ref: any) => {

5
src/web/src/modules/components/form_item/form_item.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { LabelXtype, LeftXtype } from 'ui';
@shortcut()
export class FormItem extends BI.Widget {
@ -13,10 +12,10 @@ export class FormItem extends BI.Widget {
render () {
return {
type: LeftXtype,
type: BI.FloatLeftLayout.xtype,
items: [
{
type: LabelXtype,
type: BI.Label.xtype,
cls: 'bi-font-bold',
width: this.options.nameWidth,
textAlign: 'left',

15
src/web/src/modules/components/pool/pool.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { LabelXtype, VerticalXtype, MultiSelectItemXtype } from 'ui';
import { POOL_CONFIG } from '@constants/constant';
import { FormItem } from '../form_item/form_item';
@shortcut()
@ -16,7 +15,7 @@ export class PoolConfig extends BI.Widget {
const { maxTotal, maxWait, maxIdle, blockWhenExhausted, lifo, timeout } = this.options.poolConfig;
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -24,7 +23,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Total'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: maxTotal,
}],
},
@ -32,7 +31,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Wait'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: maxWait,
}],
},
@ -40,7 +39,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Idle'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: maxIdle,
}],
},
@ -48,7 +47,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Block_When_Exhausted'),
forms: [{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
selected: blockWhenExhausted,
}],
},
@ -56,7 +55,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Lifo'),
forms: [{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
selected: lifo,
}],
},
@ -64,7 +63,7 @@ export class PoolConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Timeout'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: timeout,
}],
},

15
src/web/src/modules/components/pool/pool_edit.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { VerticalXtype, MultiSelectItemXtype, TextEditorXtype } from 'ui';
import { POOL_CONFIG } from '@constants/constant';
import { FormItem } from '../form_item/form_item';
import { PoolEditModel } from './pool_edit.model';
@ -33,7 +32,7 @@ export class PoolEdit extends BI.Widget {
this.store.setLifo(lifo);
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -41,7 +40,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Total'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: maxTotal,
@ -54,7 +53,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Wait'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: maxWait,
@ -67,7 +66,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Max_Idle'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: maxIdle,
@ -80,7 +79,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Block_When_Exhausted'),
forms: [{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
selected: blockWhenExhausted,
ref: (_ref: any) => {
this.form.blockWhenExhausted = _ref;
@ -94,7 +93,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Lifo'),
forms: [{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
selected: lifo,
ref: (_ref: any) => {
this.form.lifo = _ref;
@ -108,7 +107,7 @@ export class PoolEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Pool_Timeout'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: timeout,

19
src/web/src/modules/components/proxy/proxy.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { LabelXtype, VerticalXtype, MultiSelectItemXtype, CenterAdaptXtype } from 'ui';
import { PROXY_CONFIG } from '@constants/constant';
import { FormItem } from '../form_item/form_item';
@shortcut()
@ -16,7 +15,7 @@ export class ProxyConfig extends BI.Widget {
const { open, host, port, username, password, privateKeyPath } = this.options.proxyConfig;
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -24,14 +23,14 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Open'),
forms: [{
type: CenterAdaptXtype,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
width: 30,
selected: open,
}, {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Proxy_Description'),
},
],
@ -41,7 +40,7 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Host'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: host,
}],
},
@ -49,7 +48,7 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Port'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: port,
}],
},
@ -57,7 +56,7 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Username'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: username,
}],
},
@ -65,7 +64,7 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Password'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: password,
}],
},
@ -73,7 +72,7 @@ export class ProxyConfig extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Private_Key_Path'),
forms: [{
type: LabelXtype,
type: BI.Label.xtype,
text: privateKeyPath,
}],
},

19
src/web/src/modules/components/proxy/proxy_edit.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { LabelXtype, VerticalXtype, MultiSelectItemXtype, CenterAdaptXtype, TextEditorXtype, EditorXtype } from 'ui';
import { PROXY_CONFIG } from '@constants/constant';
import { FormItem } from '../form_item/form_item';
@shortcut()
@ -30,7 +29,7 @@ export class ProxyEdit extends BI.Widget {
this.oldPassword = password;
return {
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
hgap: 15,
vgap: 10,
items: [
@ -38,17 +37,17 @@ export class ProxyEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Open'),
forms: [{
type: CenterAdaptXtype,
type: BI.CenterAdaptLayout.xtype,
items: [
{
type: MultiSelectItemXtype,
type: BI.MultiSelectItem.xtype,
width: 30,
selected: this.isOpen,
handler: () => {
this.isOpen = !this.isOpen;
},
}, {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Proxy_Description'),
},
],
@ -58,7 +57,7 @@ export class ProxyEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Host'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: host,
@ -71,7 +70,7 @@ export class ProxyEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Port'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: port,
@ -84,7 +83,7 @@ export class ProxyEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Username'),
forms: [{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: username,
@ -97,7 +96,7 @@ export class ProxyEdit extends BI.Widget {
type: FormItem.xtype,
name: BI.i18nText('Plugin-Redis_Proxy_Password'),
forms: [{
type: EditorXtype,
type: BI.Editor.xtype,
cls: 'bi-border',
width: 300,
height: 20,
@ -114,7 +113,7 @@ export class ProxyEdit extends BI.Widget {
name: BI.i18nText('Plugin-Redis_Proxy_Private_Key_Path'),
forms: [
{
type: TextEditorXtype,
type: BI.TextEditor.xtype,
width: 300,
allowBlank: true,
value: privateKeyPath,

9
src/web/src/modules/table_list/list_item.ts

@ -1,5 +1,4 @@
import { shortcut } from '@core/core';
import { HtapeXtype, IconLabelXtype, LabelXtype } from 'ui';
@shortcut()
export class ListItem extends BI.BasicButton {
static xtype = 'dec.dcm.connection.plugin.redis.table_list.list_item'
@ -13,22 +12,22 @@ export class ListItem extends BI.BasicButton {
const { text, showIcon } = this.options;
if(showIcon){
return {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
items: [{
el: {
type: IconLabelXtype,
type: BI.IconLabel.xtype,
cls: 'redis-column-font',
},
width: 25,
}, {
type: LabelXtype,
type: BI.Label.xtype,
textAlign: 'left',
text,
}],
};
}else{
return {
type: LabelXtype,
type: BI.Label.xtype,
textAlign: 'left',
lgap: 5,
text,

25
src/web/src/modules/table_list/table_list.ts

@ -1,5 +1,4 @@
import { shortcut, store } from '@core/core';
import { VtapeXtype, HtapeXtype, LabelXtype, IconButtonXtype, TextValueComboXtype, ButtonXtype, TextEditorXtype, ButtonGroupXtype, VerticalXtype } from 'ui';
import { ListItem } from './list_item';
import { TableModelModel } from './table_list.model';
import { fineServletURL } from '@constants/env';
@ -47,14 +46,14 @@ export class TableList extends BI.Widget {
const inputType = typeof orderValue === 'string' ? 'formula' : 'int';
return {
type: VtapeXtype,
type: BI.VTapeLayout.xtype,
hgap: 10,
bgap: 5,
items: [{
el: {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
items: [{
type: TextValueComboXtype,
type: BI.TextValueCombo.xtype,
ref: (_ref: any) => {
this.connectionTextValue = _ref;
},
@ -68,7 +67,7 @@ export class TableList extends BI.Widget {
}],
}, {
el: {
type: IconButtonXtype,
type: BI.IconButton.xtype,
cls: 'redis-site-font',
title: BI.i18nText('Plugin-Redis_Data_Connection'),
handler: () => {
@ -78,7 +77,7 @@ export class TableList extends BI.Widget {
width: 25,
}, {
el: {
type: IconButtonXtype,
type: BI.IconButton.xtype,
cls: 'redis-refresh-font',
title: BI.i18nText('Plugin-Redis_Refresh'),
handler: () => {
@ -91,10 +90,10 @@ export class TableList extends BI.Widget {
height: 25,
}, {
el: {
type: HtapeXtype,
type: BI.HTapeLayout.xtype,
items: [{
el: {
type: LabelXtype,
type: BI.Label.xtype,
text: BI.i18nText('Plugin-Redis_Index'),
textAlign: 'left',
},
@ -109,7 +108,7 @@ export class TableList extends BI.Widget {
width: 24,
height: 22,
}, {
type: TextEditorXtype,
type: BI.TextEditor.xtype,
height: 24,
watermark: BI.i18nText('Plugin-Redis_Keys_Pattern'),
ref: (_ref: any) => {
@ -117,7 +116,7 @@ export class TableList extends BI.Widget {
},
}, {
el: {
type: ButtonXtype,
type: BI.Button.xtype,
minWidth: 50,
text: BI.i18nText('Plugin-Redis_Keys_Pattern_Search'),
handler: () => {
@ -129,12 +128,12 @@ export class TableList extends BI.Widget {
},
height: 25,
}, {
type: VtapeXtype,
type: BI.VTapeLayout.xtype,
items: [{
type: ButtonGroupXtype,
type: BI.ButtonGroup.xtype,
chooseType: BI.Selection.None,
layouts: [{
type: VerticalXtype,
type: BI.VerticalLayout.xtype,
}],
items: [],
ref: (_ref: any) => {

81
src/web/src/ui/fineui.ts

@ -1,81 +0,0 @@
export const IconXtype = 'bi.icon';
export const IconTextItemXtype = 'bi.icon_text_item';
export const IconTextIconItemXtype = 'bi.icon_text_icon_item';
export const IconButtonXtype = 'bi.icon_button';
export const IconChangeButtonXtype = 'bi.icon_change_button';
export const TextButtonXtype = 'bi.text_button';
export const DownListComboXtype = 'bi.down_list_combo';
export const LabelXtype = 'bi.label';
export const SmallTextEditorXtype = 'bi.small_text_editor';
export const MultiFileEditorXtype = 'bi.multifile_editor';
export const SignEditorXtype = 'bi.sign_editor';
export const ButtonXtype = 'bi.button';
export const TextEditorXtype = 'bi.text_editor';
export const MultiSelectInsertComboXtype = 'bi.multi_select_insert_combo';
export const MultiSelectComboXtype = 'bi.multi_select_combo';
export const ButtonGroupXtype = 'bi.button_group';
export const AllValueChooserComboXtype = 'bi.all_value_chooser_combo';
export const TextAreaEditorXtype = 'bi.textarea_editor';
export const MultiSelectItemXtype = 'bi.multi_select_item';
export const BarPopOverXtype = 'bi.bar_popover';
export const DynamicDateComboXtype = 'bi.dynamic_date_combo';
export const DynamicDateTimeComboXtype = 'bi.dynamic_date_time_combo';
export const MultiTreeComboXtype = 'bi.multi_tree_combo';
export const RichEditorXtype = 'bi.rich_editor';
export const NicEditorXtype = 'bi.nic_editor';
export const EditorXtype = 'bi.editor';
export const MultiTreePopupViewXtype = 'bi.multi_tree_popup_view';
export const SingleSelectRadioItemXtype = 'bi.single_select_radio_item';
export const SingleSelectInsertComboXtype = 'bi.single_select_insert_combo';
export const SingleSelectComboXtype = 'bi.single_select_combo';
export const TabXtype = 'bi.tab';
export const DynamicYearMonthComboXtype = 'bi.dynamic_year_month_combo';
export const TextXtype = 'bi.text';
export const ComboXtype = 'bi.combo';
export const TimeComboXtype = 'bi.time_combo';
export const IFrameXtype = 'bi.iframe';
export const MultiTreeInsertComboXtype = 'bi.multi_tree_insert_combo';
export const MultiTreeListComboXtype = 'bi.multi_tree_list_combo';
export const MultilayerSingleTreeComboXtype = 'bi.multilayer_single_tree_combo';
export const MultilayerSelectTreeComboXtype = 'bi.multilayer_select_tree_combo';
export const AsyncTreeXtype = 'bi.async_tree';
export const ListAsyncTreeXtype = 'bi.list_async_tree';
export const MultilayerSingleTreePopupXtype = 'bi.multilayer_single_tree_popup';
export const MultilayerSelectTreePopupXtype = 'bi.multilayer_select_tree_popup';
export const IconLabelXtype = 'bi.icon_label';
export const RadioXtype = 'bi.radio';
export const LinearSegmentXtype = 'bi.linear_segment';
export const SearchEditorXtype = 'bi.search_editor';
export const ImgXtype = 'bi.img';
export const BubbleComboXtype = 'bi.bubble_combo';
export const TextBubblePopupBarViewXtype = 'bi.text_bubble_bar_popup_view';
export const TextValueComboXtype = 'bi.text_value_combo';
export const FileXtype = 'bi.file';
export const IconComboXtype = 'bi.icon_combo';
export const NumberEditorXtype = 'bi.number_editor';
export const CodeEditorXtype = 'bi.code_editor';
export const ComponentsStyleTable = 'bi.components.style_table';
export const IconTextValue_Combo = 'bi.icon_text_value_combo';
export const BarPopoverXtype = 'bi.bar_popover';
// 布局
export const VerticalAdaptXtype = 'bi.vertical_adapt';
export const VtapeXtype = 'bi.vtape';
export const CenterAdaptXtype = 'bi.center_adapt';
export const HtapeXtype = 'bi.htape';
export const LayoutXtype = 'bi.layout';
export const AbsoluteXtype = 'bi.absolute';
export const VerticalXtype = 'bi.vertical';
export const LeftXtype = 'bi.left';
export const RightXtype = 'bi.right';
export const HorizontalAdaptXtype = 'bi.horizontal_adapt';
export const AbsoluteCenterAdaptXtype = 'bi.absolute_center_adapt';
export const TableAdaptXtype = 'bi.table_adapt';
export const RightVerticalAdaptXtype = 'bi.right_vertical_adapt';
export const LeftRightVerticalAdaptXtype = 'bi.left_right_vertical_adapt';
export const ListViewXtype = 'bi.list_view';
export const VirtualGroupXtype = 'bi.virtual_group';
export const HorizotalAutoXtype = 'bi.horizontal_auto';
export const HorizotalXtype = 'bi.horizontal';
export const FloatCenterXtype = 'bi.float_center';
export const LeftRightVerticalAdaptLayoutXtype = 'bi.left_right_vertical_adapt';

1
src/web/src/ui/index.ts

@ -1 +0,0 @@
export * from './fineui';
Loading…
Cancel
Save