-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
101 changed files
with
17,617 additions
and
17,813 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: E2E | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
docker compose up -d | ||
docker compose logs -f > logs & | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
|
||
- run: npm install | ||
|
||
- run: npm run cy | ||
|
||
- name: Print docker logs | ||
if: failure() | ||
run: | | ||
cat logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: triage opened issue | ||
|
||
on: | ||
issues: | ||
types: | ||
- reopened | ||
- opened | ||
|
||
jobs: | ||
label-issue: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- run: gh issue edit "$NUMBER" --add-label "$LABELS" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
NUMBER: ${{ github.event.issue.number }} | ||
LABELS: triage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:18080', | ||
supportFile: false, | ||
experimentalStudio: true | ||
}, | ||
env: { | ||
consumerUrl: 'http//localhost:18080', | ||
providerUrl: 'http//localhost:28080', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe('end-to-end', () => { | ||
const uuid = () => Cypress._.random(0, 1e6) | ||
const consumerUrl = Cypress.env('consumerUrl') | ||
const providerUrl = Cypress.env('providerUrl') | ||
|
||
it('should be accessible', () => { | ||
cy.visit(consumerUrl); | ||
|
||
cy.visit(providerUrl); | ||
}) | ||
|
||
it('should create an asset and view it on provider side', function() { | ||
cy.visit(providerUrl); | ||
|
||
const id = uuid() | ||
const name = `asset-${id}` | ||
|
||
cy.get('[href="/my-assets"]').as('assets-menu-item').click(); | ||
cy.get('#mat-input-0').as('asset-filter') | ||
cy.get('.container').contains('Create asset').as('open-new-asset-dialog').click(); | ||
cy.get('#mat-input-1').as('asset-id-field').clear(); | ||
cy.get('@asset-id-field').type(id); | ||
cy.get('#mat-input-2').as('asset-name-field').clear('ra'); | ||
cy.get('@asset-name-field').type(name); | ||
cy.get('mat-dialog-actions').click().contains('Create').as('confirm-create-asset').click(); | ||
|
||
cy.get('@asset-filter').click({force: true}).type(name); | ||
|
||
cy.get('[fxLayout="row wrap"]').as('assets-list').find('mat-card').should('have.length', 1) | ||
}); | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiKey": "ApiKeyDefaultValue", | ||
"managementApiUrl": "http://localhost:18080/management", | ||
"catalogUrl": "http://localhost:18080/management", | ||
"storageAccount": "company2assets", | ||
"storageExplorerLinkTemplate": "storageexplorer://v=1", | ||
"theme": "theme-2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
events {} | ||
http { | ||
include /etc/nginx/mime.types; | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location /management { | ||
proxy_pass http://consumer-connector:9193/management; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiKey": "ApiKeyDefaultValue", | ||
"managementApiUrl": "http://localhost:28080/management", | ||
"catalogUrl": "http://localhost:28080/management", | ||
"storageAccount": "company2assets", | ||
"storageExplorerLinkTemplate": "storageexplorer://v=1", | ||
"theme": "theme-2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
events {} | ||
http { | ||
include /etc/nginx/mime.types; | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location /management { | ||
proxy_pass http://provider-connector:9193/management; | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...nt/connector/src/main/java/org/eclipse/edc/datadashboard/DataDashboardLocalExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.datadashboard; | ||
|
||
import org.eclipse.edc.catalog.spi.FederatedCacheNode; | ||
import org.eclipse.edc.catalog.spi.FederatedCacheNodeDirectory; | ||
import org.eclipse.edc.connector.dataplane.selector.spi.instance.DataPlaneInstance; | ||
import org.eclipse.edc.connector.dataplane.selector.spi.store.DataPlaneInstanceStore; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Extension; | ||
import org.eclipse.edc.runtime.metamodel.annotation.Inject; | ||
import org.eclipse.edc.spi.system.ServiceExtension; | ||
import org.eclipse.edc.spi.system.ServiceExtensionContext; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Extension(value = DataDashboardLocalExtension.NAME) | ||
public class DataDashboardLocalExtension implements ServiceExtension { | ||
|
||
public static final String NAME = "DataDashboard Local - please do not use in production"; | ||
|
||
@Inject | ||
private FederatedCacheNodeDirectory federatedCacheNodeDirectory; | ||
|
||
@Inject | ||
private DataPlaneInstanceStore dataPlaneInstanceStore; | ||
|
||
@Override | ||
public String name() { | ||
return NAME; | ||
} | ||
|
||
@Override | ||
public void initialize(ServiceExtensionContext context) { | ||
var nodeUrl = context.getSetting("edc.federated.node.url", null); | ||
if (nodeUrl != null) { | ||
context.getMonitor().info("Register federated node: %s".formatted(nodeUrl)); | ||
federatedCacheNodeDirectory.insert(new FederatedCacheNode(UUID.randomUUID().toString(), nodeUrl, List.of("dataspace-protocol-http"))); | ||
} | ||
} | ||
|
||
@Override | ||
public void start() { | ||
var dataPlaneInstance = DataPlaneInstance.Builder.newInstance() | ||
.url("http://localhost:9192/control/transfer") | ||
.allowedSourceType("HttpData") | ||
.allowedDestType("HttpData") | ||
.build(); | ||
dataPlaneInstanceStore.create(dataPlaneInstance); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...onnector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.eclipse.edc.datadashboard.DataDashboardLocalExtension |
Oops, something went wrong.