Skip to content
Snippets Groups Projects
Commit 453666f3 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski Committed by Daniel Lyons
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
Pipeline #2158 passed with warnings
<div class="container-fluid py-3">
<div class="container border border-dark rounded py-3 mt-2">
<h4>Null Capability</h4>
<div id="button-container" class="d-flex justify-content-left py-2">
<div class="d-flex px-2">
<button
type="button"
id="launchNullCapabilityBtn"
class="btn btn-secondary btn-lg"
(click)="nullButtonOnClick()"
>
Launch null capability
</button>
</div>
</div>
</div>
<div class="container border border-dark rounded py-3 mt-2">
<h4>Download or Calibration</h4>
<div class="row p-3">
<div class="col-6">
<div class="md-form">
......@@ -39,17 +55,7 @@
</div>
</div>
</div>
<div id="button-container" class="d-flex justify-content-center py-2">
<div class="d-flex px-2">
<button
type="button"
id="launchNullCapabilityBtn"
class="btn btn-secondary btn-lg"
(click)="nullButtonOnClick()"
>
Launch null capability
</button>
</div>
<div id="button-container" class="d-flex justify-content-left py-2">
<div class="d-flex px-2">
<button
type="button"
......@@ -72,3 +78,52 @@
</div>
</div>
</div>
<div class="container border rounded border-dark py-3 my-2">
<h4>Standard CMS Imaging</h4>
<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">
<div class="md-form">
<label for="userEmail" class="">Email Address</label>
<input
type="text"
id="userEmail"
[value]="userEmail"
(change)="setUserEmail($event.target.value)"
class="form-control"
/>
</div>
</div>
</div>
<div id="button-container" class="d-flex justify-content-left py-2">
<div class="d-flex px-2">
<button
class="btn btn-lg btn-warning"
id="cms-imaging-submit"
(click)="LaunchImagingCapabilityOnClick('std_cms_imaging')">
Launch standard CMS imaging
</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,
......@@ -41,12 +43,27 @@ export class WorkspacesComponent implements OnInit {
* 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,
});
}
/**
* OnClick method that creates a capability request for a imaging capability and submits it with the CMS imaging parameters:
* - User email
* - CMS Path
* - SDM ID
*/
LaunchImagingCapabilityOnClick(capabilityName: string): void {
this.launchCapability(capabilityName, {
user_email: this.userEmail,
cms_path: this.cmsPath,
sdmId: this.sdmId,
});
}
/**
* method that sets the user input Science Product Locator for the download capability
* @param spl the Science Product Locator to download
......@@ -71,6 +88,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