Skip to content

Commit f9afd05

Browse files
committed
#422753 - Renamed AmazonS3HttpData filename and removed TODO comments
1 parent ac1f3f7 commit f9afd05

File tree

6 files changed

+2
-126
lines changed

6 files changed

+2
-126
lines changed

src/app/pages/assets/asset-editor-dialog/asset-editor-dialog.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, Inject } from '@angular/core';
22
import { AssetInput, HttpDataAddress, DataAddress } from '@think-it-labs/edc-connector-client';
33
import { MatDialogRef } from "@angular/material/dialog";
44
import { StorageType } from "../../../shared/models/storage-type";
5-
import { AmazonS3DataAddress } from "../../../shared/models/inesdata-data-address";
5+
import { AmazonS3DataAddress } from "../../../shared/models/amazon-s3-data-address";
66
import { NotificationService } from 'src/app/shared/services/notification.service';
77
import { DATA_ADDRESS_TYPES } from 'src/app/shared/utils/app.constants';
88

src/app/pages/catalog/catalog-browser/catalog-browser.component.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@
7575

7676
<mat-divider inset></mat-divider>
7777
<mat-card-actions class="card-actions">
78-
<!-- TODO: Pendiente de abordar en #422765 -->
79-
<!-- <button (click)="onNegotiateClicked(contractOffer)"
80-
[disabled]="isBusy(contractOffer) || isNegotiated(contractOffer)"
81-
color="accent" mat-stroked-button>
82-
<mat-icon>drive_file_rename_outline</mat-icon>
83-
Negotiate
84-
</button> -->
8578
</mat-card-actions>
8679
<mat-card-footer>
8780
<mat-progress-bar *ngIf="isBusy(contractOffer)" color="accent" mode="indeterminate"></mat-progress-bar>

src/app/pages/catalog/catalog-browser/catalog-browser.component.ts

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -54,63 +54,6 @@ export class CatalogBrowserComponent implements OnInit {
5454
this.fetch$.next(null);
5555
}
5656

57-
// TODO: Pendiente de abordar en #422765
58-
/* onNegotiateClicked(contractOffer: ContractOffer) {
59-
const initiateRequest: ContractNegotiationRequest = {
60-
connectorAddress: contractOffer.originator,
61-
offer: {
62-
offerId: contractOffer.id,
63-
assetId: contractOffer.assetId,
64-
policy: contractOffer.policy,
65-
},
66-
connectorId: 'connector',
67-
providerId: contractOffer.properties.provider
68-
};
69-
70-
const finishedNegotiationStates = [
71-
"VERIFIED",
72-
"TERMINATED",
73-
"ERROR"];
74-
75-
this.apiService.initiateNegotiation(initiateRequest).subscribe(negotiationId => {
76-
this.finishedNegotiations.delete(initiateRequest.offer.offerId);
77-
this.runningNegotiations.set(initiateRequest.offer.offerId, {
78-
id: negotiationId,
79-
offerId: initiateRequest.offer.offerId
80-
});
81-
82-
if (!this.pollingHandleNegotiation) {
83-
// there are no active negotiations
84-
this.pollingHandleNegotiation = setInterval(() => {
85-
// const finishedNegotiations: NegotiationResult[] = [];
86-
87-
for (const negotiation of this.runningNegotiations.values()) {
88-
this.apiService.getNegotiationState(negotiation.id).subscribe(updatedNegotiation => {
89-
if (finishedNegotiationStates.includes(updatedNegotiation.state!)) {
90-
let offerId = negotiation.offerId;
91-
this.runningNegotiations.delete(offerId);
92-
if (updatedNegotiation["edc:state"] === "VERIFIED") {
93-
this.finishedNegotiations.set(offerId, updatedNegotiation);
94-
this.notificationService.showInfo("Contract Negotiation complete!", "Show me!", () => {
95-
this.router.navigate(['/contracts'])
96-
})
97-
}
98-
}
99-
100-
if (this.runningNegotiations.size === 0) {
101-
clearInterval(this.pollingHandleNegotiation);
102-
this.pollingHandleNegotiation = undefined;
103-
}
104-
});
105-
}
106-
}, 1000);
107-
}
108-
}, error => {
109-
console.error(error);
110-
this.notificationService.showError("Error starting negotiation");
111-
});
112-
} */
113-
11457
isBusy(contractOffer: ContractOffer) {
11558
return this.runningNegotiations.get(contractOffer.id) !== undefined || !!this.runningTransferProcesses.find(tp => tp.assetId === contractOffer.assetId);
11659
}

