diff --git a/apps/web/src/app/workspaces/workspaces.component.html b/apps/web/src/app/workspaces/workspaces.component.html index efb65dc24bb1bad64886fd84dfde3d3af922d84d..acdad6e686d3973bd8a8279c2b992c7e0779dd79 100644 --- a/apps/web/src/app/workspaces/workspaces.component.html +++ b/apps/web/src/app/workspaces/workspaces.component.html @@ -72,3 +72,37 @@ </div> </div> </div> +<div class="container-fluid py-3"> + <div class="row p-3 mt-4"> + <div class="col-4"> + <div class="md-form"> + <label for="cmsPathInput" class="">CMS Path</label> + <input + type="text" + id="cmsPathInput" + (change)="setCmsPath($event.target.value)" + class="form-control" + /> + </div> + </div> + <div class="col-3"> + <div class="md-form"> + <label for="sdmId" class="">SDM ID</label> + <input + type="text" + id="sdmIdInput" + (change)="setSdmId($event.target.value)" + class="form-control" + /> + </div> + </div> + <div class="col-3 mb-0 align-self-md-end"> + <button + class="btn btn-lg btn-info" + id="cms-imaging-submit" + (click)="standardLaunchCapabilityOnClick('std_cms_imaging')"> + <span class="fas fa-cog"></span><span class="pl-2">Create Standard Imaging Request</span> + </button> + </div> + </div> +</div> diff --git a/apps/web/src/app/workspaces/workspaces.component.ts b/apps/web/src/app/workspaces/workspaces.component.ts index 9e7bc592c698a313e01ce06b22cda30a3b4f78b1..0e3afc76c140fb9291d7b70999088d76332b73a0 100644 --- a/apps/web/src/app/workspaces/workspaces.component.ts +++ b/apps/web/src/app/workspaces/workspaces.component.ts @@ -15,6 +15,8 @@ export class WorkspacesComponent implements OnInit { public productLocator: string; public userEmail: string; public inputFileList: FileList; + public cmsPath: string; + public sdmId: string; constructor( private capabilityLauncher: CapabilityLauncherService, @@ -38,12 +40,17 @@ export class WorkspacesComponent implements OnInit { * OnClick method that creates a capability request a given capability and submits it with the standard parameters: * - Product locator * - User email + * - CMS Path + * - SDM ID * FIXME: Remove check for calibration once it is implemented */ standardLaunchCapabilityOnClick(capabilityName: string): void { + if (capabilityName == "std_cms_imaging") { this.productLocator = undefined; } this.launchCapability(capabilityName, { product_locator: this.productLocator, user_email: this.userEmail, + cms_path: this.cmsPath, + sdmId: this.sdmId, }); } @@ -71,6 +78,22 @@ export class WorkspacesComponent implements OnInit { this.inputFileList = inputFileList; } + /** + * method to set the CMS Path for Standard Imaging + * @param path CMS path for imaging + */ + setCmsPath(path: string): void { + this.cmsPath = path; + } + + /** + * method to set the SDM ID for Standard Imaging + * @param path SDM ID for imaging + */ + setSdmId(id: string): void { + this.sdmId = id; + } + /** * Method that uses the capabilityLauncher service to launch a capability * @param capabilityName Name of capability