Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable AzureStorage #38

Merged
merged 7 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {AppComponent} from './app.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

import {LayoutModule} from '@angular/cdk/layout';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatButtonModule} from '@angular/material/button';
import {MatSidenavModule} from '@angular/material/sidenav';
Expand Down Expand Up @@ -36,6 +37,7 @@ import { EdcConnectorClient } from "@think-it-labs/edc-connector-client";
MatIconModule,
MatListModule,
EdcDemoModule,
MatAutocompleteModule,
MatSnackBarModule
],
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,47 @@
<mat-label>Version</mat-label>
<input [(ngModel)]="version" matInput [placeholder]="'1.0'">
</mat-form-field>
</div>

<div>
<mat-form-field class="form-field" color="accent" id="form-field-destination">
<mat-label>Destination</mat-label>
<mat-select [(ngModel)]="storageTypeId" disabled>
<mat-option value="HttpData">
HttpData
<mat-select [(ngModel)]="storageTypeId">
<mat-option *ngFor="let storageType of storageTypes " [value]="storageType.id">
{{storageType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="form-field" color="accent" id="form-field-originator">
<mat-label>Originator</mat-label>
<input [(ngModel)]="originator" matInput [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let example of originatorExamples" [value]="example">
{{example}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</div>
<div *ngIf="storageTypeId === 'AzureStorage' || storageTypeId === 'AmazonS3'">
<mat-form-field class="form-field" color="accent" id="form-field-account">
<mat-label>Account</mat-label>
<input [(ngModel)]="account" matInput [placeholder]="'msgedcstorage'">
</mat-form-field>

<mat-form-field class="form-field" color="accent" id="form-field-container">
<mat-label>Container</mat-label>
<input [(ngModel)]="container" matInput [placeholder]="'src-container'">
</mat-form-field>

<mat-form-field class="form-field" color="accent" id="form-field-blobname">
<mat-label>Blob Name</mat-label>
<input [(ngModel)]="blobname" matInput>
</mat-form-field>
</div>
<div *ngIf="storageTypeId === 'HttpData'">
<mat-form-field class="form-field" color="accent" id="form-field-baseUrl">
<mat-label>Base URL</mat-label>
<input [(ngModel)]="baseUrl" matInput>
</mat-form-field>
</div>

<div>
<mat-form-field class="form-field" color="accent" id="form-field-originator">
<mat-label>Originator</mat-label>
<input [(ngModel)]="originator" matInput>
</mat-form-field>

<mat-checkbox [(ngModel)]="claimComplianceProviderCheckboxChecked" disabled>
Compliance Check Passed
</mat-checkbox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mat-dialog-content {
width: 800px;
width: 820px;
}

.form-field {
Expand All @@ -8,7 +8,7 @@ mat-dialog-content {
}

.form-field-full {
width: 780px;
width: 800px;
}

mat-card-actions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { NotificationService } from "../../services/notification.service";
import { HttpClient } from '@angular/common/http';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmationDialogComponent, ConfirmDialogModel } from '../confirmation-dialog/confirmation-dialog.component';
import { MatAutocompleteModule } from '@angular/material/autocomplete';


@Component({
Expand All @@ -22,10 +23,15 @@ export class AssetEditorDialog implements OnInit {
contenttype: string = '';

storageTypeId: string = 'HttpData';
account: string = '';
account: string = 'msgedcstorage';
container: string = 'src-container';
blobname: string = '';

originator: string = 'http://connector-1:8184/protocol';
originatorExamples: string[] = [
'http://connector-1:8184/protocol',
'https://edc-pr.gxfs.gx4fm.org/api/v1/dsp'
];
baseUrl: string = "http://techslides.com/demos/samples/sample.txt";

claimsList: string = "";
Expand Down Expand Up @@ -158,11 +164,11 @@ export class AssetEditorDialog implements OnInit {
"@id": "https://www.gaia-x4plcaad.info/claims/service-access-point/fe9f0d7f-3a80-48ef-9630-a7c9c3c1e78f",
"@type": "gx:ServiceAccessPoint",
"gx:name": {
"@value": "Provider EDC",
"@value": "edc_pr",
"@type": "xsd:string"
},
"gx:host": {
"@value": "edcdb-pr.gxfs.gx4fm.org/",
"@value": "edc-pr.gxfs.gx4fm.org/",
"@type": "xsd:string"
},
"gx:protocol": {
Expand Down Expand Up @@ -446,6 +452,10 @@ export class AssetEditorDialog implements OnInit {
"type": this.storageTypeId,
"name": this.id,
"baseUrl": this.baseUrl,
"account": this.account,
"container": this.container,
"blobname": this.blobname,
"keyName": `${this.account}-key1`
}
};
this.dialogRef.close({assetInput});
Expand Down
2 changes: 2 additions & 0 deletions src/modules/edc-demo/edc-demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {HttpClientModule} from '@angular/common/http';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatInputModule} from '@angular/material/input';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
Expand Down Expand Up @@ -72,6 +73,7 @@ import { ConfirmationDialogComponent } from './components/confirmation-dialog/co
MatListModule,
RouterModule,
MatProgressSpinnerModule,
MatAutocompleteModule,
MatCheckboxModule
],
declarations: [
Expand Down