in services/ui_backend_service/data/db/models/artifact_row.py [0:0]
def serialize(self, expanded: bool = False):
if expanded:
return {
"flow_id": self.flow_id,
"run_number": self.run_number,
"run_id": self.run_id,
"step_name": self.step_name,
"task_id": self.task_id,
"task_name": self.task_name,
"name": self.name,
"location": self.location,
"ds_type": self.ds_type,
"sha": self.sha,
"type": self.type,
"content_type": self.content_type,
"user_name": self.user_name,
"attempt_id": self.attempt_id,
"ts_epoch": self.ts_epoch,
"tags": self.tags,
"system_tags": self.system_tags,
}
else:
return {
"flow_id": self.flow_id,
"run_number": str(get_exposed_run_id(self.run_number, self.run_id)),
"step_name": self.step_name,
"task_id": str(get_exposed_task_id(self.task_id, self.task_name)),
"name": self.name,
"location": self.location,
"ds_type": self.ds_type,
"sha": self.sha,
"type": self.type,
"content_type": self.content_type,
"user_name": self.user_name,
"attempt_id": self.attempt_id,
"ts_epoch": self.ts_epoch,
"tags": self.tags,
"system_tags": self.system_tags,
}