Skip to content

Commit

Permalink
feat(task list): increased default size to 150 from 10
Browse files Browse the repository at this point in the history
closes #97
  • Loading branch information
christopherpickering committed Oct 26, 2022
1 parent 9023efb commit 69e1e1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/web/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def task_list(my_type: str) -> Response:
def project_all_tasks(project_id: int) -> Response:
"""Build json dataset for ajax tables of tasks for a project."""
page = request.args.get("p", default=1, type=int)

page_size = 150
page -= 1

cols = {
Expand Down Expand Up @@ -804,11 +804,11 @@ def project_all_tasks(project_id: int) -> Response:

me.append({"total": str(tasks.count() or 0)}) # runs.total
me.append({"page": str(page)}) # page
me.append({"page_size": str(10)})
me.append({"page_size": str(page_size)})
me.append({"sort": sort}) # page
me.append({"empty_msg": "No tasks."})

for task in tasks.limit(10).offset(page * 10).all():
for task in tasks.limit(page_size).offset(page * page_size).all():
task = dict(zip(cols.keys(), task))

if task["Enabled"] != 1:
Expand Down

0 comments on commit 69e1e1e

Please sign in to comment.