-
Notifications
You must be signed in to change notification settings - Fork 1k
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 #12912 from jmchilton/upload_provenance_2
Improved Upload Provenance and Correctness
- Loading branch information
Showing
25 changed files
with
562 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<li class="dataset-hash"> | ||
<i>{{ hash.hash_value }}</i> | ||
</li> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
hash: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
}; | ||
</script> |
30 changes: 30 additions & 0 deletions
30
client/src/components/DatasetInformation/DatasetHashes.vue
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,30 @@ | ||
<template> | ||
<span class="dataset-hashes"> | ||
<ul class="dataset-hashes-list"> | ||
<DatasetHash v-for="(hash, index) in hashes" :key="index" :hash="hash" /> | ||
</ul> | ||
</span> | ||
</template> | ||
|
||
<script> | ||
import DatasetHash from "./DatasetHash"; | ||
export default { | ||
components: { | ||
DatasetHash, | ||
}, | ||
props: { | ||
hashes: { | ||
type: Array, | ||
required: true, | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.dataset-hashes-list { | ||
padding-inline-start: 20px; | ||
margin-bottom: 0px; | ||
} | ||
</style> |
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
51 changes: 51 additions & 0 deletions
51
client/src/components/DatasetInformation/DatasetSource.vue
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,51 @@ | ||
<template> | ||
<li class="dataset-source"> | ||
<a v-if="browserCompatUri" :href="sourceUri" target="_blank"> | ||
{{ source.source_uri }} | ||
<font-awesome-icon v-b-tooltip.hover title="Dataset Source URL" icon="external-link-alt" /> | ||
</a> | ||
<span v-else> | ||
{{ source.source_uri }} | ||
</span> | ||
<font-awesome-icon v-b-tooltip.hover title="Copy URI" icon="copy" style="cursor: pointer" @click="copyLink" /> | ||
<br /> | ||
<DatasetSourceTransform :transform="source.transform" /> | ||
</li> | ||
</template> | ||
|
||
<script> | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faCopy, faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons"; | ||
import { copy } from "utils/clipboard"; | ||
import DatasetSourceTransform from "./DatasetSourceTransform"; | ||
library.add(faCopy, faExternalLinkAlt); | ||
export default { | ||
components: { | ||
DatasetSourceTransform, | ||
FontAwesomeIcon, | ||
}, | ||
props: { | ||
source: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
computed: { | ||
browserCompatUri() { | ||
const sourceUri = this.sourceUri; | ||
return sourceUri && (sourceUri.indexOf("http") == 0 || sourceUri.indexOf("ftp") == 0); | ||
}, | ||
sourceUri() { | ||
return this.source.source_uri; | ||
}, | ||
}, | ||
methods: { | ||
copyLink() { | ||
copy(this.sourceUri, "Link copied to the clipboard."); | ||
}, | ||
}, | ||
}; | ||
</script> |
94 changes: 94 additions & 0 deletions
94
client/src/components/DatasetInformation/DatasetSourceTransform.vue
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,94 @@ | ||
<template> | ||
<span class="dataset-source-transform-display"> | ||
<div v-if="transform && transform.length > 0"> | ||
Upon ingestion into the Galaxy, the following {{ actions }} were performed that modified the dataset | ||
contents: | ||
<ul> | ||
<li v-for="(transformAction, index) in transform" :key="index"> | ||
<span | ||
:title="actionLongDescription(transformAction)" | ||
class="dataset-source-transform-element" | ||
:data-transform-action="transformAction.action" | ||
v-b-tooltip.hover.noninteractive.nofade.bottom | ||
> | ||
{{ actionShortDescription(transformAction) }} | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
</span> | ||
</template> | ||
|
||
<script> | ||
import Vue from "vue"; | ||
import BootstrapVue from "bootstrap-vue"; | ||
Vue.use(BootstrapVue); | ||
const TRANSFORM_ACTION_DESCRIPTIONS = { | ||
to_posix_lines: { | ||
short: "Normalized new line characters", | ||
long: "Many Galaxy tools expect data to contain 'posix' newline characters in text files and not the newline format used by the Windows operating system. Additionally, most tools expect a newline at the end of plain text files. This file was converted to use these line endings or add a newline to the end of the file.", | ||
}, | ||
spaces_to_tabs: { | ||
short: "Normalized spaces to tabs", | ||
long: "In order to convert the referenced data source to tabular data, spaces in the file contents were converted to tab characters to indicate column separations.", | ||
}, | ||
datatype_groom: { | ||
short: "Datatype-specific grooming", | ||
long: "The Galaxy datatype class indicated the source data required 'groooming' and Galaxy applied datatype specific cleaning of the supplied data.", | ||
}, | ||
}; | ||
const DATATYPE_GROOMING_DESCRIPTIONS = { | ||
bam: "The supplied BAM was coordinate-sorted using pysam.", | ||
"qname_sorted.bam": "The supplied BAM was 'queryname' sorted using pysam.", | ||
"qname_input_sorted.bam": "The supplied BAM was 'queryname' sorted using pysam.", | ||
"isa-tab": "The supplied compressed file was converted to an ISA-TAB composite dataset.", | ||
"isa-json": "The supplied compressed file was converted to an ISA-JSON composite dataset.", | ||
}; | ||
const UNKNOWN_ACTION_DESCRIPTION = { | ||
short: "Unknown action.", | ||
long: "", | ||
}; | ||
export default { | ||
props: { | ||
transform: { | ||
type: Array, | ||
required: false, | ||
}, | ||
}, | ||
computed: { | ||
actions() { | ||
return this.transform.length > 1 ? "actions" : "action"; | ||
}, | ||
}, | ||
methods: { | ||
actionShortDescription(transformAction) { | ||
return this.actionDescription(transformAction).short || "Unknown action."; | ||
}, | ||
actionLongDescription(transformAction) { | ||
let longDescription = this.actionDescription(transformAction).long || ""; | ||
if (transformAction.action == "datatype_groom") { | ||
const datatypeDescription = DATATYPE_GROOMING_DESCRIPTIONS[transformAction.datatype_ext]; | ||
if (datatypeDescription) { | ||
longDescription += " " + datatypeDescription; | ||
} | ||
} | ||
return longDescription; | ||
}, | ||
actionDescription(transformAction) { | ||
return TRANSFORM_ACTION_DESCRIPTIONS[transformAction.action] || UNKNOWN_ACTION_DESCRIPTION; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.dataset-source-transform-element { | ||
text-decoration: underline; | ||
text-decoration-style: dashed; | ||
} | ||
</style> |
30 changes: 30 additions & 0 deletions
30
client/src/components/DatasetInformation/DatasetSources.vue
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,30 @@ | ||
<template> | ||
<span class="dataset-sources"> | ||
<ul class="dataset-sources-list"> | ||
<DatasetSource v-for="(source, index) in sources" :key="index" :source="source" /> | ||
</ul> | ||
</span> | ||
</template> | ||
|
||
<script> | ||
import DatasetSource from "./DatasetSource"; | ||
export default { | ||
components: { | ||
DatasetSource, | ||
}, | ||
props: { | ||
sources: { | ||
type: Array, | ||
required: true, | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.dataset-sources-list { | ||
padding-inline-start: 20px; | ||
margin-bottom: 0px; | ||
} | ||
</style> |
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
Oops, something went wrong.