- Hide errors in ResourceYaml and display them only in CruResource component to avoid duplicate
- Stick errors on top of the page
- Filter out duplicate errors
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* add role 'none' to hr elements in TopLevelMenu
* add missing role and label to SideNav
* add aria-label to show/hide button in the Password component
* add role 'none' to hr elements
* add missing alt to user avatar image
Updates the slot syntax to be more consistent with `CruResource.vue`. This should help with accurately rendering slot content when we iterate over component slots.
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
* Correct file naming and small TS issues
Correct TS related issues
* Manual replacement of :is on standard HTML tags
* Add missing required in the code dependencies
* Correct SCSS import
* Correct test file naming
* Correct typo in markup
* Use alias for types import
This replaces the current method of managing the `createNamespace` state with something that will be Vue3 compatible.
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
* resource edit AS yaml
* fix cruresource (yaml from form)
- lazy load the schemaDefinitions when needed, avoids sync all to createYaml before we have an async chance to fetch schemaDefinitions
* Fix questions
- there are only four places we use questions, none of which use schema, this is just to be safe
* cluster scan, plugins/fieldsForDriver, defaultFor, validationErrors
* pathExistsInSchema
- used to optionally show conditions tab/list in resource detail view
- logs of things in ingress list/edit
* createPopulated / defaultFor
defaultFor requires resourceFields, it's only used by createPopulated in one place to support machine configs without components
* wip
* WIP MONITORING.SPOOFED
- these aren't spoofed types, but secondary schemas
- testing fix blocked, primary schema's have resourceFields
* Move steve specific (resourceField) code to steve models
- create models for steve schemas and apply to cluster and management stores
- move resoureField based validationto steve model
- move pathExistsInSchema to steve store getter
- don't fetch schemaDefinitions on start up when saving prefs (not needed and blocking)
* comments / improvements
* (untested) refactoring
* Fix alertmanager definitions, add retry definition fetch
* Fix pathExistsInSchema for path length > 2
* Fix questions that accept schemas
- tested by adding Questions to random page and the node schema
* Fix to saving configmap part 1
- the save works but doesn't show data. the yaml is the same as before. debug info added
* Validation by resourceFields is a norman specific thing, so make it such
* small refactor
* Tidying up
* Remove rebase junk
* fix linting and unit tests
* fix unit tests
* fix linting from fix for test....
* Tidying up, fix alertmanagerconfig
* Remove unit test todos
* add unit tests for resource fields
* sdssdf
* Add unit tests for pathExistsInSchema
* JS --> TS
* Store schemas in local singleton cache to avoid hitting store
* fix minor changes from review
* cruresource changes following review
- improvement - remove spurious canDiff
- createResourceYaml - pass in resource to use instead of calc in code
* WIP changes to parseType
* Fix generic cloud credential and node driver forms
* handle missing reactivity given schema definitions not in store
* fix and add unit tests for `parseType`
* Fix create-yaml test
* Changes following review
- improved comments
- SchemaDefinitionCache is now per store (and is reset as such)
- typeRef now uses parseType
* Fix dep loop by moving route based helps in auth out to utils file
* fix unit tests
* Changes following review
* add retry logic for failing user creation network request
* add failing network request to retry logic + remove commented code
* fix lint issue
* address scenario where global role binding fails and we need to delete the user created to retry
---------
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
There are certain scenarios where we want to apply hooks, but it might not make sense to apply all of them. For instance, we have `_beforeSaveHooks` hooks that we want to apply when the "Edit as YAML" button is clicked on a form, but it doesn't make sense to apply the `save-machine-pools` hook at this point; we are only changing the mode of editing so we should not be saving changes at this point. However, we still would want to apply the `set-registry-config` hook.
Co-authored-by: Richard Cox <richard-cox@users.noreply.github.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
* Added test for preventDefault
* Added test for prevent default event on keypress Enter in CruResource component
* Removed test console log
* Fixed lint
* Added data-testid to form
* Fixed lint
- add the possibility to specify what Scalar Style to use in the yaml blocks ('|' or '>') and what Chomping style ('+' , '-' or empty)
see https://yaml-multiline.info
- set default to style to '|+' (keep all newlines)
- adapt CruResource to get in input the new yaml options
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Add PSA template dropdown to RKE2 cluster editor
* Add tests for RKE2 custom cluster editor to display options for PSA
* Remove TODO and hardcoded value for k8s PSA 1.25+
* Allow CRU editor to have error maps
* Fix linting on destructured arrays for unused values in Workloads erorr map
* Allow to change PSP and reset values accordingly
* Correct banner HTML for reprovisioning
* Replace default term with none in cluster creation policies
* Replace PSA ID with Name for the template in the cluster creation
* Remove extra condition for PSA options
* Add i18n with separated values for RKE default optins
* Restore default option for no PSP template in RKE2
* Prevent ESLint to format generated paths
* Add HTML ESLint Rules
* Format all the Vue HTML templates except Harvester
* Exclude Harvester package from linting HTML, keeping old formatting rules
* Set data test id and allow complex component to have default and inherited values for all the actions
* Create cluster tests with steps; Create cluster E2E test
* Extend command to use selector matchers
* Create test for cluster navigation and deletion
* Extend commands to find by id as in get method
* Extend documentation with guidelines and info about E2E
* Correct cluster delete and details tests to get menu within speciftc cluster row
* Add remaining E2E tests for the cluster
* Add baseUrl to the paths
* Add RKE2 selection on cluster creation for CI
* Add E2E debugging information
* Rename clluster manager E2E for consistency
* Correct data test ID after rebase
* Prevent cluster provider errors if no management parameter is provided
* Prevent accessing objects in mutation if none is provided
* Remove imported cluster sample due discarded logic
* Reset RKE2 switch on cluster creation
* Adjust test naming for cluster manager
* Group tests under scoped cases
- Cancel cross should be a standard colour rather than red
- Ensure CruResource `namespaceKey` works for paths
- align CruResource `namespaceKey` with NameNsDescription `namespaceKey`
- reduce complexity
- This follows on from the conversation in https://github.com/rancher/dashboard/pull/6084