From 50e636469ee18f882ed9bb2deefaa0718d372be4 Mon Sep 17 00:00:00 2001 From: infacc Date: Tue, 24 Oct 2023 13:33:08 +0200 Subject: [PATCH 1/7] fix: keep URL params when navigating This change is intenden to preserve the template and plugin URL parameters when navigating between workspace, data, and timeline. --- .../components/data-detail/data-detail.component.html | 4 ++-- .../experiment-data/experiment-data.component.html | 2 +- .../experiment-timeline.component.html | 2 +- .../experiment-workspace.component.ts | 2 +- src/app/components/navbar/navbar.component.html | 10 +++++----- .../preview-list/preview-list.component.html | 2 +- .../timeline-step-nav/timeline-step-nav.component.html | 4 ++-- .../timeline-step/timeline-step.component.html | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/components/data-detail/data-detail.component.html b/src/app/components/data-detail/data-detail.component.html index b39de9c..9f1d839 100644 --- a/src/app/components/data-detail/data-detail.component.html +++ b/src/app/components/data-detail/data-detail.component.html @@ -1,7 +1,7 @@
@@ -33,7 +33,7 @@

Data

Created in
- + Step {{data.producedBy}}
diff --git a/src/app/components/experiment-data/experiment-data.component.html b/src/app/components/experiment-data/experiment-data.component.html index cca0372..811e8b2 100644 --- a/src/app/components/experiment-data/experiment-data.component.html +++ b/src/app/components/experiment-data/experiment-data.component.html @@ -35,7 +35,7 @@

Experiment Data

- {{data.name}} diff --git a/src/app/components/experiment-timeline/experiment-timeline.component.html b/src/app/components/experiment-timeline/experiment-timeline.component.html index 80d3807..681c0f2 100644 --- a/src/app/components/experiment-timeline/experiment-timeline.component.html +++ b/src/app/components/experiment-timeline/experiment-timeline.component.html @@ -67,7 +67,7 @@

Experiment Timeline

+ [routerLink]="['/experiments', experimentId, 'timeline', step.sequence]" queryParamsHandling="preserve"> Step {{step.sequence}} ({{step.processorName}}@{{step.processorVersion}}) diff --git a/src/app/components/experiment-workspace/experiment-workspace.component.ts b/src/app/components/experiment-workspace/experiment-workspace.component.ts index 37f3204..c49c3cf 100644 --- a/src/app/components/experiment-workspace/experiment-workspace.component.ts +++ b/src/app/components/experiment-workspace/experiment-workspace.component.ts @@ -100,6 +100,6 @@ export class ExperimentWorkspaceComponent implements OnInit, OnDestroy { processorName: plugin.identifier, processorVersion: plugin.version, resultLocation: formData.resultUrl, - }).subscribe(timelineStep => this.router.navigate(['/experiments', experimentId, 'timeline', timelineStep.sequence.toString()])); + }).subscribe(timelineStep => this.router.navigate(['/experiments', experimentId, 'timeline', timelineStep.sequence.toString()], { queryParamsHandling: 'preserve' })); } } diff --git a/src/app/components/navbar/navbar.component.html b/src/app/components/navbar/navbar.component.html index 3c71fb7..62dfe1e 100644 --- a/src/app/components/navbar/navbar.component.html +++ b/src/app/components/navbar/navbar.component.html @@ -9,27 +9,27 @@ Info + queryParamsHandling="merge" routerLinkActive="active"> Workspace + queryParamsHandling="merge" routerLinkActive="active"> Data + queryParamsHandling="merge" routerLinkActive="active"> Timeline {{tab.name}} + queryParamsHandling="merge" routerLinkActive="active" *ngFor="let tab of generalExtraTabs"> {{tab.name}} diff --git a/src/app/components/preview-list/preview-list.component.html b/src/app/components/preview-list/preview-list.component.html index 92d20e3..42eb68f 100644 --- a/src/app/components/preview-list/preview-list.component.html +++ b/src/app/components/preview-list/preview-list.component.html @@ -1,6 +1,6 @@ - +
{{data.name}} (version {{data.version}})
diff --git a/src/app/components/timeline-step-nav/timeline-step-nav.component.html b/src/app/components/timeline-step-nav/timeline-step-nav.component.html index 33eedf6..867526f 100644 --- a/src/app/components/timeline-step-nav/timeline-step-nav.component.html +++ b/src/app/components/timeline-step-nav/timeline-step-nav.component.html @@ -1,10 +1,10 @@