Skip to content
Snippets Groups Projects
Commit bcf93914 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

ui work for displaying paused calibrations on calibratables page

parent 4f5286be
No related branches found
Tags 1.5.0.1 end-of-sprint-21
1 merge request!557WS-699: ui work for displaying paused calibrations on calibratables page
Pipeline #3294 passed
......@@ -19,6 +19,7 @@
<thead class="thead-light">
<tr>
<th>Request</th>
<th>Execution Status</th>
<th>Fileset ID</th>
<th>Bands</th>
<th>Array Configuration</th>
......@@ -39,6 +40,7 @@
<app-status-badge [capabilityRequest]="request"></app-status-badge>
</button>
</td>
<td>{{ request.current_execution ? request.current_execution.state : "" }}</td>
<td>{{ getMetadata(request).fileset_id }}</td>
<td>{{ getMetadata(request).bands }}</td>
<td>{{ getMetadata(request).array_config }}</td>
......
......@@ -30,12 +30,11 @@ export class ListOfCalibratablesComponent implements OnInit {
private dataRetriever: DataRetrieverService,
) {
this.pollingDataUpdaterService
.getDataPoller$(this.dataRetriever.getCapabilityUrl(this.stdCalibrationCapability) )
.getDataPoller$(this.dataRetriever.getCapabilityUrl(this.stdCalibrationCapability))
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe(this.capabilityObserver);
this.pollingDataUpdaterService
.getDataPoller$(this.capabilityRequestService
.getCreatedCapabilityRequestsUrl(this.stdCalibrationCapability))
.getDataPoller$(this.capabilityRequestService.getActiveCapabilityRequestsUrl(this.stdCalibrationCapability))
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe(this.createdRequestsObserver);
}
......@@ -44,7 +43,7 @@ export class ListOfCalibratablesComponent implements OnInit {
private createdRequestsObserver = {
next: (request) => {
this.calibratableRequests = request.created_requests;
this.calibratableRequests = request.active_requests;
},
error: (error) =>
console.error("Error when retrieving list of created capability requests:" + error),
......
......@@ -44,6 +44,14 @@ export class CapabilityRequestService {
return this.httpClient.get<JsonObject>(url);
}
/**
* Gets URL to retrieve a list of active capability requests for a given capability
* @param capabilityName The name of the capability
*/
public getActiveCapabilityRequestsUrl(capabilityName: string): string {
return `capability/${capabilityName}/request`;
}
/**
* Gets JSON representation of a list of active capability requests for a given capability
* @param capabilityName The name of the 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