Skip to content
Snippets Groups Projects
Commit 4e43b9c8 authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

Added the ability to send a curator capability request on the home page

parent 5fd2f921
No related branches found
No related tags found
2 merge requests!1605Merge 2.8.2.3 work to main,!1493WS-1893 curator workflow
......@@ -143,3 +143,71 @@
</div>
</div>
</div>
<div class="container border rounded py-3 my-3">
<h4>Curator</h4>
<div class="row p-3 mt-4">
<div class="col-6">
<div class="md-form">
<label for="curSplInput" class="">Science Product</label>
<input type="text" id="curSplInput" class="form-control"
(change)="setProductLocator($event.target.value)"/>
</div>
</div>
<div class="col-6">
<div class="md-form">
<label for="curDataInput" class="">Data Location (Optional)</label>
<input type="text" id="curDataInput" class="form-control"
(change)="setDataLocation($event.target.value)"/>
</div>
</div>
<div class="col-2">
<div class="md-form">
<label for="curTypeInput" class="">Product Type</label>
<input type="text" id="curTypeInput" class="form-control"
(change)="setProductType($event.target.value)"/>
</div>
</div>
<div class="col-2">
<div class="md-form">
<label for="curTelescopeInput" class="">Telescope</label>
<input type="text" id="curTelescopeInput" class="form-control"
(change)="setTelescope($event.target.value)"/>
</div>
</div>
<div class="col-2">
<div class="md-form">
<label for="curProjectInput" class="">Project Code</label>
<input type="text" id="curProjectInput" class="form-control"
(change)="setProjectCode($event.target.value)"/>
</div>
</div>
<div class="col-3">
<div class="md-form">
<label for="curTargetInput" class="">Target List (Optional)</label>
<input type="text" id="curTargetInput" class="form-control"
(change)="setTargetList($event.target.value)"/>
</div>
</div>
<div class="col-3">
<div class="md-form">
<label for="curUserEmail" class="">Email Address</label>
<input type="text" id="curUserEmail" class="form-control"
[value]="userEmail" (change)="setUserEmail($event.target.value)"/>
</div>
</div>
</div>
<div id="full-curator-button-container" class="d-flex justify-content-left py-2">
<div class="d-flex px-2">
<button type="button" class="btn btn-lg btn-primary" id="full-curator-submit"
(click)="LaunchCuratorCapabilityOnClick('full')">
Launch full curation
</button>
</div>
<div id="partial-curator-button-container" class="d-flex px-2">
<button type="button" class="btn btn-lg btn-info" id="partial-curator-submit"
(click)="LaunchCuratorCapabilityOnClick('partial')">
Launch partial curation
</button>
</div>
</div>
</div>
......@@ -34,6 +34,11 @@ export class WsHomeComponent implements OnInit {
public inputFileList: FileList;
public cmsPath: string;
public sdmId: string;
public dataLocation: string;
public productType: string;
public telescope: string;
public projectCode: string;
public targetList: string;
constructor(
private capabilityLauncher: CapabilityLauncherService,
......@@ -117,6 +122,30 @@ export class WsHomeComponent implements OnInit {
});
}
/**
* OnClick method that creates a capability request for a curator capability and submits it with the parameters:
* - Curator type (full or partial)
* - EB Product Locator
* - Data location path
* - Product type
* - Target list
* - Telescope
* - Project code
* - User email
*/
LaunchCuratorCapabilityOnClick(curatorType: string): void {
this.launchCapability('curator', {
curator_type: curatorType,
product_locator: this.productLocator,
data_location: this.dataLocation,
product_type: this.productType,
target_list: this.targetList,
telescope: this.telescope,
project_code: this.projectCode,
user_email: this.userEmail,
});
}
/**
* method that sets the user input Science Product Locator for the download capability
* @param spl the Science Product Locator to download
......@@ -165,6 +194,46 @@ export class WsHomeComponent implements OnInit {
this.sdmId = id;
}
/**
* Sets the data location for curator
* @param path Data location path for curator
*/
setDataLocation(path: string): void {
this.dataLocation = path;
}
/**
* Sets the product type for curator
* @param type Product type for curator
*/
setProductType(type: string): void {
this.productType = type;
}
/**
* Sets the telescope for curator
* @param telescope Telescope for curator
*/
setTelescope(telescope: string): void {
this.telescope = telescope;
}
/**
* Sets the project code for curator
* @param projectCode Project code for curator
*/
setProjectCode(projectCode: string): void {
this.projectCode = projectCode;
}
/**
* Sets the target list for curator
* @param targetList Target list for curator
*/
setTargetList(targetList: string): void {
this.targetList = targetList;
}
/**
* 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