Skip to content

Commit

Permalink
fix(navigation): move "Backend Connectins" to top level
Browse files Browse the repository at this point in the history
fix(routes): check for existing linked artifact before calling DELETE
  • Loading branch information
BastianWel committed Apr 1, 2022
1 parent 25ae0d5 commit d34cec4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ All notable changes to this project will be documented in this file.
- Data Consumption: Dispatch data via routes
- Start/Stop apps

### Changes
- Moved "Backend Connections" to the top menu level

### Fixes
- Raised comparison of variable from value to type level
- Removed sensitive data in HTTP response
Expand Down
13 changes: 5 additions & 8 deletions src/pages/PageStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ export default {
component: AddResourcePage,
subpages: []
}]
}, {
path: "backendconnectionsoffering",
name: "Backend Connections (Offering)",
component: BackendConnectionsPage
}, {
path: "routesoffering",
name: "Routes (Offering)",
Expand Down Expand Up @@ -82,10 +78,6 @@ export default {
component: IDSDataConsumptionPage,
subpages: []
}]
}, {
path: "backendconnectionsconsumption",
name: "Backend Connections (Consumption)",
component: null
}, {
path: "routesconsumption",
name: "Routes (Consumption)",
Expand All @@ -102,6 +94,11 @@ export default {
subpages: []
}]
}]
}, {
path: "backendconnections",
name: "Backend Connections",
icon: "mdi-database",
component: BackendConnectionsPage
}, {
path: "brokers",
name: "Brokers",
Expand Down
6 changes: 4 additions & 2 deletions src/utils/dataUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,10 @@ export default {

async deleteRoute(id) {
let artifact = await restUtils.callConnector("GET", "/api/routes/" + id + "/output");
let artifactId = this.getIdOfConnectorResponse(artifact);
await restUtils.callConnector("DELETE", "/api/artifacts/" + artifactId);
if (typeof artifact == 'object') {
let artifactId = this.getIdOfConnectorResponse(artifact);
await restUtils.callConnector("DELETE", "/api/artifacts/" + artifactId);
}
await restUtils.callConnector("DELETE", "/api/routes/" + id);
},

Expand Down

0 comments on commit d34cec4

Please sign in to comment.