diff --git a/apps/web/src/app/workspaces/services/capability-launcher.service.ts b/apps/web/src/app/workspaces/services/capability-launcher.service.ts index a50ef7c3856c55097932c6819fac49edb951ec0e..4b47559c65b1e66e4b93ff3763931a9b1de0354e 100644 --- a/apps/web/src/app/workspaces/services/capability-launcher.service.ts +++ b/apps/web/src/app/workspaces/services/capability-launcher.service.ts @@ -20,16 +20,14 @@ export class CapabilityLauncherService { */ createRequest( capabilityName: string, - parameters: string + parameters: any ): Observable<CapabilityRequest> { const url = environment.workspacesUrl + this.endpoint + capabilityName + '/request/create'; - const requestParams = JSON.stringify({ - parameters, - }); + const requestParams = JSON.stringify({'parameters': parameters}); return this.httpClient.post<CapabilityRequest>(url, requestParams); } diff --git a/apps/web/src/app/workspaces/workspaces.component.html b/apps/web/src/app/workspaces/workspaces.component.html index 2179fa900a7d0c18c5c3a6399091244daa6e75f9..9a20be8a2eec4a181402ec24e3009d75b5f70769 100644 --- a/apps/web/src/app/workspaces/workspaces.component.html +++ b/apps/web/src/app/workspaces/workspaces.component.html @@ -10,7 +10,7 @@ <div class="md-form"> <label for="splInput" class="">Science Product</label> - <input type="text" id="splInput" [value]="splInput" (change)="setSPLInput($event.target.value)" class="form-control"> + <input type="text" id="splInput" [value]="productLocator" (change)="setProductLocator($event.target.value)" class="form-control" placeholder="e.g. uid://evla/execblock/27561b56-4c6a-4614-bc26-67e436b5e92c"> </div> <br/> diff --git a/apps/web/src/app/workspaces/workspaces.component.ts b/apps/web/src/app/workspaces/workspaces.component.ts index f7be9e39960ca609bc5e68f44af6464e10cab3d9..99bc7cbb55e9370e910571d7f668a807fb194bd1 100644 --- a/apps/web/src/app/workspaces/workspaces.component.ts +++ b/apps/web/src/app/workspaces/workspaces.component.ts @@ -13,11 +13,12 @@ export class WorkspacesComponent implements OnInit { public capabilityRequests: Array<CapabilityRequest> = []; public capabilityExecutions: Array<CapabilityExecution> = []; - public splInput: string; + public productLocator: string; public userEmail: string; constructor(private capabilityLauncher: CapabilityLauncherService) { - this.splInput = null; + // this is the famous 394 MB 13B-014 execblock, a useful smallish test + this.productLocator = "uid://evla/execblock/27561b56-4c6a-4614-bc26-67e436b5e92c"; this.userEmail = null; } @@ -36,8 +37,7 @@ export class WorkspacesComponent implements OnInit { downloadButtonOnClick(): void { this.launchCapability( 'test_download', - this.splInput, - this.userEmail + {'product_locator': this.productLocator, 'user_email': this.userEmail} ); } @@ -45,8 +45,8 @@ export class WorkspacesComponent implements OnInit { * method that sets the user input Science Product Locator for the download capability * @param spl the Science Product Locator to download */ - setSPLInput(spl: string){ - this.splInput = spl; + setProductLocator(spl: string){ + this.productLocator = spl; } /** @@ -63,7 +63,7 @@ export class WorkspacesComponent implements OnInit { * @param parameters Parameters of capability request * @param email User email for notifications (Optional) */ - launchCapability(capabilityName: string, parameters: string, email?: string): void { + launchCapability(capabilityName: string, parameters: any): void { // Create capability request this.capabilityLauncher.createRequest(capabilityName, parameters).subscribe( (requestResponse) => {