Skip to content

Commit

Permalink
Merge pull request #2008 from HubSpot/request_id_listing
Browse files Browse the repository at this point in the history
Make the request id global search include all but deleted requests
  • Loading branch information
ssalinas authored Sep 6, 2019
2 parents d20b4e1 + 676b8ee commit b5cafde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,11 @@ public List<SingularityRequestParent> getActiveRequests(
public List<String> getAllRequestIds(
@Parameter(hidden = true) @Auth SingularityUser user,
@Parameter(description = "Fetched a cached version of this data to limit expensive operations") @QueryParam("useWebCache") Boolean useWebCache,
@Parameter(description = "Filter to request ids that match this string (case insensitive)") @QueryParam("requestIdLike") String requestIdLike) {
@Parameter(description = "Filter to request ids that match this string (case insensitive)") @QueryParam("requestIdLike") String requestIdLike,
@Parameter(description = "Filter by request state") @QueryParam("state") Set<RequestState> states) {
List<String> allIds = filterAutorized(Lists.newArrayList(requestManager.getRequests(useWebCache(useWebCache))), SingularityAuthorizationScope.READ, user)
.stream()
.filter((r) -> states == null || states.isEmpty() || states.contains(r.getState()))
.map((r) -> r.getRequest().getId())
.collect(Collectors.toList());
if (requestIdLike == null) {
Expand Down
2 changes: 1 addition & 1 deletion SingularityUI/app/actions/api/requests.es6
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const FetchRequests = buildApiAction(

export const FetchRequestIds = buildApiAction(
'FETCH_REQUESTS',
{url: '/requests/ids/active?useWebCache=true'}
{url: '/requests/ids?useWebCache=true&state=ACTIVE&state=PAUSED&state=SYSTEM_COOLDOWN&state=FINISHED&state=DEPLOYING_TO_UNPAUSE'}
);

export const FetchRequestsInState = buildApiAction(
Expand Down

0 comments on commit b5cafde

Please # to comment.