From e7836a92a18f402049e9b99e7dbd2fc6a7f671c9 Mon Sep 17 00:00:00 2001 From: mdelez <60604010+mdelez@users.noreply.github.com> Date: Fri, 23 Sep 2022 10:18:29 +0200 Subject: [PATCH] fix: Onto editor 404 error (DEV-1355) (#831) * fix: add better routing for onto editor * remove commented code --- src/app/app-routing.module.ts | 5 +++++ src/app/project/ontology/ontology.component.ts | 5 ++++- src/app/project/project.component.ts | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6faeadead7..1e38190773 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -130,6 +130,11 @@ const routes: Routes = [ component: OntologyComponent, canActivate: [AuthGuard] }, + { + path: 'ontology/:onto/editor/:view', + component: OntologyComponent, + canActivate: [AuthGuard] + }, { path: 'ontology/:onto/:class', component: OntologyClassInstanceComponent, diff --git a/src/app/project/ontology/ontology.component.ts b/src/app/project/ontology/ontology.component.ts index 525c579fbd..30131fd732 100644 --- a/src/app/project/ontology/ontology.component.ts +++ b/src/app/project/ontology/ontology.component.ts @@ -618,7 +618,10 @@ export class OntologyComponent implements OnInit { this._dspApiConnection.v2.onto.deleteResourceProperty(resProp).subscribe( (response: OntologyMetadata) => { this.loading = false; - this.resetOntology(this.ontologyIri); + // get the ontologies for this project + this.initOntologiesList(); + // update the view of resource class or list of properties + this.initOntology(this.ontologyIri); }, (error: ApiResponseError) => { this._errorHandler.showMessage(error); diff --git a/src/app/project/project.component.ts b/src/app/project/project.component.ts index a16cf96354..dd09b55dbc 100644 --- a/src/app/project/project.component.ts +++ b/src/app/project/project.component.ts @@ -218,7 +218,7 @@ export class ProjectComponent implements OnInit { id = array[pos]; } if (id) { - this._router.navigate([route, encodeURIComponent(id)], { relativeTo: this._route }); + this._router.navigate([route, encodeURIComponent(id), 'editor', 'classes'], { relativeTo: this._route }); } else { this._router.navigate([route], { relativeTo: this._route }); }