Commit Graph

57 Commits

Author SHA1 Message Date
Francesco Torchia 6fa45c1fec
Remove onClickOption to avoid duplicate update:value emit from LabeledSelect.vue and Select.vue
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-09-09 18:51:31 +02:00
Francesco Torchia 2cad3bf6c3
Fix dropdown behavior in LabeledSelect component when removing tagged elements
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-09-09 16:43:35 +02:00
Neil MacDougall f8a6ddf25d
Fix select controls do not close when clicking on arrow (#14217)
* Fix select controls do not close when clicking on arrow

* Rebase

* Control vue-select state via labeledSelect

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Control vue-select state via Select.vue

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Set isOpen to false when select closes

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Move focus back to select wrapper on close

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Defer more select open state logic to wrapper

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Close when no selection is made

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Allow for multiselect

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Fix failing e2e test

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

---------

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2025-07-02 13:33:43 -07:00
Phillip Rak ade0a1f9d9
Simplify spacebar prevent behavior when focusing LabeledSelect (#14553)
* Simplify spacebar prevent behavior when focusing LabeledSelect

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Fix unit test

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Simplify spacebar prevent behavior when focusing Select

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

---------

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-06-26 08:57:30 -07:00
Alexandre Alves 20827a1943
fix problem with space key on searchable selects (#14362)
* fix problem with space key on searchable selects + add unit tests

* fix lint issue
2025-05-19 11:49:44 +01:00
Alexandre Alves 809c9d0301
add aria-required attribute to LabeledSelect and LabeledInput components (#14256) 2025-05-07 08:44:58 +01:00
Phillip Rak dc30093509
Replace container logs actions with new dropdown menu component (#14172)
* Create new `useDropdownItem` composable

This composable defines common methods that can be shared across different dropdown menu item types.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Create new `RcDropdownMenuItemCheckbox` component

`RcDropdownMenuItemCheckbox` specifies the styles and behaviors for a menu items that acts as a checkbox.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Create a select item dropdown component

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Move container actions into dedicated component

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Toggle container logs actions based on environment

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Fix type for labeledSelect component ref

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Replace trigger mixin data with event.stop

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

* Fix typo: LocaleSelector

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>

---------

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-05-06 10:50:09 -07:00
Alexandre Alves fd14379936
Improve Banners settings screen reader output (#14093)
* fix a few components for a11y + add unit tests related to a11y

* fix issues with sr output for banners settings with ColorInput and RadioGroup + update unit tests + fix lint issues

* fix lint issue
2025-05-05 09:25:53 +01:00
Alexandre Alves cb7cb52dbe
add role 'none' to hr elements in TopLevelMenu (#14121)
* 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
2025-04-16 10:23:38 +01:00
Alexandre Alves 4af23f6d6a
working on issues reported in the a11y tests (#13609) 2025-04-02 09:57:46 +01:00
Alexandre Alves 46aa2851c0
prevent scroll when hitting arrow down key on selects (#13466) 2025-02-24 15:27:30 +00:00
Alexandre Alves d79c491e8b
Fix keyboard navigation and focus display issues on the combobox component (#13352)
* add label connection to dropdown on LabeledSelect + add missing roles and connections

* address pr comments
2025-02-24 15:12:31 +00:00
Francesco Torchia 8c0bc58743
Early return in focusSearch method when LabeledSelect is disabled
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-18 12:08:50 +01:00
Alexandre Alves dab97f7397
prevent scroll when hitting space key on selects (#13371) 2025-02-13 11:32:17 +00:00
Alexandre Alves 0c411e96d3
Keyboard nav for extensions main screen (#13176)
* working on focus trap composable

* working on slide in panel refactor

* add change so that we dont have a change on the component diff

* fix slidein extension details panel key nav

* fine tune cluster badge trigger btn

* finish work on extensions page

* fix lint errors

* address pr comments

* fix problems of propagation

* update return focus for some modals in the extensions main screen

* remove dead code + fix focus selector return for add extensions repo and developer install modals
2025-02-11 10:47:55 +00:00
Richard Cox 51f21ab6f3 Merge remote-tracking branch 'upstream/master' into pagination-remove-findall-2 2025-01-23 15:57:51 +00:00
Alexandre Alves bc003d36a0
fix key nav on preferences page (#13161)
* fix key nav on preferences page

* address pr comments
2025-01-23 09:49:24 +00:00
Evgeniya Vashkevich beef20e10c
Fixed LabeledSelect not emitting search explicitly (#13142) 2025-01-17 15:04:43 -08:00
Yi-Ya Chen 1ede584162
refactor: show tag prompts if isSearchable
Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
2025-01-13 15:27:05 +08:00
Richard Cox 92430b36fb Finish off questions/reference 2025-01-08 14:07:16 +00:00
Francesco Torchia eac3deaa4b
Add harvester features
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 15:38:36 +01:00
Mo Mesgin eac73976f5 fix tagging not working in creating a logging flow 2024-10-31 11:46:49 -07:00
Alexandre Alves 24568dc109
fix bug with LabeledSelect with "multiple" attribute (#12129)
* fix issue with labeledSelect in mode multiple by allowing the binding of the attribute to the element v-select

* Add test for component to emit the correct value as array

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2024-10-04 16:33:32 +01:00
Phillip Rak 1e2e62514b Filter `$attrs` applied to wrapper `div`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-27 14:45:58 -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
Mo Mesgin 47217a4c4c fix duplicate bindings 2024-09-09 16:36:15 -07:00
Mo Mesgin 77b918790a fix issues related to select component after vue3 upgrade 2024-09-09 11:57:10 -07:00
Cody Jackson f52d9cf26a Updating LabeledSelect to support the selected and update events 2024-08-22 16:09:54 -07:00
Phillip Rak 7874da578f Fix slot syntax
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Phillip Rak c90ef43ed0 Render rke2 cluster creation form
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:07:03 -07:00
Phillip Rak 64e9baf7f4 Update `vue-select` and fix `LabeledSelect` & `Select` components
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:07:03 -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
Richard Cox 542ebd4f40
Wire in pagination to LabeledSelect and use for pods, secrets and configmaps (#10786)
* Changes for new design
- New visuals
- Pagination controls --> load more
- finished testing of label select with pagination off

# Conflicts:
#	shell/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts

* Changes following review

* Update Node list to support server-side pagination
- Setup pagination headers for the node type
- Define a pattern for fetching custom list secondary resources
- Major improvements to the way pagination settings are defined and created
- Lots of docs improvements
- Handle calling fetch again once fetch is in progress (nuxt caches running request)
- Validate filter fields (not all are supported by the vai cache
- General pagination fixes

* Lint / test / fixes

* Improvements to configmap e2e test & Improve pagination disabled

* Beef up validation

* Fix missing name column in non-server-side paginated node list

* Fix PR automation actions
- fix syntax
- catch scenario where a pr has no fixed issue

> There's duplication between files, see https://github.com/rancher/dashboard/pull/10534

* CI bump

* Fixes post merge

* Wire in 2.9.0 settings for server-side pagination
- Everything is gated on `on-disk-steve-cache` feature flag
  - There's a backend in progress item to resolve a `revision` issue, until then disable watching a resource given it
- Global Settings - Performance
  - Added new setting to enable server side pagination
  - this is incompatible with two other performance settings

* Integrate pagination with configmaps in cis clusterscanbenchmark edit form
Also
- improved labeled select pagination
- gate label select pagination functinality on steve cache being enabled

* TODOs and TEST

* Paginate Secret selection for logging providers
- Allow `None` option in Paginationed LabelSelect
- Optionally classify pagination response

* WIP

* fixes arfter merge

* Don't suggest container names, not practical
- previously all pods were fetched... and we scrapped all container names from them
- this is a scaling nightmare, user now must just enter the name/s to match

* Avoid findAll secrets in SimpleSecretSelector

* tidying up

* Move LabeledSelect/index.vue back to LabeledSelect.vue to not break extensions

* changes after self review... 1

* changes after self review... 2

* changes after self review... 3

* Link new paginated label select with pagination setting

* Work around failing kubewarden unit tests in check-plugins gate

* Fix backup.spec e2e test

* Create a convienence wrapper called ResourceLabelSelector that hides most of the complexity

* fix unit test
2024-05-30 10:49:29 +01:00
Nancy 13f2e5fe00
Improve LabeledSelect performance (#10650)
* remove labeledselect ability to detect stale option labels in order to improve performance

* add key rerender hack to fix psa dropdown option labels not refreshing

* fix lint
2024-03-20 08:04:44 -07:00
Nancy 4cca5faf81
AKS provisioning extension (#9669)
Adds a built-in AKS provisioning extension to replace the embedded ember pages, as well as modifications to the provisioning UI to support other non-rke2 provisioning extensions
2024-01-11 07:52:45 -08:00
Nancy 371524f732
Reduce performance impact of LabeledSelect getOptionLabel (#9689)
* imrpove labeledSelect getOptionLabel performance when options are strings

* refactor labeledselect getOptionLabel and write test

* remove redundant if block in ls getOPtionLabel

* refactor getUpdatedOption
2023-09-12 12:58:02 -07: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
Nancy 21167e1dc9
fix labeledselect getOptionLabel to use reduce prop when labels change (#8176)
* fix labeledselect getOptionLabel to use reduce prop when labels change

* Add unit tests

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2023-02-15 09:19:48 -07:00
Giuseppe Leo f3f7a2a022
PSA: Update PSA default (#8133)
* Change inputs order for PSP/PSA/CIS; Code cleanup

* Add CIS override input; add and correct i18n for CIS

* Change label and input status, based on criteria

* Prevent issues for missing CIS profile args

* Disable logs to avoid code pollution

* Fix test issue

* Update PSA template default label

* Change PSACT on CIS changes if above 1.25

* Add banner for CIS cases

* Remove duplicated logic

* Correct issue after rebase
2023-02-14 18:03:38 +01:00
Giuseppe Leo fb590d2539
LabeledSelect: Displayed label does not update with options (#8154)
* Update displayed value in labeled select inputs if option labe changes but not the value

* Replace generic label and key with props

* Add i18n
2023-02-14 10:42:30 +01:00
Francesco Torchia 93aafffe88
Select Member, add tooltip
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-15 17:15:33 +01:00
richa c792d21dd9
Fixed icon size (#7557)
* Fixed icon size

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed icon size in simplebox

* icon fix in GrowlManager.vue

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed close icon size

* Fixed more icons sizes

* Fixed icon size in namespaces filter

* Reverd css changes in LabeledSelect component

* Fix on Header

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Richa Bisht <RBISHT@Richas-MacBook-Pro.local>
2022-12-08 16:52:53 +01:00
richa f2e1ae8ac8
Added blue color only to creation action (#7118)
* Added blue color only to creation action

* Removed test code

* Revert some changes without dummy text

* Fixed names for attribute, color variables for dark and light theme, removed a tag

* Allow /rancherversion endpoint override (#7088)

* Fix KeyValue Component. (#7093)

* Fix KeyValue Component.

* Refactor solution.

* Fix PR comment.

* Adds new logos without Manager to bettr represent all sub-brands and improve readability

* Updates error of HSB colour to HSL

* Remove uneeded check - add custom check for old endpoints (#7058) (#7074)

* Allow to reset ui-brand global setting (#7110)

* Remove negative margin for Tabbed component, causing issues in Network policies (#7108)

* Update script to use newer version of Rancher Docker (#7114)

* Removed files from featured-carousel PR that should not be there at top-level (#7092)

* 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>

* Improve PSP deprecated banner
Fixes #7096

Previously...
- a new request for PSPs was made on each page visit
- the request would fail for users without access to the PSP
- failed requests equated to white page dev error (fine in prod)

Now...
- use the `counts` resource to determine if the user can see any PSPs
- move logic to a computed property

* Hide experimental charts from Cluster Tools

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Shavindra <Shavindra@users.noreply.github.com>
Co-authored-by: Kenneth Wimer <wimer@suse.com>
Co-authored-by: Jordon Leach <40806497+jordojordo@users.noreply.github.com>
Co-authored-by: Giuseppe Leo <giuseppe.leo@suse.com>
Co-authored-by: Bastian Hofmann <bashofmann@gmail.com>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-11-15 14:31:08 +01:00
Giuseppe Leo d2d4122bc0
Review HTML formatting rules (#6805)
* 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
2022-11-11 17:04:22 +01:00
Nancy 29e666c7a7
Revert "HARVESTER: fix select style (#7055)" (#7064)
This reverts commit 8909903e44.
2022-10-03 15:58:03 +01:00
wujun 8909903e44
HARVESTER: fix select style (#7055) 2022-09-30 14:09:19 -07: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
Catherine Luse 89a55389ed
Merge pull request #6302 from catherineluse/amc
Can select secrets for receivers in AlertmanagerConfig
2022-07-10 06:39:01 -07:00
Catherine Luse f81d0d9876 Can select secrets for receivers in AlertmanagerConfig 2022-07-07 20:35:57 -07:00