feat(ui): 대시보드 페이지당 저장소 10개로 조정
PAGE_SIZE 20 → 10. 한 화면에 부담 없이 보이도록. 페이저는 기존대로 동적 계산(ceil(total/PAGE_SIZE)). 테스트도 10/페이지 기준으로 갱신. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ from ..pulp_client import PulpClient
|
|||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
PAGE_SIZE = 20
|
PAGE_SIZE = 10
|
||||||
|
|
||||||
|
|
||||||
def _load_repos(
|
def _load_repos(
|
||||||
|
|||||||
@@ -133,10 +133,11 @@ def test_repos_table_paginates():
|
|||||||
page1 = client.get(
|
page1 = client.get(
|
||||||
"/repos/table", params={"sort": "name", "dir": "asc", "page": 1}
|
"/repos/table", params={"sort": "name", "dir": "asc", "page": 1}
|
||||||
).text
|
).text
|
||||||
page2 = client.get(
|
page3 = client.get(
|
||||||
"/repos/table", params={"sort": "name", "dir": "asc", "page": 2}
|
"/repos/table", params={"sort": "name", "dir": "asc", "page": 3}
|
||||||
).text
|
).text
|
||||||
assert "repo-01" in page1 and "repo-20" in page1
|
# PAGE_SIZE=10 → 25개는 3페이지 (10/10/5)
|
||||||
assert "repo-21" not in page1
|
assert "repo-01" in page1 and "repo-10" in page1
|
||||||
assert "repo-21" in page2 and "repo-25" in page2
|
assert "repo-11" not in page1
|
||||||
assert "1 / 2" in page1
|
assert "repo-21" in page3 and "repo-25" in page3
|
||||||
|
assert "1 / 3" in page1
|
||||||
|
|||||||
Reference in New Issue
Block a user