in dolphinscheduler-ui/src/views/datasource/list/index.tsx [113:200]
render() {
const {
t,
id,
showDetailModal,
showSourceModal,
columns,
list,
page,
pageSize,
itemCount,
loading,
changePage,
changePageSize,
onCreate,
onUpdatedList,
handleSelectSourceType,
selectType,
handleSourceModalOpen,
handleSourceModalClose
} = this
return (
<NSpace vertical>
<Card>
<NSpace justify='space-between'>
<NButton
onClick={onCreate}
type='primary'
size='small'
class='btn-create-data-source'
>
{t('datasource.create_datasource')}
</NButton>
<NSpace justify='end' wrap={false}>
<Search
v-model:value={this.searchVal}
placeholder={t('datasource.search_input_tips')}
onSearch={onUpdatedList}
/>
<NButton type='primary' size='small' onClick={onUpdatedList}>
<NIcon>
<SearchOutlined />
</NIcon>
</NButton>
</NSpace>
</NSpace>
</Card>
<Card title={t('menu.datasource')}>
<NSpace vertical>
<NDataTable
row-class-name='data-source-items'
columns={columns.columns}
data={list}
loading={loading}
striped
scrollX={columns.tableWidth}
/>
<NSpace justify='center'>
<NPagination
page={page}
page-size={pageSize}
item-count={itemCount}
show-quick-jumper
show-size-picker
page-sizes={[10, 30, 50]}
on-update:page={changePage}
on-update:page-size={changePageSize}
/>
</NSpace>
</NSpace>
</Card>
<SourceModal
show={showSourceModal}
onChange={handleSelectSourceType}
onMaskClick={handleSourceModalClose}
></SourceModal>
<DetailModal
show={showDetailModal}
id={id}
selectType={selectType}
onCancel={() => void (this.showDetailModal = false)}
onUpdate={onUpdatedList}
onOpen={handleSourceModalOpen}
/>
</NSpace>
)
}