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