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

Logic for execution status filtering

parent c5070ba4
No related branches found
No related tags found
1 merge request!1290WS-1568 Execution status filtering
......@@ -336,7 +336,11 @@ export class ActiveCapabilityRequestsComponent implements OnInit, OnDestroy {
}
public filterFrontendFilters(activeRequests: any): any {
if (this.filters && (this.filters.hasOwnProperty("is_srdp") || this.filters.hasOwnProperty("obs_min") || this.filters.hasOwnProperty("obs_max"))) {
if (this.filters && (
this.filters.hasOwnProperty("is_srdp") ||
this.filters.hasOwnProperty("obs_min") ||
this.filters.hasOwnProperty("obs_max") ||
this.filters.hasOwnProperty("exec_status"))) {
// SRDP filter
if (this.filters.hasOwnProperty("is_srdp")) {
return activeRequests.filter(r => {
......@@ -371,6 +375,12 @@ export class ActiveCapabilityRequestsComponent implements OnInit, OnDestroy {
});
return filteredDates;
}
// Execution Status filter
else if (this.filters.hasOwnProperty("exec_status")) {
return activeRequests.filter(r => {
return this.filters.exec_status.includes(this.getExecutionStatusName(r));
});
}
} else {
// return unfiltered activeRequests
return activeRequests
......
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