Skip to content

Commit

Permalink
HARMONY-1493: Let the user choose their own page size
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyinverso committed Jul 3, 2023
1 parent a4183e0 commit 67b2810
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/frontends/workflow-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export async function getJob(
try {
const isAdmin = await isAdminUser(req);
const job = await getJobIfAllowed(jobID, req.user, isAdmin, req.accessToken, true);
const { page, limit } = getPagingParams(req, 1000);
const { page, limit } = getPagingParams(req, 100);
const requestQuery = keysToLowerCase(req.query);
const fromDateTime = requestQuery.fromdatetime;
const toDateTime = requestQuery.todatetime;
Expand Down Expand Up @@ -452,7 +452,7 @@ export async function getWorkItemsTable(
res.status(204).json({ status: job.status });
return;
}
const { page, limit } = getPagingParams(req, env.defaultJobListPageSize);
const { page, limit } = getPagingParams(req, 100);
const requestQuery = keysToLowerCase(req.query);
const { tableQuery } = parseQuery(requestQuery, WorkItemStatus);
const itemQuery = tableQueryToWorkItemQuery(tableQuery, jobID);
Expand Down
5 changes: 4 additions & 1 deletion app/views/workflow-ui/job/index.mustache.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
<form id="work-items-query-form" action="./{{job.jobID}}" method="get" class="sticky-top pt-2">
<input type="hidden" name="jobID" value="{{job.jobID}}" />
<input type="hidden" name="page" value="{{page}}" />
<input type="hidden" name="limit" value="{{limit}}" />
{{> workflow-ui/date-time-picker}}
<input name="tableFilter" class="form-control table-filter mb-2" placeholder="add a filter"
data-value="{{selectedFilters}}" data-is-admin-route="{{isAdminRoute}}">
Expand All @@ -70,6 +69,10 @@
negate statuses
</label>
</div>
<div class="input-group mt-2">
<span class="input-group-text">limit</span>
<input name="limit" type="number" class="form-control" value="{{limit}}">
</div>
<button type="submit" class="btn btn-primary btn-sm mt-3"><i class="bi bi-filter-circle"></i>
apply</button>
</form>
Expand Down
5 changes: 4 additions & 1 deletion app/views/workflow-ui/jobs/index.mustache.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<div class="col-2">
<form id="jobs-query-form" action="./workflow-ui" method="get" class="sticky-top pt-2">
<input type="hidden" name="page" value="{{page}}" />
<input type="hidden" name="limit" value="{{limit}}" />
{{> workflow-ui/date-time-picker}}
<input id="sort-granules" type="hidden" name="sortGranules" value="{{sortGranules}}" />
<input name="tableFilter" class="table-filter form-control mb-2" placeholder="add a filter"
Expand All @@ -72,6 +71,10 @@
</label>
</div>
{{/isAdminRoute}}
<div class="input-group mt-2">
<span class="input-group-text">limit</span>
<input name="limit" type="number" class="form-control" value="{{limit}}">
</div>
<button type="submit" class="btn btn-primary btn-sm mt-3"><i class="bi bi-filter-circle"></i> apply</button>
</form>
</div>
Expand Down

0 comments on commit 67b2810

Please sign in to comment.