Commit Graph

15 Commits

Author SHA1 Message Date
Cody Jackson 9d13262038 Ensuring Checkbox components have the `mode` prop where appropriate
Fixes #14481
2025-09-17 13:45:39 -07:00
Alexandre Alves 3970a9ff63
fix misc issues for a11y (#13519)
* fix misc issues for a11y

* fix prop + fix issue with white area not resizing as whole shell window

* improve aria labels for shell resize
2025-02-28 15:56:18 +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
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
Phillip Rak bd8d57bcac Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -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
Alexandre Alves 3df4e9dd53 Reintroduce "Replace `Vue.extend` with `defineComponent` in shell"
This reverts commit 1eacbdea40.
2024-03-13 10:10:26 -07:00
Alexandre Alves 64e20bb50f
Revert "Replace `Vue.extend` with `defineComponent` in shell" (#10344) 2024-01-29 17:22:06 +00:00
Phillip Rak 610b826319 Replace `Vue.extend` with `defineComponent` in shell
Replace the usage of `Vue.extend` with `defineComponent` throughout multiple components located under `shell/components/`. `defineComponent` provides better type inference, improved TypeScript support, and will be the recommended way to define components when Dashboard migrates to Vue 3.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-01-10 09:06:46 -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
Giuseppe Leo 0768d82f16
PSA minor changes (#8022)
* Add missing and correct i18n PSA labels

* Correct description size by removing helper

* Add title to Namespace list tooltip if any PSA

* Allow to disable use of checkbox for PSA form

* Change timeout for growl to 5s on Pod warning due PSA

* Add type label for PSA

* Move PSA menu under Advanced

* Replace toggling system label with extending the value within the same

* Emit initial PSA form values con creation if no checkboxes due lack of interactions
2023-01-25 14:02:26 +01:00
Giuseppe Leo 8497f587d7
Add PSA custom resource in Cluster Manager (#7678)
* Add PSA resource model, edit, list, types, config, utils and navigation

* Remove controls sorting from config file in PSA form due unnecessary added logic

* Add missing type to exemptions

* Remove component specific grid alignment styling

* Add meaningful values on PSA form tests

* Add prefix for the namespace PSA form

* Correct PSA form test

* Revert RKE cluster erroneous changes

* Rename all the PSA form values to match specification and avoid issues

* Create function to convert array to dictionary

* Add types and replace function with utility in PSA form

* Trim exemptions values for PSA form

* Correct util test and function

* Enable YAML editor for PSA resource
2023-01-20 16:26:43 +01:00
Giuseppe Leo 3e31e9f138
Add support for Pod Security Admission in the Namespace resource (#7619)
* Create models, config and utils for PSA

* Create PSA tab form view

* Create custom labels for Namespace

* Add icon option for Namespace detail view

* Add icon for Namespace list

* Add PSA tab for Namespace edit view

* Add i18n for all the PSA parts

* Separate PSA labels between mode and versions

* Filter DetailTop Namespace labels from PSA versions

* Correct unit test

* Correct Namespace tooltips for details, to be created after fetching the resources

* Remove unnecessary model

* Add todo for PSA implementation

* Add TODO for tests with checkbox and select

* Correct namespace list link with model method

* Add TODO

* Move i18n key for PSA

* Align Namespace detail view chips icon to the top

* Restore labels and annotation to the Namespace view

* Merge LabelsPSA features to existing Labels component

* Move all the PSA logic from the view to the model

* Tweaks following review

DetailTop
- Remove PSA specific code from generic component

ResourceDetail
- Remove PSA specific code from generic component
- Remove plumbing for descriptions and icons from parent component to DetailTop

Labels&Annotations component
- Default `show system labels` to off
- Ensure size of `Labels` and `Annotations` titles are the same
- Improve padding
- Remove PSA specific code from generic component
- Removed un-needed margin-bottom

Project/Namespace List
- Improve padlock icon alignment
- Improve spacing around PSA list in tooltip (this will pop up often)

PodSecurtyAdmission settings component
- Improved alignment on PSA checkbox

General Improvements
- Always show Labels&Annotations on Namespace config (view) page

* Changes following testing
- Fix display of show/hide system labels when there are no system labels
- Ensure PSA order shown in project/namespaces list PSA tooltip matches PSA controls in Namespace edit/config page
- Remove two usages of lodash
  - pickBy --> new common pickBy
  - values --> Object.values

* Fix unit tests

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-06 16:01:40 +01:00