Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: Onto editor 404 error (DEV-1355) (#831)
* fix: add better routing for onto editor

* remove commented code
  • Loading branch information
mdelez committed Sep 23, 2022
1 parent ba35d6f commit e7836a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/app/app-routing.module.ts
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/app/project/ontology/ontology.component.ts
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/app/project/project.component.ts
Expand Up @@ -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 });
}
Expand Down

0 comments on commit e7836a9

Please sign in to comment.