Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
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
wangpeng
dinky
Commits
6bfe4663
Unverified
Commit
6bfe4663
authored
Jan 06, 2024
by
Zzm0809
Committed by
GitHub
Jan 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix-2898] fix finishtime render error (#2923)
* fix-finishtime-error * Spotless Apply --------- Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
bb6c1b83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
JobHistoryList.tsx
...vOps/JobList/components/JobHistoryList/JobHistoryList.tsx
+10
-5
data.d.ts
dinky-web/src/types/DevOps/data.d.ts
+1
-1
No files found.
dinky-web/src/pages/DevOps/JobList/components/JobHistoryList/JobHistoryList.tsx
View file @
6bfe4663
...
...
@@ -21,7 +21,7 @@ import StatusTag from '@/components/JobTags/StatusTag';
import
{
getJobDuration
}
from
'@/pages/DevOps/function'
;
import
{
queryList
}
from
'@/services/api'
;
import
{
API_CONSTANTS
}
from
'@/services/endpoints'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
Jobs
}
from
'@/types/DevOps/data
.d
'
;
import
{
l
}
from
'@/utils/intl'
;
import
type
{
ActionType
,
ProColumns
}
from
'@ant-design/pro-components'
;
import
{
ProTable
}
from
'@ant-design/pro-components'
;
...
...
@@ -46,14 +46,19 @@ const JobHistoryList = (props: HistoryProps) => {
valueType
:
'dateTime'
},
{
title
:
l
(
'global.table.endTime'
),
dataIndex
:
'finishTime'
,
valueType
:
'dateTime'
title
:
l
(
'global.table.finishTime'
),
render
(
_
,
row
:
Jobs
.
JobInstance
)
{
// 判断finishTime 是否 小于 1970-01-02 如果是则返回 '-' 否则返回 finishTime
return
!
row
.
finishTime
||
new
Date
(
row
.
finishTime
)
<=
new
Date
(
'1970-01-02'
)
?
'-'
:
row
.
finishTime
;
}
},
{
title
:
l
(
'global.table.jobid'
),
dataIndex
:
'jid'
,
key
:
'jid'
key
:
'jid'
,
copyable
:
true
},
{
title
:
l
(
'global.table.status'
),
...
...
dinky-web/src/types/DevOps/data.d.ts
View file @
6bfe4663
...
...
@@ -37,7 +37,7 @@ declare namespace Jobs {
error
:
string
;
failedRestartCount
:
number
;
duration
:
number
;
finishTime
:
Date
;
finishTime
:
string
;
};
export
type
JobConfig
=
{
...
...
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