Commit Graph

20 Commits

Author SHA1 Message Date
Evgeniya Vashkevich 885f0a8cde
[FIX] Fixed validation on Gitrepo page (#12386) 2024-10-29 08:02:39 -07:00
Evgeniya Vashkevich 47ff3ddac6
[FEAT] Moved driver pages from Ember (#10557)
* [FEAT] Moved driver pages from Ember
2024-03-26 16:33:15 -07:00
momesgin 5919915b29
Validating server url on Setup & Global Settings pages (#9701)
* added more validations for server-url on Setup and Global Settings pages

* handling server-url 'use default value' case

* consistent error messages

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-10-26 11:17:45 -07:00
Sean-McQ 39adb0880a
was incorrectly checking for apiGroups on the missingOneResource error. (#9916) 2023-10-13 15:46:18 -04:00
Sean-McQ 6f0a3d436a
save method in model fixes payload, validator catches the rest (#9758) 2023-09-27 13:40:36 -04:00
Richard Cox 77d65c9c9b Add additional types for extensions, fix other typing errors 2023-07-25 15:51:31 +01:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +02:00
Giuseppe Leo 54b484fce4
Add integer test case for decimal with zero (#8006) 2023-01-24 11:26:43 +01:00
Giuseppe Leo 942c0442b9
Feature/6633 min password again (#7930)
* Change key for min password due inconsistency with the server value

* Allow to edit env var in settings model

* Allow to pass simple validators in the global settings editor

* Add validation for integer values on global settings password

* Add integer validation

* Add simple validators tests

* Allow integer validation to allow strings from inputs

* Simplify function and extend naming for settings rules

* Add further validations for the min password setting

* Replace logic with regular expression
2023-01-23 17:56:55 +01:00
Giuseppe Leo 75c01c7ab7
Validation for the minimum length requirement for user password setting (#6897)
* Convert Rancher settings into Typescript and add interface

* Allow Rancher settings to be validated

* Add Rancher Settings min password length validation

* Replace settings number input with labeled input of type number for validation; Added missing required, focus, locale and labels attributes

* Add min/max/between value/length cases to global validation cases

* Correct validation syntax

* Add tests for the global settings

* Correct naming and assign directly rules to the inputs

* Create initial tests for CreateEditView

* Prevent Settings view to break if no setting is found for given ID

* Add max password length validation

* Add i18n to settings validation

* Add form validation to the CRUD component

* Prevent form to fail for resource types without validation

* Add test for no validation cases

* Remove form validation in favor of local view logic, due complexity issues

* Correct validator linting issue

* Correct i18n; Add types; Correct min/max/between validations i18n and combine the last

* Add translation type

* Correct validation translation types and definitions

* Replace custom validations with predefined rules

* Reintroduce form validation in abstracted configuration to pass settings through

* Add tests for new generic form validations

* Correct between values and length validation

* Split tests to use pre-existing rulesets due complexity and different cases

* Cleanup jsdoc in form validation

* Cleanup form validation mixin

* Add global settings test for generating rules from config

* Replace value.value with value for validating the resource

* Correct validation call and test instantiation

* Add note about value.value exception

* Disable faulty test due lacks of information

* Replace min/max value validation with between

* Add missing type for settings getter

* Move type folder within shell

* Move settings logic from config to utils
2022-11-15 15:32:02 +01:00
Bastian Hofmann 7fab7d7b47
Allow wildcards in ingress hostnames (#7025)
Wildcards are allowed in ingress hostnames since Kubernetes 1.18: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#support-for-hostname-wildcards

Fixes https://github.com/rancher/dashboard/issues/6957

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2022-10-07 08:52:09 +01:00
Sean 75f1e04f83 Fixed issue where willSave() was not detecting if targetPort was number 2022-07-26 17:58:13 -04:00
Sean 21f424814c Resolves issues with ServicePort validation 2022-07-21 14:33:08 -04:00
Sean 41ba49b6c2 Adds in UI-side validation for Ingress Form plus additional fixes.
Fixes #4575 Add in validator injection to form-validation mixin, add in "allTabsExtraContent" slot to "tabbed" for messaging that should span all tabs, Error component optionally displays as banner, InputWithSelect can now show validationMessage on text-box without a label, LabeledSelect can now show tooltip and validationMessage at the same time, Select component can now show validation message, adding and removing rules and rulepaths displays correct content, removing does not reload page (fixes #6319), ingress form shows proper validation messages for the following states: invalid "name" field, invalid request host, invalid rule path, invalid rule target service, invalid rule port, invalid default backend target service, invalid default backend port, either rules or default backend must be present. Ingress form is validated and "Create" button is disabled if payload is not validated as correct.
2022-07-21 13:55:38 -04:00
Nancy Butler ad48587f7d add subdomain validator to prov cluster metadata.name 2022-07-21 08:42:55 -07:00
Sean-McQ 3e07fdee92
Merge pull request #6409 from Sean-McQ/fix/rancher-backup/validation/5903
Fixes #5903
2022-07-20 12:55:24 -04:00
Neil MacDougall c614af2173
Plugins fixes and check GitHub action (#6370)
* Plugins fixes and check GitHub action

* Update check-plugins.yaml

* Update check-plugins.yaml

* Debug script

* Debug script

* Make sure verdaccio check does not fail script

* Allow errors when checking

* Fixes for CI

* Fix directory cleanup

* Debug

* Add yarn install for in-tree check

* Fix lint issues
2022-07-20 13:07:38 +01:00
Sean 1996d53fe0 Fixes #5903
Add in form validation on "name" field when creating and editing backups. Checks if name conforms to dnsLabel and noUpperCase validation.
2022-07-20 06:19:24 -04:00
Sean 1dcb11878e Fix error in dnsChar validation regex. Improve character messaging 2022-07-11 12:09:45 -04:00
Sean ddab180ecc Adds in form validation mixin, error reporting on inputs, a few examples 2022-07-07 13:18:43 -04:00