-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add runtime size configuration feature
- Loading branch information
1 parent
1668d58
commit 6b7c15e
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
frontend/src/components/shared/modals/settings/runtime-size-selector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
interface RuntimeSizeSelectorProps { | ||
isDisabled: boolean; | ||
defaultValue?: number; | ||
} | ||
|
||
export function RuntimeSizeSelector({ isDisabled, defaultValue }: RuntimeSizeSelectorProps) { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div className="flex flex-col gap-2"> | ||
<label htmlFor="runtime-size" className="text-sm font-medium text-gray-700"> | ||
Check failure on line 14 in frontend/src/components/shared/modals/settings/runtime-size-selector.tsx GitHub Actions / Lint frontend
|
||
{t('Runtime Size')} | ||
</label> | ||
<select | ||
id="runtime-size" | ||
name="runtime-size" | ||
className="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md" | ||
defaultValue={defaultValue || 1} | ||
disabled={isDisabled} | ||
> | ||
<option value={1}>{t('1x (2 core, 8G)')}</option> | ||
<option value={2}>{t('2x (4 core, 16G)')}</option> | ||
</select> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters