feat: add cluster list
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
DownloadOutlined,
|
||||
EditOutlined,
|
||||
ExperimentOutlined,
|
||||
FileTextOutlined,
|
||||
RetweetOutlined,
|
||||
ThunderboltOutlined
|
||||
} from '@ant-design/icons';
|
||||
@@ -17,6 +18,7 @@ const icons = {
|
||||
ThunderboltOutlined: React.createElement(ThunderboltOutlined),
|
||||
RetweetOutlined: React.createElement(RetweetOutlined),
|
||||
DownloadOutlined: React.createElement(DownloadOutlined),
|
||||
FileTextOutlined: React.createElement(FileTextOutlined),
|
||||
ApiOutlined: React.createElement(ApiOutlined),
|
||||
Stop: React.createElement(IconFont, { type: 'icon-stop1' }),
|
||||
Play: React.createElement(IconFont, { type: 'icon-outline-play' }),
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
|
||||
// import './iconfont/iconfont.js';
|
||||
|
||||
const IconFont = createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/c/font_4613488_oxxxb51iqbp.js'
|
||||
scriptUrl: '//at.alicdn.com/t/c/font_4613488_qgb5xlexehp.js'
|
||||
});
|
||||
|
||||
export default IconFont;
|
||||
|
||||
@@ -94,7 +94,7 @@ export const FilterBar: React.FC<FilterBarProps> = (props) => {
|
||||
marginBottom = 10,
|
||||
marginTop = 10,
|
||||
inputHolder = 'common.filter.name',
|
||||
selectHolder,
|
||||
selectHolder = '',
|
||||
showPrimaryButton = true,
|
||||
showDeleteButton = true,
|
||||
width
|
||||
@@ -107,43 +107,47 @@ export const FilterBar: React.FC<FilterBarProps> = (props) => {
|
||||
}
|
||||
return (
|
||||
<Space size={20}>
|
||||
{actionType === 'dropdown' ? (
|
||||
<DropDownActions
|
||||
menu={{
|
||||
items: actionItems,
|
||||
onClick: handleClickPrimary
|
||||
}}
|
||||
>
|
||||
{showPrimaryButton ? (
|
||||
actionType === 'dropdown' ? (
|
||||
<DropDownActions
|
||||
menu={{
|
||||
items: actionItems,
|
||||
onClick: handleClickPrimary
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
icon={<DownOutlined></DownOutlined>}
|
||||
type="primary"
|
||||
iconPosition="end"
|
||||
>
|
||||
{buttonText}
|
||||
</Button>
|
||||
</DropDownActions>
|
||||
) : (
|
||||
<Button
|
||||
icon={<DownOutlined></DownOutlined>}
|
||||
icon={buttonIcon ?? <PlusOutlined></PlusOutlined>}
|
||||
type="primary"
|
||||
iconPosition="end"
|
||||
onClick={handleClickPrimary}
|
||||
>
|
||||
{buttonText}
|
||||
</Button>
|
||||
</DropDownActions>
|
||||
) : (
|
||||
)
|
||||
) : null}
|
||||
{showDeleteButton && (
|
||||
<Button
|
||||
icon={buttonIcon ?? <PlusOutlined></PlusOutlined>}
|
||||
type="primary"
|
||||
onClick={handleClickPrimary}
|
||||
icon={<DeleteOutlined />}
|
||||
danger
|
||||
onClick={handleDeleteByBatch}
|
||||
disabled={!rowSelection.selectedRowKeys.length}
|
||||
>
|
||||
{buttonText}
|
||||
<span>
|
||||
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||
{rowSelection.selectedRowKeys.length > 0 && (
|
||||
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||
)}
|
||||
</span>
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
icon={<DeleteOutlined />}
|
||||
danger
|
||||
onClick={handleDeleteByBatch}
|
||||
disabled={!rowSelection.selectedRowKeys.length}
|
||||
>
|
||||
<span>
|
||||
{intl?.formatMessage?.({ id: 'common.button.delete' })}
|
||||
{rowSelection.selectedRowKeys.length > 0 && (
|
||||
<span>({rowSelection.selectedRowKeys?.length})</span>
|
||||
)}
|
||||
</span>
|
||||
</Button>
|
||||
</Space>
|
||||
);
|
||||
}, [
|
||||
|
||||
Reference in New Issue
Block a user