Skip to content

feat: add rich parameters #4311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show parameters in the UI
  • Loading branch information
kylecarbs committed Oct 3, 2022
commit b9dcfc3a657e61e19d3628e579c087bd81d88f5d
2 changes: 1 addition & 1 deletion site/src/components/UserAutocomplete/UserAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({

const handleFilterChange = debounce((event: ChangeEvent<HTMLInputElement>) => {
sendSearch("SEARCH", { query: event.target.value })
}, 1000)
}, 250)

return (
<Autocomplete
Expand Down
13 changes: 5 additions & 8 deletions site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
props,
) => {
const { t } = useTranslation("createWorkspacePage")

const [deprecatedParameterValues, setDeprecatedParameterValues] = useState<
Record<string, string>
>({})
Expand Down Expand Up @@ -139,7 +138,7 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
/>

{props.loadingTemplateSchema && <Loader />}
{props.selectedTemplate && props.templateSchema && (
{props.selectedTemplate && props.templateSchema && props.templateParameters && (
<>
<TextField
{...getFieldHelpers("name")}
Expand Down Expand Up @@ -179,6 +178,10 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
</Stack>
)}

{props.templateParameters.map((parameter) => (
<WorkspaceParameter templateParameter={parameter} key={parameter.name} />
))}

{props.workspaceQuota && (
<WorkspaceQuota
quota={props.workspaceQuota}
Expand All @@ -195,12 +198,6 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
/>
</>
)}

{props.selectedTemplate &&
props.templateParameters &&
props.templateParameters.map((parameter) => (
<WorkspaceParameter templateParameter={parameter} key={parameter.name} />
))}
</Stack>
</form>
</FullPageForm>
Expand Down