To reproduce
1) Nav to a DaemonSet's `Edit Yaml` page (ensure that the `annotations` section is collapsed on load of yaml)
2) Edit any of the yaml (for instance add a new property at the top)
3) Try to expand the `annotations` section, which fails and section remains collapsed
Under the hood
- ResourceYaml component automatically (ish) collapsed status, annotations, managedFields resource sections when codemirror emits 'onReady'
- the 'onReady' event emits in many different scenarios, like edit
- repeatedly handling the onReady event meant codemirror's `foldCode` called often on the same lines
- this somehow broke how folded lines are tracked. as far as i can tell it's something to do with tracking gutter and marked lines
- if no edits are made collapsing and uncollapsing annotations is perfectly fine
- if we don't automatically collapse sections then collapsing and uncollapsing sections after editing works fine
- parentOverrides now part of type-map/configureType to set and type-map/optionsFor to get.
- Remove asyncData from resourceDetail flow
- Rehydrate fetch() data
To support receiver types I made it so that we can spoof types which
have any form we specify here in the UI. It will be useful for alertmanager
Routes and I think it could also be useful for things like OPA constraints
and workloads if we wish to update those.
rancher/dashboard#1238
Refactor `canCreate` to `validationPassed` to make variable intention clear.
Refactor markup so subtype selection is not limited to form only view.
Refactor to offer Yaml preview on edit.
This fixes runtime and lint warnings. It also makes the linter
treat warnings as errors now so we'll stop checking in code that has
warnings.
If you want to avoid prs with warnings consider adding a
'yarn lint' or 'yarn build' to .git/hooks/pre-push.
We needed a way to support arbitrarily complex parameters in both
type and nesting level. As a temporary solution I enabled the user
to toggle between a key value component and a yaml editor.
To enable this I refactored ResourceYaml into a composable YamlEditor
component that can be used elsewhere.
rancher/dashboard#388rancher/dashboard#380
Cloning didn't provide the create or preview buttons and when displayed attempted to update a resource instead of create a
new one.
This will add the buttons and will allow the new resource to be created.
rancher/dashboard#374
This implementst the view, create and edit pages for the
gatekeeper constraints. The constraint templates weren't
touched since we intend to only use the yaml editor.
rancher/dashboard#307