mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix broken library datasets links
- Some links to library elements were not replaced with the new library router paths. - Fix undeleted dataset link in toast message.
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
Manage
|
||||
</b-button>
|
||||
<button
|
||||
@click="undelete(row.item)"
|
||||
@click="undelete(row.item, folder_id)"
|
||||
v-if="row.item.deleted"
|
||||
:title="'Undelete ' + row.item.name"
|
||||
class="lib-btn primary-button btn-sm undelete_dataset_btn"
|
||||
@@ -544,7 +544,7 @@ export default {
|
||||
);
|
||||
}
|
||||
},
|
||||
undelete: function (element) {
|
||||
undelete: function (element, parent_folder) {
|
||||
const onError = (response) => {
|
||||
const message = `${element.type === "folder" ? "Folder" : "Dataset"}`;
|
||||
if (typeof response.responseJSON !== "undefined") {
|
||||
@@ -569,11 +569,11 @@ export default {
|
||||
(response) => {
|
||||
element.deleted = response.deleted;
|
||||
this.refreshTable();
|
||||
Toast.success("Dataset undeleted. Click this to see it.", "", {
|
||||
Toast.success("Dataset undeleted. Click here to see it.", "", {
|
||||
onclick: function () {
|
||||
window.location = `${getAppRoot()}library/list#folders/${
|
||||
this.current_folder_id
|
||||
}/datasets/${element.id}`;
|
||||
window.location = `${getAppRoot()}libraries/folders/${parent_folder}/dataset/${
|
||||
element.id
|
||||
}`;
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
title="Go to Dataset Details"
|
||||
variant="secondary"
|
||||
type="button"
|
||||
:href="`${root}library/list#folders/${folder_id}/datasets/${dataset_id}`">
|
||||
:href="`${root}libraries/folders/${folder_id}/dataset/${dataset_id}`">
|
||||
<font-awesome-icon :icon="['far', 'file']" />
|
||||
Dataset Details
|
||||
</b-button>
|
||||
|
||||
@@ -878,7 +878,7 @@ $(document).ready(function() {
|
||||
target = 'galaxy_main';
|
||||
break;
|
||||
case "data library":
|
||||
link = Galaxy.root + "library/list#folders/" + item.root_folder_id;
|
||||
link = Galaxy.root + "libraries/folders/" + item.root_folder_id;
|
||||
break;
|
||||
case "workflow":
|
||||
link = Galaxy.root + "workflow/editor?id=" + item.id;
|
||||
|
||||
@@ -64,7 +64,7 @@ def render_hda_copied_from_library(trans, hda, children):
|
||||
id = trans.security.encode_id(hda.id)
|
||||
folder = hda.copied_from_library_dataset_dataset_association.library_dataset.folder
|
||||
folder_id = f"F{trans.security.encode_id(folder.id)}"
|
||||
url = url_for(f"/library/list#folders/{folder_id}")
|
||||
url = url_for(f"/libraries/folders/{folder_id}")
|
||||
template = '<div class="copied-from">'
|
||||
template += '<div class="header">'
|
||||
template += '<div>'
|
||||
|
||||
Reference in New Issue
Block a user