-
+
@@ -21,7 +28,8 @@
title="Dataset Details"
size="sm"
variant="link"
- @click.stop="onInfo">
+ :href="showDetailsUrl"
+ @click.prevent.stop="onInfo">
+ :href="rerunUrl"
+ @click.prevent.stop="onRerun">
+ :href="visualizeUrl"
+ @click.prevent.stop="onVisualize">
import { legacyNavigationMixin } from "components/plugins/legacyNavigation";
import { copy as sendToClipboard } from "utils/clipboard";
-import { absPath } from "utils/redirect";
+import { absPath, prependPath } from "utils/redirect.js";
import { downloadUrlMixin } from "./mixins.js";
import DatasetDownload from "./DatasetDownload";
@@ -74,6 +84,7 @@ export default {
props: {
item: { type: Object, required: true },
showHighlight: { type: Boolean, default: false },
+ itemUrls: { type: Object, required: true },
},
computed: {
showDownloads() {
@@ -97,6 +108,18 @@ export default {
// TODO: Check hasViz, if visualizations are activated in the config
return !this.item.purged && ["ok", "failed_metadata", "error"].includes(this.item.state);
},
+ reportErrorUrl() {
+ return prependPath(this.itemUrls.reportError);
+ },
+ showDetailsUrl() {
+ return prependPath(this.itemUrls.showDetails);
+ },
+ rerunUrl() {
+ return prependPath(this.itemUrls.rerun);
+ },
+ visualizeUrl() {
+ return prependPath(this.itemUrls.visualize);
+ },
},
methods: {
onCopyLink() {
@@ -107,10 +130,10 @@ export default {
window.location.href = resource;
},
onError() {
- this.backboneRoute("datasets/error", { dataset_id: this.item.id });
+ this.backboneRoute(this.itemUrls.reportError);
},
onInfo() {
- this.backboneRoute(`datasets/${this.item.id}/details`);
+ this.backboneRoute(this.itemUrls.showDetails);
},
onRerun() {
this.backboneRoute(`root?job_id=${this.item.creating_job}`);
@@ -118,7 +141,7 @@ export default {
onVisualize() {
const name = this.item.name || "";
const title = `Visualization of ${name}`;
- const path = `visualizations?dataset_id=${this.item.id}`;
+ const path = this.itemUrls.visualize;
const redirectParams = {
path: path,
title: title,
diff --git a/client/src/components/History/Content/Dataset/DatasetDetails.vue b/client/src/components/History/Content/Dataset/DatasetDetails.vue
index ebb632d7290..5e67cc59a35 100644
--- a/client/src/components/History/Content/Dataset/DatasetDetails.vue
+++ b/client/src/components/History/Content/Dataset/DatasetDetails.vue
@@ -21,7 +21,11 @@
{{ result.misc_info }}