Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the request id global search include all but deleted requests #2008

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,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