-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description: This PR adds support for `run_sh` and `exec` operations in the emui enclave builder. The allows users to complete the 'getting started with starlark' flow. ## Is this change user facing? YES (experimental flag) ## References (if applicable): * https://docs.kurtosis.com/api-reference/starlark-reference/plan
- Loading branch information
Showing
18 changed files
with
1,159 additions
and
639 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
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
43 changes: 43 additions & 0 deletions
43
enclave-manager/web/packages/app/src/emui/enclaves/components/form/CodeEditorInput.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,43 @@ | ||
import { CodeEditor } from "kurtosis-ui-components"; | ||
import { Controller } from "react-hook-form"; | ||
import { FieldPath, FieldValues } from "react-hook-form/dist/types"; | ||
import { ControllerRenderProps } from "react-hook-form/dist/types/controller"; | ||
|
||
import { KurtosisFormInputProps } from "./types"; | ||
|
||
type CodeEditorInputProps<DataModel extends object> = KurtosisFormInputProps<DataModel> & { | ||
fileName: string; | ||
}; | ||
|
||
export const CodeEditorInput = <DataModel extends object>(props: CodeEditorInputProps<DataModel>) => { | ||
return ( | ||
<Controller | ||
render={({ field }) => <CodeEditorInputImpl field={field} fileName={props.fileName} />} | ||
name={props.name} | ||
defaultValue={"" as any} | ||
rules={{ | ||
required: props.isRequired, | ||
validate: props.validate, | ||
}} | ||
disabled={props.disabled} | ||
/> | ||
); | ||
}; | ||
|
||
type CodeEditorImplProps< | ||
TFieldValues extends FieldValues = FieldValues, | ||
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, | ||
> = { | ||
field: ControllerRenderProps<TFieldValues, TName>; | ||
fileName: string; | ||
}; | ||
|
||
const CodeEditorInputImpl = < | ||
TFieldValues extends FieldValues = FieldValues, | ||
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, | ||
>({ | ||
field, | ||
fileName, | ||
}: CodeEditorImplProps<TFieldValues, TName>) => { | ||
return <CodeEditor text={field.value} onTextChange={field.onChange} fileName={fileName} />; | ||
}; |
4 changes: 2 additions & 2 deletions
4
enclave-manager/web/packages/app/src/emui/enclaves/components/form/ListArgumentInput.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
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
Oops, something went wrong.