mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-05 07:04:44 +00:00
fix: fix data process instance preview & add state on data process instance graphql (#12662)
This commit is contained in:
parent
26f111a61c
commit
ef631c52d1
@ -220,7 +220,7 @@ export function formatDuration(durationMs: number): string {
|
||||
const seconds = duration.seconds();
|
||||
|
||||
if (hours === 0 && minutes === 0) {
|
||||
return `${seconds} secs`;
|
||||
return seconds === 1 ? `${seconds} sec` : `${seconds} secs`;
|
||||
}
|
||||
|
||||
if (hours === 0) {
|
||||
@ -246,7 +246,7 @@ export function formatDetailedDuration(durationMs: number): string {
|
||||
parts.push(minutes === 1 ? `${minutes} min` : `${minutes} mins`);
|
||||
}
|
||||
if (seconds > 0) {
|
||||
parts.push(`${seconds} secs`);
|
||||
parts.push(seconds === 1 ? `${seconds} sec` : `${seconds} secs`);
|
||||
}
|
||||
return parts.join(' ');
|
||||
}
|
||||
|
||||
@ -111,6 +111,16 @@ fragment dataProcessInstanceFields on DataProcessInstance {
|
||||
dataPlatformInstance {
|
||||
...dataPlatformInstanceFields
|
||||
}
|
||||
state(startTimeMillis: null, endTimeMillis: null, limit: 1) {
|
||||
status
|
||||
attempt
|
||||
result {
|
||||
resultType
|
||||
nativeResultType
|
||||
}
|
||||
timestampMillis
|
||||
durationMillis
|
||||
}
|
||||
parentTemplate {
|
||||
urn
|
||||
type
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user