Browse Source

Merge pull request #104 in DEC/decision-webui-dcm from ~ALAN/decision-webui-dcm:feature/10.0 to feature/10.0

* commit '04ee3eca453301dbf5fd53d0c063d742ca5757b7':
  fix: 设置常量
  fix: DEC-10156 修改数据连接池分页的bug
qufenxi
alan 5 years ago
parent
commit
22eccdc3d5
  1. 2
      src/modules/constants/constant.ts
  2. 5
      src/modules/pages/connection_pool/connection_pool.ts

2
src/modules/constants/constant.ts

@ -704,3 +704,5 @@ export const JNDI_FACTORYS = [
url: 'http://localhost:8080/hello/burlap',
},
];
export const PAGE_SIZE = 50;

5
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.connections),
hasNext: options => options.times * PAGE_SIZE < BI.size(this.model.connectionJDBC),
},
],
},

Loading…
Cancel
Save