|
|
|
@@ -291,12 +291,26 @@ func NotebookShow(ctx *context.Context) { |
|
|
|
uuidList := strings.Split(task.Uuid, ";") |
|
|
|
for _, uuidStr := range uuidList { |
|
|
|
attachment, err := models.GetAttachmentByUUID(uuidStr) |
|
|
|
if err == nil { |
|
|
|
datasetDownload = append(datasetDownload, models.DatasetDownload{ |
|
|
|
DatasetName: attachment.Name, |
|
|
|
DatasetDownloadLink: attachment.S3DownloadURL(), |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetAttachmentByUUID failed:%v", err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
dataset, err := models.GetDatasetByID(attachment.DatasetID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetDatasetByID failed:%v", err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
repo, err := models.GetRepositoryByID(dataset.RepoID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetRepositoryByID failed:%v", err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
datasetDownload = append(datasetDownload, models.DatasetDownload{ |
|
|
|
DatasetName: attachment.Name, |
|
|
|
DatasetDownloadLink: attachment.S3DownloadURL(), |
|
|
|
RepositoryLink: repo.Link() + "/datasets", |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
// datasetName, err := GetDatasetNameByUUID(task.Uuid) |
|
|
|
// if err == nil { |
|
|
|
|