Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
6c0f3df3
Commit
6c0f3df3
authored
Jun 14, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采集bug
parent
9c4a36f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
+23
-11
ScheduleAction.jsx
...view/Manage/DatasourceManage/Component/ScheduleAction.jsx
+4
-0
Task.jsx
src/view/Manage/MetadataHarvester/Component/Task.jsx
+11
-8
TaskReport.jsx
src/view/Manage/MetadataHarvester/Component/TaskReport.jsx
+4
-3
UpdateTask.jsx
src/view/Manage/MetadataHarvester/Component/UpdateTask.jsx
+4
-0
No files found.
src/view/Manage/DatasourceManage/Component/ScheduleAction.jsx
View file @
6c0f3df3
...
@@ -278,8 +278,12 @@ const ExecuteDateItem = ({ value, data, onChange }) => {
...
@@ -278,8 +278,12 @@ const ExecuteDateItem = ({ value, data, onChange }) => {
const
onDateChange
=
(
val
)
=>
{
const
onDateChange
=
(
val
)
=>
{
setDateKey
(
val
);
setDateKey
(
val
);
if
(
val
.
length
===
0
)
{
onChange
?.(
undefined
);
}
else
{
onChange
?.(
`
${
categoryKey
}
,
${
val
.
join
(
','
)}
`
);
onChange
?.(
`
${
categoryKey
}
,
${
val
.
join
(
','
)}
`
);
}
}
}
return
(
return
(
<
Row
gutter=
{
10
}
>
<
Row
gutter=
{
10
}
>
...
...
src/view/Manage/MetadataHarvester/Component/Task.jsx
View file @
6c0f3df3
...
@@ -543,18 +543,21 @@ export function Config({ onState, autoSelect, setTargetTypes }) {
...
@@ -543,18 +543,21 @@ export function Config({ onState, autoSelect, setTargetTypes }) {
},
[
scope
,
env
])
},
[
scope
,
env
])
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
autoSelect
&&
(
datasources
||
[]).
length
>
0
)
{
if
(
autoSelect
)
{
dispatchState
({
type
:
'selectDatasource'
,
payload
:
[
datasources
[
0
].
id
]});
const
filterDatasources
=
(
datasources
||
[]).
filter
(
item
=>
!
targetType
||
item
.
type
===
targetType
);
if
(
filterDatasources
.
length
>
0
)
{
dispatchState
({
type
:
'selectDatasource'
,
payload
:
[
filterDatasources
[
0
].
id
]});
}
else
{
dispatchState
({
type
:
'selectDatasource'
,
payload
:
[
undefined
]});
}
}
},
[
autoSelect
,
datasources
])
}
else
{
dispatchState
({
type
:
'selectDatasource'
,
payload
:
[
undefined
]});
useEffect
(()
=>
{
}
dispatchState
({
type
:
'selectDatasource'
,
payload
:
[
undefined
]})
},
[
autoSelect
,
datasources
,
scope
,
targetType
])
},
[
scope
,
targetType
])
const
_datasources
=
useMemo
(()
=>
{
const
_datasources
=
useMemo
(()
=>
{
if
(
datasources
&&
targetType
)
{
if
(
datasources
&&
targetType
)
{
return
(
datasources
||
[]).
filter
(
item
=>
item
.
type
===
targetType
);
return
(
datasources
||
[]).
filter
(
item
=>
!
targetType
||
item
.
type
===
targetType
);
}
}
return
datasources
;
return
datasources
;
...
...
src/view/Manage/MetadataHarvester/Component/TaskReport.jsx
View file @
6c0f3df3
import
React
,
{
useState
,
useEffect
,
useContext
,
useMemo
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useContext
,
useMemo
}
from
'react'
;
import
{
Space
,
DatePicker
,
Row
,
Col
,
Card
,
Spin
,
Empty
,
Typography
,
Pagination
,
Input
,
Select
,
Tooltip
}
from
'antd'
;
import
{
Space
,
DatePicker
,
Row
,
Col
,
Card
,
Spin
,
Empty
,
Typography
,
Pagination
,
Input
,
Select
,
Tooltip
,
Button
}
from
'antd'
;
import
'moment/locale/zh-cn'
;
import
'moment/locale/zh-cn'
;
import
locale
from
'antd/es/date-picker/locale/zh_CN'
;
import
locale
from
'antd/es/date-picker/locale/zh_CN'
;
...
@@ -107,7 +107,7 @@ const FC = (props) => {
...
@@ -107,7 +107,7 @@ const FC = (props) => {
{
cnName
:
'采集总数'
,
value
:
(
newTasks
||
[]).
length
},
{
cnName
:
'采集总数'
,
value
:
(
newTasks
||
[]).
length
},
{
cnName
:
'成功次数'
,
value
:
(
newTasks
||
[]).
filter
(
item
=>
item
.
state
===
'ENDED'
).
length
},
{
cnName
:
'成功次数'
,
value
:
(
newTasks
||
[]).
filter
(
item
=>
item
.
state
===
'ENDED'
).
length
},
{
cnName
:
'失败次数'
,
value
:
(
newTasks
||
[]).
filter
(
item
=>
item
.
state
===
'FAILED'
).
length
},
{
cnName
:
'失败次数'
,
value
:
(
newTasks
||
[]).
filter
(
item
=>
item
.
state
===
'FAILED'
).
length
},
{
cnName
:
'采集时长'
,
value
:
parseInt
((
newTasks
||
[]).
reduce
((
preVal
,
item
)
=>
item
.
costTime
+
preVal
,
0
)
),
unit
:
'分钟'
},
{
cnName
:
'采集时长'
,
value
:
((
newTasks
||
[]).
reduce
((
preVal
,
item
)
=>
item
.
costTime
+
preVal
,
0
)).
toFixed
(
2
),
unit
:
'分钟'
},
])
])
},
[
reportData
,
taskCode
,
datasourceName
,
reportState
,
keyword
,
pagination
])
},
[
reportData
,
taskCode
,
datasourceName
,
reportState
,
keyword
,
pagination
])
...
@@ -262,7 +262,8 @@ const FC = (props) => {
...
@@ -262,7 +262,8 @@ const FC = (props) => {
return
(
return
(
<
div
style=
{
{
overflowX
:
'hidden'
}
}
>
<
div
style=
{
{
overflowX
:
'hidden'
}
}
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'end'
}
}
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'space-between'
}
}
>
<
Button
onClick=
{
()
=>
{
getTaskReportDetail
();
}
}
>
刷新
</
Button
>
<
Space
>
<
Space
>
<
RangePicker
<
RangePicker
locale=
{
locale
}
locale=
{
locale
}
...
...
src/view/Manage/MetadataHarvester/Component/UpdateTask.jsx
View file @
6c0f3df3
...
@@ -43,6 +43,10 @@ const FC = (props) => {
...
@@ -43,6 +43,10 @@ const FC = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
configState
?.
datasourceId
)
{
if
(
configState
?.
datasourceId
)
{
getTaskSettings
(
configState
?.
datasourceId
);
getTaskSettings
(
configState
?.
datasourceId
);
}
else
{
setSchemas
([]);
setSelectedSchemas
([]);
setTaskSettings
({});
}
}
},
[
configState
?.
datasourceId
])
},
[
configState
?.
datasourceId
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment