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