Skip to content

Commit

Permalink
handle loading schema for sdl builder
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Oct 6, 2023
1 parent ebeb33a commit aa3877e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deploy-web/src/components/sdl/HttpOptionsFormControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const HttpOptionsFormControl: React.FunctionComponent<Props> = ({ control
</Box>
</Box>

{currentService.expose[exposeIndex].hasCustomHttpOptions && (
{currentService.expose[exposeIndex]?.hasCustomHttpOptions && (
<>
<Controller
control={control}
Expand Down
28 changes: 19 additions & 9 deletions deploy-web/src/components/sdl/SimpleServiceFormControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useTheme } from "@mui/material/styles";
import {
Box,
Checkbox,
CircularProgress,
Collapse,
FormControl,
FormHelperText,
Expand Down Expand Up @@ -522,15 +523,24 @@ export const SimpleServiceFormControl: React.FunctionComponent<Props> = ({
</Box>

<Box sx={{ marginTop: "1rem" }}>
<FormSelect
control={control}
label="GPU models"
optionName="hardware-gpu-model"
name={`services.${serviceIndex}.profile.gpuModels`}
providerAttributesSchema={providerAttributesSchema}
required={false}
multiple
/>
{providerAttributesSchema ? (
<FormSelect
control={control}
label="GPU models"
optionName="hardware-gpu-model"
name={`services.${serviceIndex}.profile.gpuModels`}
providerAttributesSchema={providerAttributesSchema}
required={false}
multiple
/>
) : (
<Box sx={{ display: "flex", alignItems: "center" }}>
<CircularProgress size="1rem" color="secondary" />
<Typography color="textSecondary" variant="caption" sx={{ marginLeft: ".5rem" }}>
Loading GPU models...
</Typography>
</Box>
)}
</Box>
</div>
)}
Expand Down

0 comments on commit aa3877e

Please sign in to comment.