mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-27 15:38:43 +00:00
Add executionDate to ingestionPipeline (#6481)
This commit is contained in:
parent
dd8b7fb5b0
commit
dc712e3179
@ -28,11 +28,15 @@
|
||||
},
|
||||
"startDate": {
|
||||
"description": "startDate of the pipeline run for this particular execution.",
|
||||
"type": "string"
|
||||
"$ref": "../../../type/basic.json#/definitions/timestamp"
|
||||
},
|
||||
"executionDate": {
|
||||
"description": "executionDate of the pipeline run for this particular execution.",
|
||||
"$ref": "../../../type/basic.json#/definitions/timestamp"
|
||||
},
|
||||
"endDate": {
|
||||
"description": "endDate of the pipeline run for this particular execution.",
|
||||
"type": "string"
|
||||
"$ref": "../../../type/basic.json#/definitions/timestamp"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
@ -20,6 +20,7 @@ from flask import Response
|
||||
from metadata.generated.schema.entity.services.ingestionPipelines.ingestionPipeline import (
|
||||
PipelineStatus,
|
||||
)
|
||||
from metadata.utils.helpers import datetime_to_ts
|
||||
|
||||
|
||||
class ApiResponse:
|
||||
@ -78,12 +79,9 @@ class ResponseFormat:
|
||||
return PipelineStatus(
|
||||
state=dag_run.get_state(),
|
||||
runId=dag_run.run_id,
|
||||
startDate=None
|
||||
if not dag_run.start_date
|
||||
else dag_run.start_date.strftime("%Y-%m-%dT%H:%M:%S.%f%z"),
|
||||
endDate=None
|
||||
if not dag_run.end_date
|
||||
else dag_run.end_date.strftime("%Y-%m-%dT%H:%M:%S.%f%z"),
|
||||
startDate=datetime_to_ts(dag_run.start_date),
|
||||
endDate=datetime_to_ts(dag_run.end_date),
|
||||
executionDate=datetime_to_ts(dag_run.execution_date),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
@ -310,10 +310,13 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
/>
|
||||
);
|
||||
|
||||
return r?.endDate || r?.startDate ? (
|
||||
return r?.endDate || r?.startDate || r?.executionDate ? (
|
||||
<PopOver
|
||||
html={
|
||||
<div className="tw-text-left">
|
||||
{r.executionDate ? (
|
||||
<p>Execution Date: {new Date(r.executionDate).toUTCString()}</p>
|
||||
) : null}
|
||||
{r.startDate ? (
|
||||
<p>Start Date: {new Date(r.startDate).toUTCString()}</p>
|
||||
) : null}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user