Browse Source

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

* commit 'b079cd599ae4f403d1c66cad7af3edeab3c0838b':
  fix: 删除console.log
  fix: 删除无用代码
  feat: DEC-9068 无数据连接时显示提示图片
  feat: DEC-9068 无数据连接时显示空
qufenxi
alan 5 years ago
parent
commit
5fa6fb508d
  1. 36
      src/modules/pages/connection_pool/connection_pool.ts

36
src/modules/pages/connection_pool/connection_pool.ts

@ -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,7 +57,14 @@ export class ConnectionPool extends BI.Widget {
}, },
width: 275, width: 275,
}, },
{ this.model.connectionJDBC.length > 0 ?
this.renderPool() : this.renderNoConnection(),
],
};
}
private renderPool() {
return {
type: Vtape, type: Vtape,
items: [ items: [
{ {
@ -76,6 +83,31 @@ export class ConnectionPool extends BI.Widget {
type: PoolXtype, type: PoolXtype,
}, },
], ],
};
}
private renderNoConnection() {
return {
type: CenterAdapt,
items: [
{
type: Vtape,
width: 260,
height: 150,
items: [
{
el: {
type: Layout,
cls: 'data-connection-background',
},
height: 130,
},
{
type: Label,
cls: 'bi-tips',
text: BI.i18nText('Dec-Dcm_Connection_Plase_Add_One'),
},
],
}, },
], ],
}; };

Loading…
Cancel
Save