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