Commit Graph

37 Commits

Author SHA1 Message Date
Francesco Torchia b1bb44d421
[2.12.3] Fleet allow SSH url with numeric ports
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-09-10 18:39:54 +02:00
Evgeniya Vashkevich 89355f404e
[2.12] Added input validation to s3 endpoint field in cluster (#15187) 2025-09-04 17:26:03 -07:00
Francesco Torchia 17ae7b2803
[2.12.1] Fleet improve validations
- fix urlRepository validator
- fix ociRegistry validator

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-08-05 12:44:53 +02:00
Alexandre Alves aebde5c25f
Rancher as an OIDC provider (#14475)
* Rancher as an OIDC provider (interface and flow)

---------

Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-26 10:39:26 +01:00
Francesco Torchia 0bdf412259
Fleet add HelmOp chart validation; code clean-up
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-18 11:16:08 +02:00
Francesco Torchia 216cfcd516
Fleet add HelmOps ociRegistry validator
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-18 11:16:03 +02:00
Francesco Torchia 291c292b45
Fleet allow encoded whitespaces in gitRepo url field
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-05-08 12:33:16 +02:00
Giuseppe Leo ac02757be2
Correct default validation value; Add test for default message part (#14303) 2025-05-07 22:42:30 +02:00
Giuseppe Leo b582044047
Investigate using a standard form validation library (#14199)
* Add vee-validate library

* Add validation case for the form

* Add JSDoc for current validator generator

* Add case with existing rules validation

* Add story for nested forms

* Add case for custom component

* Replace list with single value for component validation; Add validation case as real case scenario

* Update validation documentation

* Add Storybook issue note

* Add form for custom component explanation

* Adopt YUP to validate nested forms

* Create custom rule for YUP using existing validations

* Add vertical tab as in Workloadl; Bind tab validation with method

* Add code example for Yup

* Correct nested form markup issues

* Add case with Labeled input using markup

* Add case for nested form components

* Rename files to avoid confusion

* Correct nested definitions for nested components

* Replace inline rule with custom rule

* Simplify documentation

* Fix errors for stories

* Replace Yup with Zod
2025-05-05 16:04:11 +02:00
Cody Jackson 3cbce8f4ac Handle empty registryUrls
Fixes https://github.com/rancher/dashboard/issues/13559
2025-02-28 14:48:51 -07:00
Cody Jackson f08110bdcd Adding the Registries accordion to the imported clusters edit pages
Fixes https://github.com/rancher/dashboard/issues/13063
2025-02-28 11:31:28 -07:00
Francesco Torchia 2ffa22c9c4
Fleet: validate GitRepo Url
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-04 16:34:30 +01:00
Giuseppe Leo 78d3e1ef2a
Crontab @daily marked as invalid in Rancher Cronjobs (#13214)
* Export abstracted chron rule validation and message to match both current architectures

* Add chronSchedule to the parameterized tests; Add @daily case

* Add missing JSDocs for comprension

* Update Cronstrue to 2.53

* Remove unnecessary import

* Fix lint issues

* Add sublabel and chron type with hints

* Add @daily case to the input stories

* Add multiline type story for input

* Added Cron error case

* Add chron tests for input label

* Add periodical case as exceptions

* Linter fix

* Correct unit test definition
2025-01-30 18:49:43 +01:00
Francesco Torchia 2e494c47f9
Merge pull request #12349 from torchiaf/feature/harvester-shell-integration-2
Harvester shell integration - bump chron libraries
2024-11-05 13:04:02 +01:00
Evgeniya Vashkevich 69fa9ec355
Removed repo format validation (#12431) 2024-10-31 10:20:20 +00:00
Evgeniya Vashkevich 885f0a8cde
[FIX] Fixed validation on Gitrepo page (#12386) 2024-10-29 08:02:39 -07:00
Francesco Torchia efb2826120
Add verbose option to cron result
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-10-28 19:14:08 +01: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
Phillip Rak 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07: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