diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index faac8aa..df50774 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -704,3 +704,5 @@ export const JNDI_FACTORYS = [ url: 'http://localhost:8080/hello/burlap', }, ]; + +export const PAGE_SIZE = 50; diff --git a/src/modules/pages/connection_pool/connection_pool.ts b/src/modules/pages/connection_pool/connection_pool.ts index 052f46d..258e61a 100644 --- a/src/modules/pages/connection_pool/connection_pool.ts +++ b/src/modules/pages/connection_pool/connection_pool.ts @@ -3,6 +3,7 @@ import { Htape, Vtape, Label, Layout, CenterAdapt, Loader } from 'ui'; import { ConnectionPoolModel, ConnectionPoolModelXtype } from './connection_pool.model'; import { ListItemXtype } from './list_item/list_item'; import { PoolXtype } from './pool/pool'; +import { PAGE_SIZE } from '@constants/constant'; export const ConnectionPoolXtype = 'dec.dcm.connection_pool'; @shortcut(ConnectionPoolXtype) @store(ConnectionPoolModelXtype) @@ -49,9 +50,9 @@ export class ConnectionPool extends BI.Widget { { type: Loader, itemsCreator: (options: {times: number}, populate) => { - populate(this.renderList((options.times - 1) * 50, options.times * 50)); + populate(this.renderList((options.times - 1) * PAGE_SIZE, options.times * PAGE_SIZE)); }, - hasNext: options => options.times * 50 < BI.size(this.model.connectionJDBC), + hasNext: options => options.times * PAGE_SIZE < BI.size(this.model.connectionJDBC), }, ], },