Commit Graph

102 Commits

Author SHA1 Message Date
Yiya Chen b8c714f935
Introduce Cron Editor components (#15319)
* feat: add CronExpressionEditor
* feat: ddd CronExpressionEditorModal
* test: add test cases
* refactor: extracting types
* feat: enhance a11y
* docs: add comments for props
* refactor: move component to shell

---------

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
2025-09-18 14:43:53 +08:00
momesgin 6058587b10
Improve performance in apps/charts page by optimizing LazyImage component (#14906)
* utilize observer in LazyImage to load the image only when it's in viewport

* fix unit tests

* display error image only when src is falsy or got an error

* removed unnecessary data block

* initialize non-reactive data

* move non-reactive data

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2025-08-08 16:57:56 -07:00
Evgeniya Vashkevich 2e25bc83ae
Added back RKE1 removal, removed etcdbackup (#14786) 2025-07-14 08:29:27 -07:00
momesgin c9744d1da5
RichTranslation component for embedding components in translations and fix repositories causing refresh (#14736)
* add new component to support rich translation

* add test + minor refactor

* add whitelist for tags + fix test

* use new translation component for charts empty state

* fix docs message

* remove unused prop

* remove weak test

* fix tag

* fix tag

* revert removing root tag as prop

* fix type

* minor refactor

* sanitization

* replace escapeHtml with purifyHTML

* use rich translation for no charts docs message

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2025-07-10 12:02:06 -07:00
Francesco Torchia 7a2140bf14
ConfigMapSettings add handler option to use Custom components based on setting types
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-25 19:39:32 +02:00
Francesco Torchia 632217fbec
ConfigMapSettings add collapsible option to groups
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-25 19:39:30 +02:00
Francesco Torchia 3095f4935c
ConfigMapSettings, implement unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-25 19:39:29 +02:00
Neil MacDougall a0d725938c
Add Notification Center (#14419)
* Initial version

* Improve growl integration

* Fix lint issues

* Tidy ups and lint fixes

* Add a maxiumum number of notifications

* Add some notes

* Localisations

* Avoid using general 'actions' class name

* Remove clear all button

* Further fixes

* Remove test code

* Always show a read notification indicator

* Address feedback from walk through

* Add test ids and updated e2e tests, fix lint

* Bump version number to match backend

* Work around version issues

* Fix lint issue

* Fix e2e test

* Fix release notes seen issue breading login landing page

* Update .gitignore

* Remove dev readme file

* Remove todo and tweak comments

* Add simple developer docs, update type comments, bump icon package version number

* Update lock file

* Address PR feedback

* Address PR feedback 2nd round

* Fix lint

* Fix broken import

* PR feedback

* Used partial

* PR review feedback

* Use user id hash in the local storage key

* Encrypt the notifications in local storage

* Remove persist stuff from store

* Fix bug with initialization of the store and release notes

* Bug fix - store encryption key

* Debounce setting of notifications to avoid loop
- tab 1 can fight tab 2 if tab 2 progresses whilst tab 1 processes stale content

---------

Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-19 19:47:50 +01:00
momesgin 52ba43a636
FilterPanel Component (#14406)
* app card component

* cover upgradable and installed statuses

* support tags

* comment out handle clicks

* add matching chart logic

* add unit tests

* add unit tests for chart model

* fix e2e tests

* fix e2e test

* add secondary text link in css

* change AppCard to a generic ItemCard

* continue making itemcard more generic

* fix reference issue

* title slot + variant styling

* code cleanup + minor refactor

* new icons

* update icon lib + minor refactor and styling

* unit tests

* more unit tests for chart model

* refactor some slots + finishing touches

* some accessibility updates

* minor styling

* move image div inside slot

* uncomment e2e tests

* fix charts selector

* fix test

* fix statuses alignment

* more robust header styling

* remove PropType

* updated translation key

* update key

* rename

* improve aria labels + minor cleanup

* fix import

* replace deep targetting lazyimage css with style attr

* remove deep for actions + fix small header alignment

* rename component

* remove extra check

* add comments

* add comments to model

* use id instead of chartName

* remove todos

* fix matching app logic not including the latest version

* create RcFilterPanel component and use it in charts page

* fix repo click + minor styling

* update checkbox styling + fix unnecessary render for extra slot

* revert checkbox styling changes

* wrapper styling

* imporve performance

* debounce search query

* update e2e tests

* support actions as prop

* resolve conflicts

* update filter component + add statuses filter

* dynamic card layout when variant is not set

* fixed unit tests + lint

* removed unnecessary default props

* fix e2e test

* improve aria label message + remove unnecessary ones

* move component

* separate status filtering

* status tooltips

* fix export component

* Only calc variant twice

* lint

* fix unset debouncedSearchQuery

* resolve conflict

* add requestAnimationFrame to optimize observer

* fix resolve conflicts

* support both v-model and value + fix sluggish checkboxes + comments

* move RcFilterPanel to pkg

* unit tests

* remove unused carousel related code

* remove unused carousel related code

* remove unused carousel related code

* update card po and its usage

* rename

* resolve merge conflicts

* replace .no-card-click with RcItemCardAction component

* minor styling

* add po for rc-filter-panel and update e2e tests

* update unit tests

* refactor e2e test for disabled repo

* accessibility changes

* add translation + minor refactor

* add keydown handlers + minor refactor

* Revert ResizeObserver, also cache filteredCharts map result

* fix resolve conflicts

* fix resolve conflicts

* revert removed data-testid

* minor styling

* remove unused code

* update css space variables

* fix e2e test

* remove type description + minor styling

* update index.d.ts

* update logic to remove value prop

* rename footer item click

* add screen reader message for opening on a new tab

* check for option.label

* revert space variable changes and update .outlet padding instead

* revert spacing change

* fix using modelValue

* fix checkbox value type

* converted rc component to regular

* fix import

* fix type

* fix item card focus styling

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-13 15:16:13 -07:00
momesgin 93d8290fae
Item Card (#14330)
* app card component

* cover upgradable and installed statuses

* support tags

* comment out handle clicks

* add matching chart logic

* add unit tests

* add unit tests for chart model

* fix e2e tests

* fix e2e test

* add secondary text link in css

* change AppCard to a generic ItemCard

* continue making itemcard more generic

* fix reference issue

* title slot + variant styling

* code cleanup + minor refactor

* new icons

* update icon lib + minor refactor and styling

* unit tests

* more unit tests for chart model

* refactor some slots + finishing touches

* some accessibility updates

* minor styling

* move image div inside slot

* uncomment e2e tests

* fix charts selector

* fix test

* fix statuses alignment

* more robust header styling

* remove PropType

* updated translation key

* update key

* rename

* improve aria labels + minor cleanup

* fix import

* replace deep targetting lazyimage css with style attr

* remove deep for actions + fix small header alignment

* rename component

* remove extra check

* add comments

* add comments to model

* use id instead of chartName

* remove todos

* fix matching app logic not including the latest version

* wrapper styling

* imporve performance

* debounce search query

* update e2e tests

* support actions as prop

* dynamic card layout when variant is not set

* fixed unit tests + lint

* removed unnecessary default props

* fix e2e test

* improve aria label message + remove unnecessary ones

* move component

* fix export component

* Only calc variant twice

* lint

* fix unset debouncedSearchQuery

* add requestAnimationFrame to optimize observer

* update card po and its usage

* rename

* replace .no-card-click with RcItemCardAction component

* Revert ResizeObserver, also cache filteredCharts map result

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-09 08:59:54 -07:00
Alexandre Alves 387891f61f
improve a11y in some of our most used components in Rancher Dashboard (#14343)
* improve a11y in some of our most used components in Rancher Dashboard

* revert changes to roles on keyvalue component
2025-06-04 08:50:48 +01:00
Evgeniya Vashkevich 258ccb4578
Fixed error message when received from Norman (#14413) 2025-05-29 14:31:03 -07:00
Neil MacDougall c0ea22f63b
RKE1 Clusters unsupported (#14226)
* Make RKE1 Unsupported

* Fix for unit tests

* Update a11y test for removed RKE1 toggle switch

* Fix missing import

* Remove RKE templates and related tests

* Fix lint and tidy up

* Removed unused code

* Updates e2e tests

* Tidy up e2e tests

* Fix lint

* Prevent edit of RKE1 cluster

* Remove RKE1 settings

* Fix lint with removed settings

* Remove e2e test for removed setting

* Remove unused e2e po

* Remove toggle switch from a11y test
2025-05-29 13:07:00 +01:00
Alexandre Alves d269e5fd34
refactor catalog install and uninstall extension modals as a prompt modals (#14192)
* refactor catalog install and uninstall extension modals as a prompt modal + add unit tests

* remove todos

* address merge conflicts + revert change to structuredClone + update unit test
2025-05-08 17:11:11 +01:00
Alexandre Alves c9225d0632
refactor add repos and developer load extension modals as a prompt modals (#14191)
* refactor add repos and developer load  extension modals as a prompt modal + add unit tests

* fix broken unit test

* remove unused prop

* remove todos

* code cleanup
2025-05-07 08:39:40 +01:00
Alexandre Alves c37239ca13
refactor install and uninstall extension modals as a prompt modals (#14190)
* refactor install and uninstall extension  modals as a prompt modal + add unit tests

* remove old modals

* remove unused prop

* remove todos
2025-05-06 19:09:41 +01:00
Alexandre Alves 6e568be938
refactor known hosts edit modal as a prompt modal (#14196)
* refactor disable known host edit modal as a prompt modal + add unit tests

* fix broken unit test

* remove unused prop
2025-05-06 18:32:06 +01:00
Alexandre Alves bb4ea23610
refactor change password modal as a prompt modal (#14195)
* refactor disable change password modal as a prompt modal + add unit tests

* remove old modal

* remove unused prop

* address merge conflicts + add missing role to hr
2025-05-06 18:30:41 +01:00
Alexandre Alves 50e1daccd5
Refactor AssignTo, MoveModal and feature flag modal as prompt modals (#14187)
* refactor AssignTo, MoveModal and feature flag modal as prompt modals + add unit tests + remove store mechanisms that were dedicated to these modals

* fix small issues with FeatureFlagListDialog and MoveNamespaceDialog

* fix merge conflicts + remove code comments

* address merge conflicts + remove text from template
2025-05-06 17:34:55 +01:00
Alexandre Alves 5ad9edf870
refactor disable auth provider modal as a prompt modal (#14194)
* refactor disable auth provider  modal as a prompt modal + add unit tests

* remove unused prop

* re-trigger gates
2025-05-06 11:39:47 +01:00
Alexandre Alves d1dc8b2e21
refactor import and search header modals as a prompt modals (#14197)
* refactor import and search header modals as a prompt modal + add unit tests

* fix lint issue

* remove unused prop + fix e2e test

* fix merge conflicts
2025-05-06 09:52:14 +01:00
Alexandre Alves 445b7fb9c6
refactor wechat modal as a prompt modal (#14189)
* refactor wechat modal as a prompt modal + add unit tests

* remove unused prop
2025-05-02 09:46:14 +01:00
Alexandre Alves 94b0645fb8
Update AppModal, PromptModal and focusTrap (#14186)
* update AppModal, PromptModal and focusTrap to use only the watcher based focus trap and wire in required props for prompt modals + add unit test for current prompt modals display assertion + minor tweaks to current prompt modals so that they work fine on unit tests

* update PR with recommended changes

* fix lint issue

* push to retry pipelines

* remove unit test variable from promptModal

* remove prop not needed - autoTriggerFocusTrapWatcher
2025-04-30 09:16:48 +01:00
Jordon Leach 7e58161982
Initial `$shell` api - add `ModalManager` and `SlideInPanelManager` (#13840)
* Initial $shell internal-api - Add ModalManager and SlideInPanelManager components

* Use Teleport for Modal and SlideIn managers - Add unit tests

Unit test fix

* Add focus trap and tabindex to Modal and SlideIn managers
2025-04-16 15:09:05 -04:00
Alexandre Alves 8b96f2669e
update AsyncButton to fix problem with keyboard nav focus (#13954)
* update AsyncButton to fix problem with not being able to have to keyboard nav focus back to the element when performing an action triggered by AsyncButton

* fix e2e test

* fix e2e test
2025-04-04 09:50:46 +01:00
Cody Jackson 7847d5cd07 Fix FixedBanner so that we can show the appropriate stylized text also fix multi-line functionality
Fixes https://github.com/rancher/dashboard/issues/11951
2025-03-17 14:41:53 -07:00
Francesco Torchia ce01f6dc9a
Fix users e2e tests 2
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-28 12:46:55 +01:00
Mo Mesgin 0d5e2c04ab add test + minor refactor 2025-02-11 09:57:03 -08:00
Phillip Rak 2307ce3aea Unit test `ButtonMultiAction.vue`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-26 16:28:40 -07:00
Giuseppe Leo 519e2e3ebd
Feature/11881 unit input type fix (#11939)
* Add container resource limit tests

Add real case scenario for unit input component

Add input test for container resource limit

Add base unit to unit input test

Add blur test for container resource limit and unit input

Extend input tests to all cases

Add test case with parent passing value and update on emission

Update tests

Update tests to match emitters

* Add emitters for unit input

* Accept ID pairing with data suggestion fix

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>

* Enable tests after fix

---------

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-18 17:02:28 +02: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
Cody Jackson 8d59cd5914 Skipping all failing unit tests for the Vue3 merge. 2024-08-22 21:12:40 -07:00
Phillip Rak a71857ce7d Unit test updates - partially fixed
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:56 -07:00
Phillip Rak 0fb02f5b2d Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:56 -07:00
Cody Jackson fe4fc0cd63 Rebase fixes 2024-08-22 16:09:56 -07:00
Phillip Rak bd8d57bcac Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Phillip Rak 97b58ca4f0 Update unit tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -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 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
Neil MacDougall 09814e99b0
Improve keyboard mapping display (#11131)
* Improve keyboard mapping indicator

* Improve display and animation of close

* Add e2e tests

* Fix lint issues

* Update unit tests

* Fix unit test and reduce animation time
2024-06-03 09:52:44 +01:00
Giuseppe Leo 43ef5fc390
Clean up entry logic for vue.config (#11048)
* Cleanup entry for vue configuration

Rename reserved function terms

Correct extendApp initialization by passing Vue attribute

Avoid reserved name Vue

Set more unique and meaningful file names

Remove deprecated code added with rebase

Add vue instance to mountApp

Add comments and references to TODO issue

Restore function declaration over binding issue

Rename apps and correct issue with the render

Rebase residual cleanup

Remove unnecessary env var related to Nuxt

Remove deprecated confit assignment

Revert render function refactoring

* Fix Dashboard version issue
2024-05-29 11:09:43 +02:00
Richard Cox 50af7e5c0e
Merge pull request #10962 from richard-cox/cert-e2e-tests
Add automated tests for Cluster Dashboard Certificates view
2024-05-09 15:05:29 +01: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
Evgeniya Vashkevich ff7b13696d
[INT] Refactored some of the plugins - 2 (#10944)
[INT] Refactored some of the plugins - 2
2024-05-07 14:37:36 -07:00
Richard Cox 4c542cc1b7 Add unit test for expiring
- had hoped to check text and row state but child components are stubbed
2024-05-07 17:25:36 +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
Alexandre Alves 764fa6087d
add e2e tests for #10389 and #9926 (#10745)
* add e2e tests for #10389 and #9926

* disable eslint for massive blueprint schema file

* fix e2e test issue + sneaky improvement for carousel unit test

* uncomment missing e2e test

* simplify schemas data and logic to generate a V2 monitoring on a local cluster for e2e tests

* minor code cleanup
2024-04-10 08:41:18 +01:00
Alexandre Alves 00e4f83c34
code cleanup + fix breaking logic on unit test with non-existance of nodes to clone + add unit test (#10737) 2024-04-02 17:19:29 +01:00
Phillip Rak 6206f9763c
Merge pull request #10716 from rak-phillip/chore/remove-nuxt-link
Replace `nuxt-link` with `router-link`
2024-04-01 08:00:12 -07:00