Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit bda008a

Browse files
authored
Merge pull request #137 from International-Data-Spaces-Association/develop
Version 9.1.0
2 parents c774782 + d34cec4 commit bda008a

31 files changed

+4257
-2383
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
All notable changes to this project will be documented in this file.
33
(Skipped major version 1, 2 and 3 to match versioning of IDS DataSpaceConnector)
44

5+
## [9.1.0] - 2022-04-01 (compatible with DSC 7.0.0)
6+
7+
### Added
8+
- Data Offering: Add local data resources
9+
- Backend Connections: Source type "Other"
10+
- Added route creator (Data Offering & Consumption) with apps
11+
- Data Consumption: Dispatch data via routes
12+
- Start/Stop apps
13+
14+
### Changes
15+
- Moved "Backend Connections" to the top menu level
16+
17+
### Fixes
18+
- Raised comparison of variable from value to type level
19+
- Removed sensitive data in HTTP response
20+
- Also delete docker container of app on delete
21+
522
## [9.0.0] - 2022-02-07 (compatible with DSC 7.0.0)
623

724
### Added

package-lock.json

Lines changed: 3222 additions & 2007 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dataspaceconnector-ui",
3-
"version": "9.0.0",
3+
"version": "9.1.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve --open --port 8082",
@@ -13,30 +13,30 @@
1313
"postinstall": "cd src/backend && npm install"
1414
},
1515
"dependencies": {
16-
"apexcharts": "^3.25.0",
17-
"axios": "0.21.4",
16+
"apexcharts": "^3.33.1",
17+
"axios": "0.26.0",
1818
"concurrently": "^5.3.0",
19-
"core-js": "^3.6.5",
19+
"core-js": "^3.21.1",
2020
"d3": "5.15.0",
21-
"material-design-icons-iconfont": "^6.1.0",
21+
"material-design-icons-iconfont": "^6.1.1",
2222
"moment": "2.29.1",
23-
"vue": "^2.6.11",
23+
"vue": "^2.6.14",
2424
"vue-apexcharts": "1.6.0",
2525
"vue-router": "3.1.6",
2626
"vuetify": "2.3.12"
2727
},
2828
"devDependencies": {
29-
"@vue/cli-plugin-babel": "~4.5.0",
30-
"@vue/cli-plugin-eslint": "~4.5.0",
31-
"@vue/cli-service": "4.x",
29+
"@vue/cli-plugin-babel": "4.5.15",
30+
"@vue/cli-plugin-eslint": "4.5.15",
31+
"@vue/cli-service": "^4.5.15",
3232
"babel-eslint": "^10.1.0",
3333
"eslint": "^6.7.2",
3434
"eslint-plugin-vue": "^6.2.2",
35-
"sass": "^1.19.0",
35+
"sass": "^1.49.7",
3636
"sass-loader": "^8.0.0",
37-
"vue-cli-plugin-vuetify": "~2.0.7",
38-
"vue-template-compiler": "^2.6.11",
39-
"vuetify-loader": "^1.3.0"
37+
"vue-cli-plugin-vuetify": "^2.4.5",
38+
"vue-template-compiler": "^2.6.14",
39+
"vuetify-loader": "^1.7.3"
4040
},
4141
"eslintConfig": {
4242
"root": true,

src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default {
2222
src: local("icons"), url(./assets/fonts/icons.ttf) format("truetype");
2323
}
2424
25+
.v-tab--active {
26+
border-bottom: 2px solid var(--v-primary-base) !important;
27+
}
28+
2529
.icon-dashboard:before {
2630
content: "\e900";
2731
}

src/backend/index.js

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,34 @@ function del(url, data) {
9191
});
9292
}
9393

