@ -1,8 +1,9 @@
import { shortcut , store } from '@core/core' ;
import { shortcut , store } from '@core/core' ;
import { PoolModel , PoolModelXtype } from './pool.model' ;
import { PoolModel , PoolModelXtype } from './pool.model' ;
import { FloatCenter , Vertical , CenterAdapt , Label , VerticalAdapt } from 'ui' ;
import { FloatCenter , Vertical , CenterAdapt , VerticalAdapt } from 'ui' ;
import './pool.less' ;
import './pool.less' ;
import { ConnectionPoolType } from '../../../crud/crud.typings' ;
import { ConnectionPoolType } from '../../../crud/crud.typings' ;
import { Label } from '@fui/core' ;
export const PoolXtype = 'dec.dcm.connection_pool.pool' ;
export const PoolXtype = 'dec.dcm.connection_pool.pool' ;
@shortcut ( PoolXtype )
@shortcut ( PoolXtype )
@ -14,17 +15,17 @@ export class Pool extends BI.Widget {
}
}
model : PoolModel [ 'model' ] ;
model : PoolModel [ 'model' ] ;
maxActive : any ;
maxActive : Label ;
maxIdle : any ;
maxIdle : Label ;
numActive : any ;
numActive : Label ;
numIdle : any ;
numIdle : Label ;
watch = {
watch = {
pool : ( pool : ConnectionPoolType ) = > {
pool : ( pool : ConnectionPoolType ) = > {
this . maxActive . setText ( pool . maxActive ) ;
this . maxActive . setText ( ` ${ pool . maxActive } ` ) ;
this . maxIdle . setText ( pool . maxIdle ) ;
this . maxIdle . setText ( ` ${ pool . maxIdle } ` ) ;
this . numActive . setText ( pool . numActive ) ;
this . numActive . setText ( ` ${ pool . numActive } ` ) ;
this . numIdle . setText ( pool . numIdle ) ;
this . numIdle . setText ( ` ${ pool . numIdle } ` ) ;
} ,
} ,
}
}
@ -54,23 +55,23 @@ export class Pool extends BI.Widget {
type : VerticalAdapt ,
type : VerticalAdapt ,
items : [
items : [
{
{
type : Label ,
type : BI . Label . xtype ,
$testId : 'dec-dcm-pool-status-number' ,
$testId : 'dec-dcm-pool-status-number' ,
$value : 'active' ,
$value : 'active' ,
cls : 'bi-high-light card-font-heighlight' ,
cls : 'bi-high-light card-font-heighlight' ,
ref : ( _ref : any ) = > {
ref : ( _ref : Label ) = > {
this . numActive = _ref ;
this . numActive = _ref ;
} ,
} ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
text : '/' ,
text : '/' ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
$testId : 'dec-dcm-pool-status-max' ,
$testId : 'dec-dcm-pool-status-max' ,
$value : 'active' ,
$value : 'active' ,
ref : ( _ref : any ) = > {
ref : ( _ref : Label ) = > {
this . maxActive = _ref ;
this . maxActive = _ref ;
} ,
} ,
} ,
} ,
@ -79,7 +80,7 @@ export class Pool extends BI.Widget {
] ,
] ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
text : BI.i18nText ( 'Dec-Dcm_Active_Connections_Number' ) ,
text : BI.i18nText ( 'Dec-Dcm_Active_Connections_Number' ) ,
} ,
} ,
] ,
] ,
@ -102,23 +103,23 @@ export class Pool extends BI.Widget {
type : VerticalAdapt ,
type : VerticalAdapt ,
items : [
items : [
{
{
type : Label ,
type : BI . Label . xtype ,
$testId : 'dec-dcm-pool-status-number' ,
$testId : 'dec-dcm-pool-status-number' ,
$value : 'idle' ,
$value : 'idle' ,
cls : 'bi-high-light card-font-heighlight' ,
cls : 'bi-high-light card-font-heighlight' ,
ref : ( _ref : any ) = > {
ref : ( _ref : Label ) = > {
this . numIdle = _ref ;
this . numIdle = _ref ;
} ,
} ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
text : '/' ,
text : '/' ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
$testId : 'dec-dcm-pool-status-max' ,
$testId : 'dec-dcm-pool-status-max' ,
$value : 'idle' ,
$value : 'idle' ,
ref : ( _ref : any ) = > {
ref : ( _ref : Label ) = > {
this . maxIdle = _ref ;
this . maxIdle = _ref ;
} ,
} ,
} ,
} ,
@ -127,7 +128,7 @@ export class Pool extends BI.Widget {
] ,
] ,
} ,
} ,
{
{
type : Label ,
type : BI . Label . xtype ,
text : BI.i18nText ( 'Dec-Dcm_Leisure_Connections_Number' ) ,
text : BI.i18nText ( 'Dec-Dcm_Leisure_Connections_Number' ) ,
} ,
} ,
] ,
] ,