|
|
|
import {WidgetType, IconButton, LeftRightVerticalAdapt} from '@ui/index';
|
|
|
|
import TitleItem from './title_item/title_item';
|
|
|
|
import {isDesigner, closeWindow} from '@shared/crud/crud.request';
|
|
|
|
import {TAB_LINK_SET, TAB_LINK_POOL} from '@private/constants';
|
|
|
|
const className = 'fr.title';
|
|
|
|
const Widget: WidgetType = {
|
|
|
|
render() {
|
|
|
|
const hideCloseButton = isDesigner();
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: LeftRightVerticalAdapt,
|
|
|
|
cls: 'dcm-title bi-border-bottom bi-font-bold',
|
|
|
|
items: {
|
|
|
|
left: [
|
|
|
|
{
|
|
|
|
type: TitleItem,
|
|
|
|
cls: 'title-item-selected',
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Management'),
|
|
|
|
value: TAB_LINK_SET,
|
|
|
|
ref: _ref => {
|
|
|
|
this.ConnectSet = _ref;
|
|
|
|
},
|
|
|
|
handler: () => {
|
|
|
|
this.ConnectSet.select();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: TitleItem,
|
|
|
|
text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'),
|
|
|
|
value: TAB_LINK_POOL,
|
|
|
|
ref: _ref => {
|
|
|
|
this.ConnectPool = _ref;
|
|
|
|
},
|
|
|
|
handler: () => {
|
|
|
|
this.ConnectPool.select();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
right: [
|
|
|
|
{
|
|
|
|
type: IconButton,
|
|
|
|
cls: 'close-ha-font',
|
|
|
|
invisible: !hideCloseButton,
|
|
|
|
width: 30,
|
|
|
|
height: 30,
|
|
|
|
rgap: 10,
|
|
|
|
handler() {
|
|
|
|
closeWindow();
|
|
|
|
},
|
|
|
|
ref: _ref => {
|
|
|
|
this.CloseButton = _ref;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
};
|
|
|
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget));
|
|
|
|
|
|
|
|
export default className;
|