-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from IQSS/feature/492-publish-dataset-with-co…
…mpare-versions Feature/492 publish dataset with compare versions
- Loading branch information
Showing
18 changed files
with
584 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export interface DatasetVersionDiff { | ||
oldVersion: VersionSummary | ||
newVersion: VersionSummary | ||
metadataChanges?: MetadataBlockDiff[] | ||
filesAdded?: FileSummary[] | ||
filesRemoved?: FileSummary[] | ||
fileChanges?: FileDiff[] | ||
filesReplaced?: FileReplacement[] | ||
termsOfAccess?: FieldDiff[] | ||
} | ||
|
||
export interface FileSummary { | ||
fileName: string | ||
MD5: string | ||
type: string | ||
fileId: number | ||
filePath: string | ||
description: string | ||
isRestricted: boolean | ||
tags: string[] | ||
categories: string[] | ||
} | ||
|
||
export interface VersionSummary { | ||
versionNumber: string | ||
lastUpdatedDate: string | ||
} | ||
export interface MetadataBlockDiff { | ||
blockName: string | ||
changed: FieldDiff[] | ||
} | ||
|
||
export interface FileDiff { | ||
fileName: string | ||
md5: string | ||
fileId: number | ||
changed: FieldDiff[] | ||
} | ||
|
||
export interface FileReplacement { | ||
oldFile: FileSummary | ||
newFile: FileSummary | ||
} | ||
export interface FieldDiff { | ||
fieldName: string | ||
oldValue: string | ||
newValue: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { DatasetRepository } from '../repositories/DatasetRepository' | ||
import { DatasetVersionDiff } from '../models/DatasetVersionDiff' | ||
|
||
export async function getDatasetVersionDiff( | ||
datasetRepository: DatasetRepository, | ||
persistentId: string, | ||
oldVersion: string, | ||
newVersion: string | ||
): Promise<DatasetVersionDiff | undefined> { | ||
return datasetRepository | ||
.getVersionDiff(persistentId, oldVersion, newVersion) | ||
.catch((error: Error) => { | ||
throw new Error(error.message) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ | |
margin-bottom: 0; | ||
color: $dv-warning-color; | ||
} | ||
|
||
.secondaryText { | ||
color: $dv-subtext-color; | ||
} |
Oops, something went wrong.