src/app/pages/contracts/contract-viewer/contract-viewer.component.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@
3030

3131
<mat-divider inset></mat-divider>
3232
<mat-card-actions class="card-actions">
33-
<!-- TODO: Pendiente de abordar en #422768 -->
34-
<!-- <button (click)="onTransferClicked(contract)" [disabled]="isTransferInProgress(contract.id!)" color="accent"
35-
mat-stroked-button>
36-
<mat-icon>downloading</mat-icon>
37-
Transfer
38-
</button> -->
33+
3934
</mat-card-actions>
4035
<mat-card-footer class="contract-card-footer">
4136
<mat-progress-bar *ngIf="isTransferInProgress(contract.id!)" color="accent" mode="indeterminate"></mat-progress-bar>

src/app/pages/contracts/contract-viewer/contract-viewer.component.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -62,53 +62,10 @@ export class ContractViewerComponent implements OnInit {
6262
return '';
6363
}
6464

65-
// TODO: Pendiente de abordar en #422768
66-
/* onTransferClicked(contract: ContractAgreement) {
67-
const dialogRef = this.dialog.open(CatalogBrowserTransferDialog);
68-
69-
dialogRef.afterClosed().pipe(first()).subscribe(result => {
70-
const storageTypeId: string = result.storageTypeId;
71-
if (storageTypeId !== 'AzureStorage') {
72-
this.notificationService.showError("Only storage type \"AzureStorage\" is implemented currently!")
73-
return;
74-
}
75-
this.createTransferRequest(contract, storageTypeId)
76-
.pipe(switchMap(trq => this.transferService.initiateTransfer(trq)))
77-
.subscribe(transferId => {
78-
this.startPolling(transferId, contract["@id"]!);
79-
}, error => {
80-
console.error(error);
81-
this.notificationService.showError("Error initiating transfer");
82-
});
83-
});
84-
} */
85-
8665
isTransferInProgress(contractId: string): boolean {
8766
return !!this.runningTransfers.find(rt => rt.contractId === contractId);
8867
}
8968

90-
// TODO: Pendiente de abordar en #422768
91-
/* private createTransferRequest(contract: ContractAgreement, storageTypeId: string): Observable<TransferProcessInput> {
92-
return this.getContractOfferForAssetId(contract.assetId!).pipe(map(contractOffer => {
93-
94-
const iniateTransfer : TransferProcessInput = {
95-
assetId: contractOffer.assetId,
96-
connectorAddress: contractOffer.originator,
97-
98-
connectorId: "consumer", //doesn't matter, but cannot be null
99-
contractId: contract.id,
100-
dataDestination: {
101-
"type": storageTypeId,
102-
account: this.homeConnectorStorageAccount, // CAUTION: hardcoded value for AzureBlob
103-
// container: omitted, so it will be auto-assigned by the EDC runtime
104-
}
105-
};
106-
107-
return iniateTransfer;
108-
}));
109-
110-
} */
111-
11269
/**
11370
* This method is used to obtain that URL of the connector that is offering a particular asset from the catalog.
11471
* This is a bit of a hack, because currently there is no "clean" way to get the counter-party's URL for a ContractAgreement.

src/app/shared/models/inesdata-data-address.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)