From afbcbe9200ef06e486bc3939153ac523ab33ded7 Mon Sep 17 00:00:00 2001 From: Jaroslaw Weber Date: Tue, 13 Aug 2024 23:25:52 +0900 Subject: [PATCH 1/2] adjust max jobs per page --- packages/ui/src/components/SettingsModal/SettingsModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/SettingsModal/SettingsModal.tsx b/packages/ui/src/components/SettingsModal/SettingsModal.tsx index d8dcc38a..c2ba9488 100644 --- a/packages/ui/src/components/SettingsModal/SettingsModal.tsx +++ b/packages/ui/src/components/SettingsModal/SettingsModal.tsx @@ -79,8 +79,8 @@ export const SettingsModal = ({ open, onClose }: SettingsModalProps) => { value={jobsPerPage} type="number" min="1" - max="50" - maxLength={2} + max="1000" + maxLength={4} onChange={(event) => { const jobsPerPage = +event.target.value; setSettings({ jobsPerPage: Math.min(jobsPerPage, 50) }); From 6321cfb623c9a378ee696b26b82eced1e5df0ad2 Mon Sep 17 00:00:00 2001 From: Jaroslaw Weber Date: Wed, 14 Aug 2024 00:13:18 +0900 Subject: [PATCH 2/2] fixes --- packages/ui/src/components/SettingsModal/SettingsModal.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/SettingsModal/SettingsModal.tsx b/packages/ui/src/components/SettingsModal/SettingsModal.tsx index c2ba9488..dbbd15b2 100644 --- a/packages/ui/src/components/SettingsModal/SettingsModal.tsx +++ b/packages/ui/src/components/SettingsModal/SettingsModal.tsx @@ -16,6 +16,7 @@ export interface SettingsModalProps { const pollingIntervals = [-1, 3, 5, 10, 20, 60, 60 * 5, 60 * 15]; const languages = ['en-US', 'fr-FR', 'pt-BR', 'zh-CN']; +const maxJobsPerPage = 300 export const SettingsModal = ({ open, onClose }: SettingsModalProps) => { const { @@ -79,11 +80,11 @@ export const SettingsModal = ({ open, onClose }: SettingsModalProps) => { value={jobsPerPage} type="number" min="1" - max="1000" - maxLength={4} + max={maxJobsPerPage} + maxLength={3} onChange={(event) => { const jobsPerPage = +event.target.value; - setSettings({ jobsPerPage: Math.min(jobsPerPage, 50) }); + setSettings({ jobsPerPage: Math.min(jobsPerPage, maxJobsPerPage) }); }} />