94-
function escape(text) {
95-
return encodeURIComponent(text);
94+
function escape(text, key) {
95+
let escapedText = "";
96+
if (Array.isArray(text)) {
97+
for (let i = 0; i < text.length; i++) {
98+
if (i > 0) {
99+
escapedText += "&" + key + "=";
100+
}
101+
escapedText += encodeURIComponent(text[i]);
102+
}
103+
} else {
104+
escapedText = encodeURIComponent(text);
105+
}
106+
return escapedText;
96107
}
97108

98109
function stringifySafe(obj, replacer, spaces, cycleReplacer) {
99110
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
100111
}
101112

113+
function filterError(origError) {
114+
if (origError.response !== undefined) {
115+
// remove config & request data, because it contains sensitive data.
116+
origError.response.config = null;
117+
origError.response.request = null;
118+
}
119+
return origError;
120+
}
121+
102122
function serializer(replacer, cycleReplacer) {
103123
var stack = [], keys = []
104124

@@ -120,6 +140,15 @@ function serializer(replacer, cycleReplacer) {
120140
}
121141
}
122142

143+
app.get('/testdata', function (req, res) {
144+
res.send("TEST DATA FROM BACKEND");
145+
});
146+
147+
app.post('/testdata', function (req, res) {
148+
console.log(">>> TEST DATA RECEIVED: ", req.body);
149+
res.send("OK");
150+
});
151+
123152
app.get('/', function (req, res) {
124153
res.sendFile(vuePath + "index.html");
125154
});
@@ -128,17 +157,18 @@ app.post('/', (req, res) => {
128157
let call = req.body.url;
129158
let i = 0;
130159
for (let key in req.body.params) {
131-
if (i == 0) {
132-
call += "?" + key + "=" + escape(req.body.params[key]);
160+
if (i === 0) {
161+
call += "?" + key + "=" + escape(req.body.params[key], key);
133162
} else {
134-
call += "&" + key + "=" + escape(req.body.params[key]);
163+
call += "&" + key + "=" + escape(req.body.params[key], key);
135164
}
136165
i++;
137166
}
138167
if (req.body.type == "POST") {
139168
post(connectorUrl + call, req.body.body).then(response => {
140169
res.send(response.data);
141-
}).catch(error => {
170+
}).catch(origError => {
171+
let error = filterError(origError);
142172
if (error.response === undefined) {
143173
console.log("Error on POST " + req.body.url, error);
144174
res.send(stringifySafe(error));
@@ -151,7 +181,8 @@ app.post('/', (req, res) => {
151181
} else if (req.body.type == "PUT") {
152182
put(connectorUrl + call, req.body.body).then(response => {
153183
res.send(response.data);
154-
}).catch(error => {
184+
}).catch(origError => {
185+
let error = filterError(origError);
155186
if (error.response === undefined) {
156187
console.log("Error on PUT " + req.body.url, error);
157188
res.send(stringifySafe(error));
@@ -166,7 +197,8 @@ app.post('/', (req, res) => {
166197
} else {
167198
get(connectorUrl + call).then(response => {
168199
res.send(response.data);
169-
}).catch(error => {
200+
}).catch(origError => {
201+
let error = filterError(origError);
170202
if (error.response === undefined) {
171203
console.log("Error on GET " + req.body.url, error);
172204
res.send(stringifySafe(error));
@@ -179,7 +211,8 @@ app.post('/', (req, res) => {
179211
} else if (req.body.type == "DELETE") {
180212
del(connectorUrl + call, req.body.body).then(response => {
181213
res.send(response.data);
182-
}).catch(error => {
214+
}).catch(origError => {
215+
let error = filterError(origError);
183216
if (error.response === undefined) {
184217
console.log("Error on DELETE " + req.body.url, error);
185218
res.send(stringifySafe(error));

src/components/infobox/InfoBox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
Overview of all currently defined routes of offered data.<br>
6464
</v-card-text>
6565
</v-card-text>
66-
<v-card-text v-if="currentRoute == 'addroute'">
66+
<v-card-text v-if="currentRoute == 'addrouteoffering'">
6767
<v-card-text>
6868
Creation of a route. Nodes of the types "Backend", "App" and "IDS Endpoint" can be created and connected by
6969
edges. For each edge, the inputs and outputs to be connected can be selected by double-clicking. The

src/datamodel/clientDataModel.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default {
230230
return configuration;
231231
},
232232

233-
createGenericEndpoint(id, accessUrl, dataSourceId, username, password, apiKey, type) {
233+
createGenericEndpoint(id, accessUrl, username, password, apiKey, type, driverClassName, camelSqlUri) {
234234
let genericEndpoint = {};
235235

236236
if (id === undefined) {
@@ -245,12 +245,6 @@ export default {
245245
genericEndpoint.accessUrl = accessUrl;
246246
}
247247

248-
if (dataSourceId === undefined) {
249-
genericEndpoint.dataSourceId = "";
250-
} else {
251-
genericEndpoint.dataSourceId = dataSourceId;
252-
}
253-
254248
if (username === undefined) {
255249
genericEndpoint.username = "";
256250
} else {
@@ -275,18 +269,37 @@ export default {
275269
genericEndpoint.type = type;
276270
}
277271

272+
if (driverClassName === undefined) {
273+
genericEndpoint.driverClassName = "";
274+
} else {
275+
genericEndpoint.driverClassName = driverClassName;
276+
}
277+
278+
if (camelSqlUri === undefined) {
279+
genericEndpoint.camelSqlUri = "";
280+
} else {
281+
genericEndpoint.camelSqlUri = camelSqlUri;
282+
}
283+
278284
return genericEndpoint;
279285
},
280286

281-
convertIdsGenericEndpoint(genericEndpoint) {
287+
convertIdsGenericEndpoint(genericEndpoint, dataSource) {
282288
let id = dataUtils.getIdOfConnectorResponse(genericEndpoint);
283289
let accessUrl = undefined;
284-
accessUrl = genericEndpoint.location;
285-
let dataSourceId = dataUtils.getIdOfLink(genericEndpoint, "datasource");
290+
let driverClassName = undefined;
291+
let camelSqlUri = undefined;
292+
if (dataSource.type == "REST" || dataSource.type == "Other") {
293+
accessUrl = genericEndpoint.location;
294+
} else {
295+
accessUrl = dataSource.url;
296+
driverClassName = dataSource.driverClassName;
297+
camelSqlUri = genericEndpoint.location;
298+
}
286299
let username = undefined;
287300
let password = undefined;
288301
let apiKey = undefined;
289-
return this.createGenericEndpoint(id, accessUrl, dataSourceId, username, password, apiKey, genericEndpoint.type);
302+
return this.createGenericEndpoint(id, accessUrl, username, password, apiKey, genericEndpoint.type, driverClassName, camelSqlUri);
290303
},
291304

292305
createApp(id, title, description, type) {

src/pages/PageStructure.js

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import DashboardPage from "@/pages/dashboard/DashboardPage.vue";
22
import IDSResourcesPage from "@/pages/dataoffering/resources/IDSResourcesPage.vue";
33
import AddResourcePage from "@/pages/dataoffering/resources/addresource/AddResourcePage.vue";
4+
import RoutesPage from "@/pages/dataoffering/routes/RoutesPage.vue";
5+
import AddRoutePage from "@/pages/dataoffering/routes/addroute/AddRoutePage.vue";
46
import IDSDataConsumptionPage from "@/pages/dataconsumption/dataconsumption/IDSDataConsumptionPage.vue";
57
import IDSResourcesPageConsumption from "@/pages/dataconsumption/resources/IDSResourcesPageConsumption.vue";
68
import BrokersPage from "@/pages/brokers/BrokersPage.vue";
@@ -41,9 +43,20 @@ export default {
4143
subpages: []
4244
}]
4345
}, {
44-
path: "backendconnectionsoffering",
45-
name: "Backend Connections (Offering)",
46-
component: BackendConnectionsPage
46+
path: "routesoffering",
47+
name: "Routes (Offering)",
48+
component: RoutesPage,
49+
subpages: [{
50+
path: "addrouteoffering",
51+
name: "Add Route (Offering)",
52+
component: AddRoutePage,
53+
subpages: []
54+
}, {
55+
path: "showrouteoffering",
56+
name: "Show Route (Offering)",
57+
component: AddRoutePage,
58+
subpages: []
59+
}]
4760
}, {
4861
path: "catalogsoffering",
4962
name: "Catalogs (Offering)",
@@ -66,10 +79,26 @@ export default {
6679
subpages: []
6780
}]
6881
}, {
69-
path: "backendconnectionsconsumption",
70-
name: "Backend Connections (Consumation)",
71-
component: null
82+
path: "routesconsumption",
83+
name: "Routes (Consumption)",
84+
component: RoutesPage,
85+
subpages: [{
86+
path: "addrouteconsumption",
87+
name: "Add Route (Consumption)",
88+
component: AddRoutePage,
89+
subpages: []
90+
}, {
91+
path: "showrouteconsumption",
92+
name: "Show Route (Consumption)",
93+
component: AddRoutePage,
94+
subpages: []
95+
}]
7296
}]
97+
}, {
98+
path: "backendconnections",
99+
name: "Backend Connections",
100+
icon: "mdi-database",
101+
component: BackendConnectionsPage
73102
}, {
74103
path: "brokers",
75104
name: "Brokers",

src/pages/apps/AppsPage.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,33 @@
88
<v-row no-gutters>
99
<v-col cols="12" md="11" sm="12">
1010
<v-data-table v-model="selected" :headers="headers" :items="apps" :items-per-page="5" :search="search"
11-
item-key="id" no-data-text="No apps available">
11+
item-key="id" no-data-text="No apps available" :sort-by.sync="sortBy" :sort-desc.sync="sortDesc">
1212
<template v-slot:item.actions="{ item }">
13-
<!-- <v-tooltip bottom>
13+
<v-tooltip bottom>
1414
<template v-slot:activator="{ on, attrs }">
15-
<v-icon class="mr-2" @click="startApp(item)" v-bind="attrs" v-on="on">
15+
<v-icon class="mr-2" @click="startApp(item)" v-bind="attrs" v-on="on"
16+
:disabled="item.isAppRunning">
1617
mdi-play
1718
</v-icon>
1819
</template>
19-
<span>Install apps</span>
20+
<span>Start app</span>
2021
</v-tooltip>
2122
<v-tooltip bottom>
2223
<template v-slot:activator="{ on, attrs }">
23-
<v-icon class="mr-2" @click="stopApp(item)" v-bind="attrs" v-on="on">
24+
<v-icon class="mr-2" @click="stopApp(item)" v-bind="attrs" v-on="on"
25+
:disabled="!item.isAppRunning">
2426
mdi-stop
2527
</v-icon>
2628
</template>
27-
<span>Edit app store</span>
28-
</v-tooltip> -->
29+
<span>Stop app</span>
30+
</v-tooltip>
2931
<v-tooltip bottom>
3032
<template v-slot:activator="{ on, attrs }">
3133
<v-icon @click="deleteItem(item)" v-bind="attrs" v-on="on">
3234
mdi-delete
3335
</v-icon>
3436
</template>
35-
<span>Delete app store</span>
37+
<span>Delete app</span>
3638
</v-tooltip>
3739
</template>
3840
</v-data-table>

0 commit comments

Comments
 (0)