|
|
@ -1,5 +1,5 @@ |
|
|
|
import { shortcut, store } from '@core/core'; |
|
|
|
import { shortcut, store } from '@core/core'; |
|
|
|
import { ButtonGroup, Htape, Vtape, Label, Vertical } from 'ui'; |
|
|
|
import { ButtonGroup, Htape, Vtape, Label, Vertical, Layout, CenterAdapt } from 'ui'; |
|
|
|
import { ConnectionPoolModel, ConnectionPoolModelXtype } from './connection_pool.model'; |
|
|
|
import { ConnectionPoolModel, ConnectionPoolModelXtype } from './connection_pool.model'; |
|
|
|
import { ListItemXtype } from './list_item/list_item'; |
|
|
|
import { ListItemXtype } from './list_item/list_item'; |
|
|
|
import { PoolXtype } from './pool/pool'; |
|
|
|
import { PoolXtype } from './pool/pool'; |
|
|
@ -57,23 +57,55 @@ export class ConnectionPool extends BI.Widget { |
|
|
|
}, |
|
|
|
}, |
|
|
|
width: 275, |
|
|
|
width: 275, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
this.model.connectionJDBC.length > 0 ? |
|
|
|
|
|
|
|
this.renderPool() : this.renderNoConnection(), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private renderPool() { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: Vtape, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-border-bottom', |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
|
|
|
|
lgap: 10, |
|
|
|
|
|
|
|
ref: (_ref: any) => { |
|
|
|
|
|
|
|
this.title = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
height: 40, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: PoolXtype, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private renderNoConnection() { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: CenterAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Vtape, |
|
|
|
type: Vtape, |
|
|
|
|
|
|
|
width: 260, |
|
|
|
|
|
|
|
height: 150, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: Label, |
|
|
|
type: Layout, |
|
|
|
cls: 'bi-border-bottom', |
|
|
|
cls: 'data-connection-background', |
|
|
|
textAlign: 'left', |
|
|
|
|
|
|
|
lgap: 10, |
|
|
|
|
|
|
|
ref: (_ref: any) => { |
|
|
|
|
|
|
|
this.title = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
height: 40, |
|
|
|
height: 130, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: PoolXtype, |
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-tips', |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Plase_Add_One'), |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|