Skip to content

Commit

Permalink
Merge pull request #51 from International-Data-Spaces-Association/dev…
Browse files Browse the repository at this point in the history
…elop

Version 7.1.0
  • Loading branch information
BastianWel authored Jun 29, 2021
2 parents c08d254 + e4bddfb commit 13859ae
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
(Skipped major version 1, 2 and 3 to match versioning of IDS DataSpaceConnector, this way the major version of DSC, CM and UI indicates compatibility)

## [7.1.0] - 2021-06-29

### Added
- Show route error list on page "Data Offering > Routes"

## [7.0.1] - 2021-06-17

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ids-configmanager-ui",
"version": "7.0.1",
"version": "7.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open --port 8082",
Expand Down
5 changes: 5 additions & 0 deletions src/pages/dataoffering/routes/RoutesPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
display: flex;
justify-content: center;
}

.route-errors-title {
font-weight: bold;
margin-top: 15px;
}
12 changes: 12 additions & 0 deletions src/pages/dataoffering/routes/RoutesPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
</v-data-table>
</v-col>
</v-row>
<v-row class="route-errors-title">
<v-col cols="12" md="11" sm="12">
Route errors:
</v-col>
</v-row>
<v-row no-gutters>
<v-col cols="12" md="11" sm="12">
<v-data-table :headers="errorHeaders" :items="routeErrors" :items-per-page="5"
:sort-by.sync="errorSortBy" :sort-desc.sync="sortDesc" no-data-text="No route errors">
</v-data-table>
</v-col>
</v-row>
</div>
<confirmation-dialog ref="confirmationDialog"></confirmation-dialog>
</div>
31 changes: 30 additions & 1 deletion src/pages/dataoffering/routes/RoutesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@ export default {
sortable: false,
align: 'right'
}],
errorHeaders: [{
text: 'Time',
value: 'timestamp',
width: 135
}, {
text: 'Route ID',
value: 'routeId',
}, {
text: 'Error',
value: 'message'
}, {
text: 'Endpoint',
value: 'endpoint'
}],
sortBy: 'description',
errorSortBy: 'timestamp',
sortDesc: true,
routes: []
routes: [],
routeErrors: []
};
},
mounted: function () {
Expand All @@ -31,6 +47,7 @@ export default {
methods: {
async getRoutes() {
this.$root.$emit('showBusyIndicator', true);
await this.getRouteErrors();
let response = await dataUtils.getRoutes();
if (response.name !== undefined && response.name == "Error") {
this.$root.$emit('error', "Get routes failed.");
Expand All @@ -45,6 +62,18 @@ export default {
this.$root.$emit('showBusyIndicator', false);
}
},
async getRouteErrors() {
let response = await dataUtils.getRouteErrors();
if (response.name !== undefined && response.name == "Error") {
this.$root.$emit('error', "Get route errors failed.");
} else {
let routeErrors = response.reverse();
for (let routeError of routeErrors) {
routeError.timestamp = routeError.timestamp.substring(0, 19).replace("T", " ");
}
this.$data.routeErrors = routeErrors;
}
},
deleteItem(item) {
this.$refs.confirmationDialog.title = "Delete Route";
this.$refs.confirmationDialog.text = "Are you sure you want to delete the route '" + item.description + "'?";
Expand Down
11 changes: 11 additions & 0 deletions src/utils/dataUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,17 @@ export default {
});
},

getRouteErrors() {
return new Promise(function (resolve) {
restUtils.call("GET", "/api/ui/route/error").then(response => {
resolve(response.data);
}).catch(error => {
console.log("Error in getRouteErrors(): ", error);
resolve(error);
});
});
},

createNewRoute(description) {
return new Promise(function (resolve) {
let params = {
Expand Down

0 comments on commit 13859ae

Please sign in to comment.