10 changed files with 159 additions and 3 deletions
@ -0,0 +1,72 @@ |
|||||||
|
import {WidgetType, Vertical} from '@ui/index'; |
||||||
|
import RightShowModel from './right.show.model'; |
||||||
|
import BothSide from '@shared/components/both.side.component'; |
||||||
|
import Title from '@shared/components/title.component'; |
||||||
|
import {LinkType} from '@ui/type'; |
||||||
|
const className = 'fr.component.right.show'; |
||||||
|
const Widget: WidgetType = { |
||||||
|
_store() { |
||||||
|
return BI.Models.getModel(RightShowModel); |
||||||
|
}, |
||||||
|
render() { |
||||||
|
const linkSelected: LinkType = this.model.linkSelected; |
||||||
|
|
||||||
|
return { |
||||||
|
type: Vertical, |
||||||
|
cls: 'right-show', |
||||||
|
items: [ |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '数据连接名', |
||||||
|
rightText: linkSelected.connectionName, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '驱动器', |
||||||
|
rightText: linkSelected.driver, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: 'URL', |
||||||
|
rightText: linkSelected.url, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '编码', |
||||||
|
rightText: linkSelected.originalCharsetName === '' ? '自动' : linkSelected.originalCharsetName, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '用户名', |
||||||
|
rightText: linkSelected.user, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '密码', |
||||||
|
rightText: linkSelected.password, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: Title, |
||||||
|
text: '连接池属性', |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: 'SQL验证查询', |
||||||
|
rightText: linkSelected.validationQuery, |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '获取连接前校验', |
||||||
|
rightText: linkSelected.testOnBorrow ? '是' : '否', |
||||||
|
}, |
||||||
|
{ |
||||||
|
type: BothSide, |
||||||
|
leftText: '最大连接数量', |
||||||
|
rightText: linkSelected.maxActive, |
||||||
|
}, |
||||||
|
], |
||||||
|
}; |
||||||
|
}, |
||||||
|
}; |
||||||
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
||||||
|
export default className; |
@ -0,0 +1,8 @@ |
|||||||
|
const RightShowModel = 'fr.model.linkSet.right.show'; |
||||||
|
const Model = BI.inherit(Fix.Model, { |
||||||
|
context: ['linkList', 'linkSelected'], |
||||||
|
actions: { |
||||||
|
}, |
||||||
|
}); |
||||||
|
BI.model(RightShowModel, Model); |
||||||
|
export default RightShowModel; |
@ -0,0 +1,28 @@ |
|||||||
|
import {WidgetType, Htape} from '@ui/index'; |
||||||
|
const BothSide = 'fr.shared.component.both.side'; |
||||||
|
const Widget: WidgetType = { |
||||||
|
render() { |
||||||
|
const {leftText, rightText} = this.options; |
||||||
|
|
||||||
|
return { |
||||||
|
type: Htape, |
||||||
|
cls: 'both-side', |
||||||
|
height:24, |
||||||
|
items: [{ |
||||||
|
el: { |
||||||
|
type: 'bi.label', |
||||||
|
cls: 'left', |
||||||
|
textAlign: 'left', |
||||||
|
text: leftText, |
||||||
|
}, |
||||||
|
width: 115, |
||||||
|
}, { |
||||||
|
type: 'bi.label', |
||||||
|
textAlign: 'left', |
||||||
|
text: rightText, |
||||||
|
}], |
||||||
|
}; |
||||||
|
}, |
||||||
|
}; |
||||||
|
BI.shortcut(BothSide, BI.inherit(BI.Widget, Widget)); |
||||||
|
export default BothSide; |
@ -0,0 +1,16 @@ |
|||||||
|
import {WidgetType, Label} from '@ui/index'; |
||||||
|
const className = 'fr.shared.component.title'; |
||||||
|
const Widget: WidgetType = { |
||||||
|
render() { |
||||||
|
const {text} = this.options; |
||||||
|
|
||||||
|
return { |
||||||
|
type: Label, |
||||||
|
cls: 'shared-component-title', |
||||||
|
textAlign: 'left', |
||||||
|
text, |
||||||
|
}; |
||||||
|
}, |
||||||
|
}; |
||||||
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
||||||
|
export default className; |
@ -1 +1 @@ |
|||||||
export const linkList = {"data":[{"connectionId":"8c1c52f1-3d0a-429e-b35f-ee1e085a8b72","database":"","connectionName":"FRDemo","driver":"org.sqlite.JDBC","url":"jdbc:sqlite://${ENV_HOME}/../help/FRDemo.db","user":"","password":"","queryType":"","newCharsetName":'null',"originalCharsetName":'null',"validationQuery":"","schema":"","testOnBorrow":false,"maxActive":50,"options":'null',"port":0,"authType":"","creator":"designer","principal":"","keyPath":"","databaseType":"designer","privilegeDetailBeanList":'null'}]} |
export const linkList = {"data":[{"connectionId":"8c1c52f1-3d0a-429e-b35f-ee1e085a8b72","database":"","connectionName":"FRDemo","driver":"org.sqlite.JDBC","url":"jdbc:sqlite://${ENV_HOME}/../help/FRDemo.db","user":"","password":"","queryType":"","newCharsetName":'null',"originalCharsetName":'',"validationQuery":"","schema":"","testOnBorrow":false,"maxActive":50,"options":'null',"port":0,"authType":"","creator":"designer","principal":"","keyPath":"","databaseType":"designer","privilegeDetailBeanList":'null'}]} |
||||||
|
Loading…
Reference in new issue