Unverified Commit 26cc1a17 authored by gaoyan's avatar gaoyan Committed by GitHub

[Fix]Fix job list can not Scroll (#3131)

parent 2565f13e
...@@ -59,7 +59,6 @@ const JobList = () => { ...@@ -59,7 +59,6 @@ const JobList = () => {
const [expandedKeys, setExpandedKeys] = useState<Key[]>([]); const [expandedKeys, setExpandedKeys] = useState<Key[]>([]);
const [selectedKey, setSelectedKey] = useState<Key[]>([]); const [selectedKey, setSelectedKey] = useState<Key[]>([]);
console.log(statusFilter);
const jobListColumns: ProColumns<Jobs.JobInstance>[] = [ const jobListColumns: ProColumns<Jobs.JobInstance>[] = [
{ {
title: l('global.table.jobname'), title: l('global.table.jobname'),
...@@ -182,11 +181,9 @@ const JobList = () => { ...@@ -182,11 +181,9 @@ const JobList = () => {
return ( return (
<ProCard <ProCard
boxShadow boxShadow
ghost
size={'small'} size={'small'}
bodyStyle={{ bodyStyle={{
height: parent.innerHeight - 215, height: parent.innerHeight - 235,
marginTop: -30,
overflow: 'auto', overflow: 'auto',
width: '99vw' width: '99vw'
}} }}
...@@ -205,7 +202,7 @@ const JobList = () => { ...@@ -205,7 +202,7 @@ const JobList = () => {
split={'horizontal'} split={'horizontal'}
> >
<Search <Search
style={{ margin: '8px 0px' }} style={{ margin: '8px 0px', padding: '0 10px' }}
placeholder={l('global.search.text')} placeholder={l('global.search.text')}
onChange={onChangeSearch} onChange={onChangeSearch}
allowClear={true} allowClear={true}
...@@ -225,6 +222,7 @@ const JobList = () => { ...@@ -225,6 +222,7 @@ const JobList = () => {
{data.length ? ( {data.length ? (
<DirectoryTree <DirectoryTree
style={{ padding: '0 10px' }}
className={'treeList'} className={'treeList'}
onSelect={(_, info) => onNodeClick(info)} onSelect={(_, info) => onNodeClick(info)}
// onRightClick={onRightClick} // onRightClick={onRightClick}
...@@ -250,7 +248,7 @@ const JobList = () => { ...@@ -250,7 +248,7 @@ const JobList = () => {
<ProTable<Jobs.JobInstance> <ProTable<Jobs.JobInstance>
{...PROTABLE_OPTIONS_PUBLIC} {...PROTABLE_OPTIONS_PUBLIC}
search={false} search={false}
tableStyle={{ height: parent.innerHeight - 210 }} tableStyle={{ height: parent.innerHeight - 245 }}
loading={{ delay: 1000 }} loading={{ delay: 1000 }}
rowKey={(record) => record.jid} rowKey={(record) => record.jid}
columns={jobListColumns} columns={jobListColumns}
...@@ -308,6 +306,7 @@ const JobList = () => { ...@@ -308,6 +306,7 @@ const JobList = () => {
/> />
) )
}} }}
scroll={{ y: parent.innerHeight - 245 - 150 }}
/> />
</Pane> </Pane>
</SplitPane> </SplitPane>
......
...@@ -36,7 +36,7 @@ export default () => { ...@@ -36,7 +36,7 @@ export default () => {
<SlowlyAppear> <SlowlyAppear>
<PageContainer title={false} breadcrumb={{ style: { display: 'none' } }}> <PageContainer title={false} breadcrumb={{ style: { display: 'none' } }}>
<DevopContext.Provider value={{ statusFilter, setStatusFilter }}> <DevopContext.Provider value={{ statusFilter, setStatusFilter }}>
<Space direction='vertical' size={24}> <Space direction='vertical' size={10}>
<JobOverview /> <JobOverview />
<JobList /> <JobList />
</Space> </Space>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment