* feat: ui for editing ws schedule
Summary:
This presents a form component and storybook. The UI will be a routed
page and added into the dashboard in a separate PR. It is likely a
XService will be used at the page level to supply errors and actions to
this form.
Impact of Change:
Further progress on #1455
Squashed Commits:
* refactor: add className prop to Stack
combine classes with internal classes and an optional external className
to better control the Stack.
* fix: getFormHelpers helperText
the helperText logic was incorrect, the helperText would only show if not touched.
* Set up table
* Format
* Hook up api and test - bug assigning resources
* Remove debugging code
* Format
* Remove unnecessary cards
* Fix test
* Fix assignment
* Fix tests
* Lint
We noticed that when you download the repo as a ZIP from GitHub, it
places the `README.md` in the root, which causes the relative links to
break.
By moving it to the root, this will fix that issue.
This PR is a squash of refactors and improvements in our Workspace and
WorkspaceSection components. An action prop is added to WorkspaceSection
and along the way, I refactored things that were not meeting conventions
or were hard to read. With this addition, I am further unblocked in
making auto-start/off editable in the UI, as I intend to use the Action
prop to trigger a modal (or routed page view) with the form.
Squashed commits:
* refactor: spaces for readability
It's hard to read HTMl markup without spaces on adjacent nodes
* refactor: props
Our components had unused props and arbitrary ordering.
* Read params from file for template/workspace creation
* Use os.ReadFile
* Refactor reading params into a separate module
* Add comments and unit tests
* Rename variable
* Uncomment and fix unit test
* Fix comment
* Refactor tests
* Fix unit tests for windows
* Fix unit tests for Windows
* Add comments for the hotfix
* added error boundary and error ui components
* add body txt and standardize btn size
* added story
* feat: added error boundary
closes#1013
* committing lockfile
* added email body to help link
* feat(cli): add test for delete
This adds a new test for the `delete` command to ensure it works as
expected when provided the correct args.
* fix(cli): use ExecuteC() to match Cobra
This modifies the `cli.Root().Execute()` to `cli.Root).ExecuteC()` to
match the default behavior of Cobra. We do this so errors will always
print the "run --help" line.
* feat(cli): add WithoutParameters test for delete
This adds a new test to the `delete_test.go` suite to ensure the correct
behavior occurs when `delete` is called without an argument.
* fixup! feat(cli): add WithoutParameters test for delete
* refactor(cli): show --help error message on main
This adds an error message which shows when there is an error with any
commands called to improve the UX.
* fixup! refactor(cli): show --help error message on main
* refactor(cli): handle err with FormatCobraError
This adds a new helper function called `FormatCobraError` to `root.go`
so that we can colorize and add "--help" message to cobra command errors
like calling `delete`.
* refactor(cli): add root_test.go, move delete test
* feat: Expose the values contained in an HCL validation string to the API
This allows the frontend to render inputs displaying these values!
* Update codersdk/parameters.go
Co-authored-by: Cian Johnston <cian@coder.com>
* Call a spade a space
* Fix linting errors with type conversion
Co-authored-by: Cian Johnston <cian@coder.com>
This fixes resources created from Terraform modules not
properly being associated with an agent.
By not using the address, and resource identifiers prefixed
with `module.<name>` would be missed!