Commit Graph

100 Commits

Author SHA1 Message Date
codyrancher 361b8969ac
Fixes an issue where workload yaml editors didn't show errors (#15057)
Fixes #15020
2025-08-05 14:23:18 -07:00
Alexandre Alves faa7fe3b60
A11y report fixes (#14530)
* fix item 2: All page content should be contained by landmarks

* fix item 4. Elements must only use permitted ARIA attributes

* fix item 6. ARIA attributes must conform to valid values

* fix bug on item 6. and fix item 7. <ul> and <ol> must only directly contain <li>, <script> or <template> elements

* fix item 8. Interactive controls must not be nested

* fix item 10. ARIA toggle fields must have an accessible name

* fix item 11. autocomplete attribute must be used correctly

* fix item 12. Form elements must have labels

* fix item 14. ARIA input fields must have an accessible name

* fix item 15. Buttons must have discernible text

* fix item 16. Images must have alternative text

* working on item 17

* finish fix item 17. ARIA role should be appropriate for the element

* fix wrong role in hidden inputs

* address pr comments
2025-07-10 10:09:09 +01:00
Cody Jackson b0d4deca70 Adds the new detail page TitleBar, Metadata and ResourceDetailDrawer to all of the resources by default 2025-06-25 08:00:15 -07:00
Phillip Rak 7a4b3930e9 Add an e2e test for adding containers to pods form
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-04-02 10:46:16 -07:00
Phillip Rak ddbaa5d82b Workload Mixin: Remove call to `selectContainer` from `created` hook
0c6eb6473d introduced a change that moved the call to `selectContainer` out `data` and into the `created` hook. Before this change, any modifications made by invoking `selectContainer` would get overwritten by setting container in the data prop. `selectContainer` only needs to be invoked once on first render, and the changed method in `shell/edit/workload/index.vue` satisfies this requirement.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-04-01 15:25:38 -07:00
Alexandre Alves 88cbee575b
fix bug with Unit Input component not updating correctly (#13780)
* test fix

* working on unit tests

* remove console log

* bump shell version

* fix broken unit inputs

* fix unit test
2025-03-18 18:17:29 +00:00
Alexandre Alves 84c234383a
Fix textual descriptions for cluster appearance in multiple places (#13416)
* Fix textual descriptions for cluster appearance in multiple places

* address pr comments

* address pr comments
2025-02-24 09:00:54 +00:00
Francesco Torchia b884de441f
Add second/seconds l10n
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-20 12:14:28 +01:00
ly5156 3ef4c729be chore(workload): disable access to unreturned data attributes in data method 2025-01-07 20:11:28 +08:00
Phillip Rak 0fbbab2f95 Add e2e test for selecting Longhorn CSI Pod storage
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-12-03 12:08:34 -07:00
Phillip Rak badaff88fb Update name for pod storage tab
The `name` prop for tabs assigns an id to a `section` element in the underlying tab. Since ids must be unique in the document, there conflicts can arise when programmatically selecting tabs.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-12-03 12:08:34 -07:00
Phillip Rak 2d531ad4d9 Create methods for getting CSI option labels
Options for CSI can be either a string or an object; objects contain a label property. 

Replace periods with `-` in keys like `driver.longhorn.io` so that the i18n implementation will properly match a translation.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-12-03 12:08:34 -07:00
Phillip Rak 5223af8d0d Clone `defaultContainer` when applying defaults
`defaultContainer` retains its values even after navigating away from the workload create form. This behavior was not observed in Vue2, and it requires further investigation to fully understand.

To address this issue in the short term, using `structuredClone` to create a deep copy of defaultContainer ensures that modifications to the container do not persist after navigating away from the form.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-10-22 14:26:30 -07:00
Nancy f28214f9c6
Vue3 fix workload storage (#12070)
* fix workload storage codemirror not rendering

* workload storage default component  yamleditor instead of codemirror

* test editing projected vols

* add container mount test

* fix lint

* refactor deployment tests to improve retry-ability

* add to workoad storage tests and improve retry
2024-10-03 15:00:34 -07:00
Nancy 5607114e5d
update all instances of LabeledInput using v-model.number to use v-model:value.number (#11902)
* update all instances of LabeledInput using v-model.number

* add probe http headers unit test

* add hookoption test

* remove codemirror focus change
2024-09-19 14:46:37 -07:00
codyrancher 3fde3d5144
Merge pull request #11964 from codyrancher/emits
Enabling `vue/require-explicit-emits` linting rule
2024-09-19 12:31:25 -07:00
Cody Jackson 5052c2a8e8 Enabling `vue/require-explicit-emits` linting rule
https://github.com/rancher/dashboard/issues/11961
2024-09-19 09:58:53 -07:00
Evgeniya Vashkevich 6f0b5935ff
Vue3: Fixed validation errors shown prematurely for Workload and Service forms (#11945) 2024-09-18 14:43:13 -07:00
Richard Cox 6a7253c1ea
Merge pull request #11851 from richard-cox/fix-resource-tab
Remove breaking `template` from Workload Pod Resource tab
2024-09-11 09:22:20 +01:00
Nancy 85c5c28c22
Vue3 fix unit tests (#11776)
* remove $set from AKS validators

* fix cruGKE not rendering

* fix most aks unit tests

* fix crueks and eks config unit tests

* fix eks networking and nodegroup unit tests

* fix gke unit tests

* fix consumption gauge test

* fix namespacefilter tests

* fix command and taints unit tests

* fix questions unit tests

* fix hpa and service unit tests

* fix registryconfigs unit tests

* fix job unit tests

* fix longhorn unit tests

* fix addextensionsrepos unit tests

* fix rke2 basics unit tests

* fix container shell unit tests

* fix last aks pool test

* fix mount tests

* fix namespace and pv unit tests

* fix codemirror unit tests

* clean up aks, boolean, namespacefilter unit tests

* fix namespacefilter test

* remove redundant test case
2024-09-10 08:07:21 -07:00
Richard Cox db8f873d94 Remove breaking `template` from Workload Pod Resource tab 2024-09-06 17:41:58 +01:00
Phillip Rak 78e819da5a Normalize `customVolumeTypes` paths for storage `ButtonDropdown`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-04 08:54:33 -07:00
Phillip Rak 0bf8e53f2d Update volumes in reactive way in Storage
This approach uses the spread operator to create a new array instead of using push. It appears that using push on a nested property of a reactive object was not triggering Vue's reactivity in this instance, while creating a new array does the job.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-04 08:54:33 -07:00
Cody Jackson 8d59cd5914 Skipping all failing unit tests for the Vue3 merge. 2024-08-22 21:12:40 -07:00
Cody Jackson d81bd7d387 Updating all references to has-tooltip to v-popper--has-tooltip to be consistent with our upgraded library 2024-08-22 16:09:55 -07:00
Cody Jackson 381e20ab15 Fixing data binding for image containers in workloads 2024-08-22 16:09:55 -07:00
Phillip Rak e39ce7899f Resolve a batch of unit test failures
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
cnotv 78d70353c5 Unit test: Migrate unit tests with the script 2024-08-22 16:07:03 -07:00
Cody Jackson 909affa02f Replacing $emit('input' with $emit('update:value'
This should've been done in the migration script and will be fixed for the next run.
2024-08-22 16:07:03 -07:00
Cody Jackson d744a0d8b3 Switch out/remove the deprecated createLocalValue for the plugins: [Vuex]
This only addresses the complaints made by the cli when running. There are still more instances of createLocalVue

https://stackoverflow.com/questions/66932839/typeerror-0-testutils-createlocalvue-is-not-a-function
2024-08-22 16:05:36 -07:00
Cody Jackson 9b829c55ea Ran `yarn lint --fix` 2024-08-22 16:05:36 -07:00
Cody Jackson d5ce4fff2e Run the vue3 migration script
Commands run:

➤ yarn migrate
➤ git clean -fdx
➤ nvm use 20
➤ yarn
2024-08-22 16:05:36 -07:00
Cody Jackson f2f014597c Removing prop mutation in v-model usage 2024-08-12 14:47:52 -07:00
Evgeniya Vashkevich 6bd67ba3ff
[INT] Refactored some of the plugins - 3 (#10946)
[INT] Refactored some of the plugins - 3
2024-05-08 15:10:27 -07:00
Neil MacDougall f5431cbbaf
Add i18n string usage checker script (#10805)
* Add i18n string usage checker script

* Fix lint issues

* Add i18n check to GH Action workflow

* Update to node 16

* Update workflow to run script properly

* Allow script to return okay if when there are errors

* Add documentation

* Remove commented code
2024-05-02 20:52:15 +01:00
LiuYan ff1c90df4c
fix(workload): clean up some labels,matchLabels and annotations when cloning a job (#10201) 2024-04-30 09:57:25 +01:00
Giuseppe Leo 793f7c6023
Initial migration of Vue3 for compatible fixes (#10858)
* 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
2024-04-23 20:16:46 +02:00
刘畅 a9b62f75c4 Fix service annotations null 2023-12-04 20:20:14 +08:00
Francesco Torchia a45ac56eca
Merge pull request #9875 from ly5156/upgrading
fix(workload/Upgrading): fix DaemonSet/StatefulSet update strategy failed issue
2023-11-24 10:16:54 +01:00
Richard Cox f34bfba061 Fix selection of default storage class
- default storage class is set via annotation
- annotations can be `"true"` or `"false"`
- previously we only checked for truthy when finding default
- this mean `"false"` counted as true
2023-11-17 13:41:22 +00:00
Richard Cox 9a72508748 Add a tooltip to Workload image pull secret select
- This makes it clearer we only show certain types of secrets
2023-11-09 15:32:29 +00:00
LiuYan 4fce2eda48 fix(workload/Upgrading): fix DaemonSet/StatefulSet update strategy failed issue 2023-11-06 07:46:56 +08:00
Neil MacDougall 34858ab8cf
Fix RBAC issue with workload create/edit screen (#9913) 2023-10-14 13:19:32 +01:00
momesgin 96b71fc322
Merge pull request #9741 from momesgin/8907-fix-unit-tests-warnings
Fixed unit tests warnings
2023-09-26 13:53:48 -07:00
Giuseppe Leo 081683028e
Add automatically default value for deployment PVC (#9717)
* Add automatically default value for deployment PVC

* Remove unnecessary argument

* Set default value as fallback for all the modes
2023-09-26 19:14:31 +02:00
Mo Mesgin c453356ea1 fixed unit tests warnings 2023-09-20 15:49:53 -07:00
Jordon Leach 58e7341a82
Fix volumeMounts from being overwritten (#9617) 2023-09-05 07:27:37 -04: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
Qingyang Nong c0cdc2dbf3
HARVESTER: Cloud provider enhancement (#8935)
* HARVESTER: Cloud provider enhancement

* fix labels-annotations.js linting

* fix missing comma in labels.vue

* fix labels.vue missing bracket

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-05-22 16:49:19 -07:00
Phillip Rak ade3c9f4e7 Replace all instances of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00