Skip to content

Commit

Permalink
Merge pull request #122 from International-Data-Spaces-Association/de…
Browse files Browse the repository at this point in the history
…velop

Version 8.8.0
  • Loading branch information
BastianWel authored Jan 27, 2022
2 parents 4024907 + d600325 commit d3b9371
Show file tree
Hide file tree
Showing 14 changed files with 328 additions and 121 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
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)

## [8.7.0] - 2021-12-17
## [8.8.0] - 2022-01-27 (compatible with DSC 6.5.3)

### Added
- Data Consumption: Search for resources in the broker

### Fixes
- Route: Set contract period start/end on route creation

# Known Issues
- [Issue 851](https://github.com/International-Data-Spaces-Association/DataspaceConnector/issues/851): When changing any settings, the keystore/truststore passwords are lost in the DSC. (Is fixed in DSC 7.0.0)

## [8.7.0] - 2021-12-17 (compatible with DSC 6.5.3)

### Added
- Filter offered resources by catalog
Expand All @@ -17,7 +28,7 @@ All notable changes to this project will be documented in this file.
- Data Consumption: No validation on resource meta data dialog
- Data Consumption: getIdOfAgreement() fixed

## [8.6.0] - 2021-10-08
## [8.6.0] - 2021-10-08 (compatible with DSC 6.5.2)

### Added
- Install apps from App Store
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": "dataspaceconnector-ui",
"version": "8.7.0",
"version": "8.8.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open --port 8082",
Expand Down
20 changes: 17 additions & 3 deletions src/components/infobox/InfoBox.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The dashboard shows statistical data of the current connector.
</v-card-text>
</v-card-text>
<v-card-text v-if="currentRoute == 'idresourcesoffering'">
<v-card-text v-if="currentRoute == 'idsresourcesoffering'">
<v-card-text>
Overview of all currently offered IDS
resources.
Expand Down Expand Up @@ -82,10 +82,24 @@
General settings of the DataSpaceConnector.
</v-card-text>
</v-card-text>
<v-card-text v-if="currentRoute == 'idsresourcesconsumption'">
<v-card-text>
Overview of all requested IDS resources.<br><br>
New IDS resources can be requested by clicking the "REQUEST RESOURCE"-button.
</v-card-text>
</v-card-text>
<v-card-text v-if="currentRoute == 'requestresourceconsumption'">
<v-card-text>
Request an IDS resource from the given connector URL.<br>
When requesting a Dataspace Connector the "/api/ids/data" endpoint should be used.
There are two ways to request an IDS resource from another Connector:
<br>
<br>
<b>Connector: </b>Enter a connector URL directly (use "/api/ids/data" endpoint) and get a list of all
resources of this connector, which
can be requested.
<br>
<br>
<b>Broker: </b>Enter a broker URL and search term. The broker then returns a list of resources from various
connectors, which can be requested.
</v-card-text>
</v-card-text>
</v-card>
4 changes: 2 additions & 2 deletions src/pages/PageStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
icon: "mdi-application-export",
component: null,
subpages: [{
path: "idresourcesoffering",
path: "idsresourcesoffering",
name: "IDS Resources (Offering)",
component: IDSResourcesPage,
subpages: [{
Expand Down Expand Up @@ -73,7 +73,7 @@ export default {
icon: "mdi-file-document-outline",
component: null,
subpages: [{
path: "idresourcesconsumption",
path: "idsresourcesconsumption",
name: "IDS Resources (Consumption)",
component: IDSResourcesPageConsumption,
subpages: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
.data-consumption-page-dialog-title {
margin-top: 10px;
}
#btn-accept {
color: green;
align-self: center;
}
#btn-decline {
color: red;
align-self: center;
}
.data-consumption-page-row {
padding-top: 20px;
padding-bottom: 20px;
Expand Down
211 changes: 117 additions & 94 deletions src/pages/dataconsumption/dataconsumption/IDSDataConsumptionPage.html
Original file line number Diff line number Diff line change
@@ -1,104 +1,127 @@
<div class="content data-consumption-page">
<div>
<v-row no-gutters class="data-consumption-page-row">
<v-col cols="12" md="11" sm="12">
<v-form v-model="valid" ref="form">
<v-text-field label="Provider Connector URL" v-model="recipientId" :rules="providerUrlRule">
</v-text-field>
<v-btn id="btn-show-catalogs" color="primary" @click.native="receiveCatalogs" :disabled="!valid">
Show available resources
</v-btn>
</v-form>
<div v-if="resources.length > 0">
<h3 class="data-consumption-page-title">Resources:</h3>
<div>
<v-data-table :headers="headers" :items="resources" :items-per-page="5" :sort-by.sync="sortBy"
:sort-desc.sync="sortDesc" no-data-text="No resources available">
<template @click="selectElement(item)" v-slot:item.actions="{ item }">
<v-icon class="mr-2" @click="showRepresentations(item)">
mdi-file-find
</v-icon>
<v-icon class="mr-2" @click="showItem(item)">
mdi-eye
</v-icon>
</template>
</v-data-table>
</div>
</div>
<div v-if="selectedRepresentations.length > 0">
<h3>Select Representation:</h3>
<div v-for="representation in selectedRepresentations">
<v-btn color="secondary" @click="selectRepresentation(representation)">
{{ representation.display }}
</v-btn>
<div v-for="filetype in resources.filetype">{{ filetype }}</div>
</div>
</div>
<div v-if="selectedArtifacts.length > 0">
<h3 class="data-consumption-page-title">Artifacts:</h3>
<!-- <div v-for="artifact in selectedArtifacts">
<v-tabs class="pagestab" v-model="active_tab" ref="pagestab">
<v-tab>Connector</v-tab>
<v-tab>Broker</v-tab>
<v-tab-item :eager="true">
<div>
<v-row no-gutters class="data-consumption-page-row">
<v-col cols="12" md="11" sm="12">
<v-form v-model="valid" ref="form">
<v-text-field label="Provider Connector URL" v-model="recipientId" :rules="providerUrlRule">
</v-text-field>
<v-btn id="btn-show-catalogs" color="primary" @click.native="receiveCatalogs"
:disabled="!valid">
Show available resources
</v-btn>
</v-form>
<div v-if="resources.length > 0">
<h3 class="data-consumption-page-title">Resources:</h3>
<div>
<v-data-table :headers="headers" :items="resources" :items-per-page="5"
:sort-by.sync="sortBy" :sort-desc.sync="sortDesc"
no-data-text="No resources available">
<template @click="selectElement(item)" v-slot:item.actions="{ item }">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-icon class="mr-2" @click="showRepresentations(item)" v-bind="attrs"
v-on="on">
mdi-file-find
</v-icon>
</template>
<span>Show representations</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-icon class="mr-2" @click="showItem(item)" v-bind="attrs" v-on="on">
mdi-eye
</v-icon>
</template>
<span>Show meta data</span>
</v-tooltip>
</template>
</v-data-table>
</div>
</div>
<div v-if="selectedRepresentations.length > 0">
<h3>Select Representation:</h3>
<div v-for="representation in selectedRepresentations">
<v-btn color="secondary" @click="selectRepresentation(representation)">
{{ representation.display }}
</v-btn>
<div v-for="filetype in resources.filetype">{{ filetype }}</div>
</div>
</div>
<div v-if="selectedArtifacts.length > 0">
<h3 class="data-consumption-page-title">Artifacts:</h3>
<!-- <div v-for="artifact in selectedArtifacts">
<v-btn color="secondary">
{{ artifact['@id'] }}
</v-btn>
</div> -->
<v-data-table :headers="headersArtifacts" :items="selectedArtifacts" :items-per-page="5">
<template v-slot:item.actions="{ item }">
<!-- <v-icon class="mr-2" @click="showContract(item)">
mdi-lock-open
</v-icon> -->
<template>
<div class="text-center">
<v-dialog v-model="dialog" width="615">
<v-data-table :headers="headersArtifacts" :items="selectedArtifacts" :items-per-page="5">
<template v-slot:item.actions="{ item }">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-icon class="mr-2" v-bind="attrs" v-on="on">
<v-icon class="mr-2" @click="requestArtifact(item)" v-bind="attrs"
v-on="on">
mdi-lock-open
</v-icon>
</template>

<v-card>
<v-card-title class="text-h5 grey lighten-2">
Contract information
</v-card-title>

<v-card-text>
<h4 class="data-consumption-page-dialog-title">Rules:</h4>
<policy-line
v-for='rule in selectedResource["ids:contractOffer"][0]["ids:permission"]'
:ruleJson="rule" :policyName="rule.type" :readonly=true>
</policy-line>
<h4 class="data-consumption-page-dialog-title">License:</h4>
{{ selectedResource["ids:standardLicense"]["@id"] }}
</v-card-text>

<v-divider></v-divider>

<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green" text
@click="dialog = false; clickAcceptContract(item)">
<p id="btn-accept">accept</p>
</v-btn>

<v-btn color="red" text @click="dialog = false">
<p id="btn-decline">decline</p>
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
</template>
</v-data-table>
</div>
<div v-if="requestContractResponse['confirmed'] == true">
<h3 class="data-consumption-page-title">Download:</h3>
<v-btn color="secondary" :href="downloadLink" target="_blank">
{{ downloadLink }}
</v-btn>
</div>
</v-col>
</v-row>
</div>
<div class="data-consumption-page-bottom"></div>
<resource-details-dialog ref="resourceDetailsDialog"></resource-details-dialog>
<span>Request artifact</span>
</v-tooltip>
</template>
</v-data-table>
</div>
<div v-if="requestContractResponse['confirmed'] == true">
<h3 class="data-consumption-page-title">Download:</h3>
<v-btn color="secondary" :href="downloadLink" target="_blank">
{{ downloadLink }}
</v-btn>
</div>
</v-col>
</v-row>
</div>
<div class="data-consumption-page-bottom"></div>
<resource-details-dialog ref="resourceDetailsDialog"></resource-details-dialog>
<artifact-dialog ref="artifactDialog"></artifact-dialog>
</v-tab-item>
<v-tab-item :eager="true">
<div>
<v-row no-gutters class="data-consumption-page-row">
<v-col cols="12" md="11" sm="12">
<v-form v-model="validSearch" ref="form">
<v-autocomplete label="Broker URL" v-model="brokerUri" :items="brokerUris"
no-data-text="No saved brokers" :rules="providerUrlRule">
</v-autocomplete>
<v-text-field label="Search" v-model="search" :rules="defaultRule">
</v-text-field>
<v-btn color="primary" @click.native="searchResources" :disabled="!validSearch">
Search resources
</v-btn>
</v-form>
<div v-if="searchResult.length > 0">
<h3 class="data-consumption-page-title">Resources:</h3>
<div>
<v-data-table :headers="headersSearch" :items="searchResult" :items-per-page="5"
:sort-by.sync="sortBy" :sort-desc.sync="sortDesc"
no-data-text="No resources available">
<template @click="selectElement(item)" v-slot:item.actions="{ item }">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-icon class="mr-2" @click="requestSearchResult(item)" v-bind="attrs"
v-on="on">
mdi-arrow-down-box
</v-icon>
</template>
<span>Request resource</span>
</v-tooltip>
</template>
</v-data-table>
</div>
</div>
</v-col>
</v-row>
</div>
</v-tab-item>
</v-tabs>
</div>
Loading

0 comments on commit d3b9371

Please sign in to comment.