Skip to content
Snippets Groups Projects
Commit 3dd2c25e authored by Andrew Kapuscinski's avatar Andrew Kapuscinski Committed by Nathan Hertz
Browse files

added button to /workspaces page for creating a std imaging capability request

parent 142bb190
No related branches found
No related tags found
1 merge request!330added button to /workspaces page for creating a std imaging capability request
......@@ -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>
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment