Commit Graph

161 Commits

Author SHA1 Message Date
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 43c227c24d
fix error with option selected having index -1 and not being handled properly (#13533) 2025-02-28 09:53:47 +00:00
Giuseppe Leo b3babd5cf8
Generic OIDC group scope is not sent in the request formed by the UI (#13514)
* Add basic store auth tests for redirect

* Define mixin tests

* Correct tests to cover all the cases correctly and ensure that this function works as expected

* Add scopes to the redirectTo request when testing the model

* Add unit tests for action test

* Add comment to save auth config method

* Correct unit tests

* Correct test to avoid the same term to be used for different parts

* Correct key value from scope to scopes to match existing implementation

* Update tests to use scopesJoinChar

* Add further tests for merging default scopes and UI scopes

* Add joinStringList function

* Correct scopes merging issues
2025-02-26 10:49:48 +01:00
momesgin 190e377494
Merge pull request #13086 from momesgin/11679-apps-upgrade-restriction
Restrict installed apps upgrade
2025-02-25 10:00:56 -08:00
Francesco Torchia fc1d539610
Merge pull request #13350 from torchiaf/13349-conflict-catch
Catch conflict errors by `_status`
2025-02-20 17:57:30 +01:00
Francesco Torchia 0ff516518b
Update shell/mixins/create-edit-view/impl.js
Co-authored-by: Richard Cox <18697775+richard-cox@users.noreply.github.com>
2025-02-20 11:17:04 +01:00
Mo Mesgin 219636df7e Merge branch 'master' of github.com:rancher/dashboard into 11679-apps-upgrade-restriction 2025-02-19 15:07:18 -08:00
Phillip Rak 5beb8b8384 Set `openLdapConfig` to `null`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-02-11 17:35:16 -07:00
Francesco Torchia eae3f74e23
Catch conflict errors by _status field
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-10 17:41:55 +01:00
Mo Mesgin 18e7e51614 merge master and resolve conflicts 2025-02-05 09:38:08 -08:00
Mo Mesgin 89348de8ec add vendor to managed apps warning messages 2025-01-23 14:40:51 -08: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
Mo Mesgin 68829b8439 restrict installed apps upgrade 2025-01-13 16:04:42 -08:00
Cody Jackson 728bc64cef Resolving some issues around rendering pagination loading on resource list pages
fixes https://github.com/rancher/dashboard/issues/12748
2025-01-08 16:28:39 -07:00
Richard Cox b614082ce1
Add server-side pagination to home page cluster list (#11663)
* Server-side pagination for home page clusters list and side bar clusters

- Functional Changes
  - SSP now works after vue3 bump
  - Home Page Clusters list now uses server-side pagination
  - Side Bar clusters list now uses server-side pagination
  - Wire in now supported sorting / filtering by id and name used for table columns
  - Allow pagination to be enabled given a specific context
  - Call findPage without persisting to store

- New Pagination Tools
  - PaginatedResourceTable - Convenience Component, wraps ResourceTable with pagination specific props
  - PaginationWrapper - Convenience class to handle requests for resources and updates to them (avoiding store)

- Regressions
  - Side Nav menu ready state was `mgmtCluster.isReady && !pCluster?.hasError`, now ???

* Iteration

Note - prov clusters is broken (only fetches local) due to blocking pr. breals
- notPinned list

* Fix dupe inStore
- remove from resource list, put in resource-fetch (used also by pag res table)

* Two fixes
- changes namespaces kicked of side nav cluster requests (thought pinnedIds changed)
- fix generic lists re-fetching given ns filter changes (they don't have namespaced arg)

* remove comment, backport fix

* test fixes

* E2E: Ensure we wait for cluster entries to exist before clicking on them

* backport fix for local/api filtering

* Remove debug code

* Changes after review

* e2e fixes / debugging

* More e2e fixes

* More e2e fixes

* More e2e fixes

* Fix generic pages that filter on pagination

* Attempt to fix flaky vai test

* Fix after merge from master

* Updates following new indexed files

* Fix lint and test

* Changes given real cluster tests
- general fixes
- correct issue were sorting prov clusters on mgmt cluster props (issue in master as well...)
- bit the bullet, we now don't fetch all mgmt clusters on dashboard visit.
  - there could be knock on affects, but we'd need to remove it sometime in 2.11....

* Fix issues with diplaying rke1 data in home page
- includes https://github.com/rancher/dashboard/pull/12881

* Fix unit tests
2025-01-03 15:34:28 +00:00
Richard Cox 0aa96329ed
Merge pull request #12317 from richard-cox/helm-app-values
[2.10] Update Helm App Values Approach
2024-10-29 09:51:57 +01:00
Richard Cox cf7ac08522 Changes after review
- force fetch of secrets on visit on install app/chart detail/app detail page
- add somre jsdoc


Note
This shouldn't break extensions UNLESS extension developers have implemented
custom chart install/upgrade processes. Existing extensions like kubewarden
or elemental are fine (they redirect to actual chart install process rather
than have their own)
2024-10-22 16:54:55 +01:00
Richard Cox 55bbc2ddac Helm App Values Change 2024-10-22 10:09:55 +01:00
Phillip Rak 63e3ce2432 Replace `beforeDestroy` lifecycle option with `beforeUnmount`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-10-18 13:12:54 -07:00
Mo Mesgin c757b32916 remove emits array from vue-select-overrides 2024-10-16 13:44:43 -07:00
Cody Jackson 9fcbadf0af Fixing more warnings around having the 'emits' component prop
Looks like these got missed in the original cleanup. I'm guessing these were missed because they were in mixins so I went through all of the mixins and found a couple more that were missed.

https://github.com/rancher/dashboard/issues/12130
2024-10-11 08:45:46 -07:00
Alexandre Alves e42aa76e9c fix issue for graceful error degradation because of too many retries fetching secrets for Catalog part of the main extensions screen 2024-10-01 16:11:11 +01:00
Cody Jackson a2a16e1440 Fixes for harvester 2024-09-13 09:43:38 -07:00
Mo Mesgin e2ab4224d9 fix set login popper randomly not showing up 2024-08-30 13:05:00 -07:00
Cody Jackson b0cca862b7 Updating how we render custom list pages
Vue3 changes how attributes are inherited https://vuejs.org/guide/components/attrs#attribute-inheritance

This addresses the issue by adding a `inheritAttrs: false` to the resource-fetch mixin which seems to correlate with the usage of ResourceTable as a root element. Specifically what happened is that when RootTable was used at the root in these cases the value of :rows would get overwritten causing the table to be empty.

I also fixed some spacing issues by changing how we render "outlet" also an inherritedAttr.
2024-08-22 16:09:56 -07:00
Cody Jackson fe4fc0cd63 Rebase fixes 2024-08-22 16:09:56 -07:00
Phillip Rak 627952a522 Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Phillip Rak 9793716efd Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Cody Jackson d47ce13f28 Fixed the remaining lint warnings and errors
The chart.test.ts is likely more broken now than it was. This can be fixed later.
2024-08-22 16:07:04 -07:00
cnotv ff08d80e0e Lint: Manually fixed issues related to vueApp variable added by the script 2024-08-22 16:07:03 -07:00
cnotv 78d70353c5 Unit test: Migrate unit tests with the script 2024-08-22 16:07:03 -07:00
Cody Jackson 0b2f8c61f6 hack n slash 2024-08-22 16:05:37 -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
Alexandre Alves 340d41031e
SAML SLO support (#11182)
* wip

* add logout action according to logic (SAML - logoutAll) + add modal to prompt user to select SLO logout type when logging out of Dashboard

* update authProvidersInfo method to allow for a getter usage in order to make it store reactive

* wip - missing final plumbing for the finalRedirectUrl

* bug fix for non-reactive header logout when auth provider is enabled

* adjust slo UI elements to match expected UI/UX

* minor adjustments + pr cleanup

* cleanup

* handle promise rejection for standard users (apparently they cannot get the schema)

* Updates
- Tweaked text (to be reviewed)
- Removed some code smells
- Ensure rancher logout via modal uses same process as normal logout
- Use async buttons in logout modal
- Add cancel to log out modal
- Fix logout on fail-whale page

* Add error handling (WIP with Andreas, does not currently reach final redirct / verify route)

* Fix check for IS_SLO

* Only allow optional auth provider log out if logged in auth provider

* Fix error message (SLO failures still result in rancher log out)

* check complete slo flow + add special copy when doing a slo logout

* Update shell/dialog/SloDialog.vue

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

* Update shell/edit/auth/saml.vue

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

* update syntax from phil pr review

* Fix logout modal on diangostics, about, etc pages that use plain template

* Remove PromptRemove from diagnostic page
- it uses the plain template which now contains it
- caused x2 modals to show

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 19:16:06 +01:00
Phillip Rak 87f9eede21 Emit validation status for `labeled-form-element` mixin
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-07-29 10:26:37 -07:00
Richard Cox 096fe1485d Fix reload on chart install page
- When refreshing or navigating directly to the chart install page the chart was missing
- This was caused by the chart install page's mixin's computed property `chart` value never populating
  - The computed method would be called, but before charts were loaded
  - When charts loaded the computed property did not trigger again
  - Whenever this.chart was used it would contain the stale value (falsy)
- Fix
  - `chart` value must now be manually populated,
  - this happens via existing `fetchChart`
  - should be safe, given it's called by both `chart install` and `chart detail` page's $fetch
2024-07-11 19:08:09 +01:00
Jordon Leach bd70d4ca56
Switch context for generic oidc provider to the genericOIDCConfig type (#11326) 2024-07-02 08:20:47 -04:00
momesgin fb2c9e5dbc
Added "Show deprecated apps" filter to charts page + warning banners (#11279)
* added show deprecated apps filter to charts page + deprecation & experimental warnings

* lint

* fix e2e test

* test deprecated query parameter in the url

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-06-27 10:54:36 -07:00
Jordon Leach c6a56aa60e
Add generic OIDC provider support (#11112)
* Add generic oidc provider support

* Add oidc provider icon - filter genericoidc provider - update tests

* Automatically set scope - disable advanced inputs initially

* Update oidc login button with unique display name

* Remove default scope for oidc provider

* Add acrValue - move scope inputs

* Clean up validation - update wording - remove rogue c&p

Fix unit tests

* Remove required authEndpoint input

* Require authEndpoint for keycloakoidc - clean up validation
2024-06-26 13:31:01 -04:00
Giuseppe Leo 1db3aade10
Clean and simplify Nuxt utility (#11258)
* Remove reassignment; Add meaningful variables and attributes names

* Move import logic to router

* Remove unused code and move single case to related files

* Simplify and merge functions

* Move error functions to its own util

* Fix linting issues

* Add comments and change names

* Remove nuxt util, merge logic to init entry helper
2024-06-18 11:06:49 +02:00
Richard Cox aaf2d69130
Pagination changes given new vai cache backed steve api (#11110)
* 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

* - harvester machine-config
- project monitoring (and bug fixes)

* Disable workload screen if vai cache is on
- temp step until we get new overview

* TODOs and TEST

* Conditionally remove fetch of all secrets from SelectOrCreateAuthSecret

* TODOs and TEST

* Update SimpleSecretSelector
- only used in monitoring.coreos.com.alertmanagerconfig context

* View and Edit ingress - secrets

* node detail page - pods list

* Backup/Restore: Secrets (WIP)

* Backup/Restore: Secrets, and other usages of SimpleSecretSelector / SelectOrCreateAuthSecret

* Edit: Service account

* Add comments for remaining items

* 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

* ooof

* changes after self review... 3

* fix formatting

* Link new paginated label select with pagination setting

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

* Fix backup.spec e2e test

* fix formatting, paginationUtils.isSteveCacheEnabled --> paginationUtils.isEnabled

* Don't fetch all secrets on cloud creds page

* Fix backup.spec e2e test

* TODO tidying / tracking

* don't getch ALL workloads for hacky way to get a link to a service's workload

* Fix bad merge

* Updates after working with vai cache image

* test fixes

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

* fix unit test

* Updates following review

* Remove workload health until #10417 is resolved

* Updates following review

* changes following self review

* Fix bottom bar of edit backup, edit restore pages

* revert temp change

* changes following self review

* Workaround for kubewarden unit tests in check plugin gate

* bump

* Fix e2e

* Fix linting

* type fixing

* - improve filtering without pagination
- update allowed fields given latest backend changes
- enable on by default exact filter string matches (disable for lists

* remove temp code

* fix linting

* Changes following review

* Fixes for vai cache feature flag
- name was changed from on-disk-steve-cache to ui-sql-cache
- fix timing issue - don't watch resources until we know the vai cache feature flag

* Changes following review

* Fix two sketchy tests
- new exception in docs page
- don't nav to page via button click and then goto same page

* More test improvement
- force user to go to tab which is source of route guard issue
- move setup stuff to a test for cypress to re-retry
2024-06-11 17:44:04 +01:00
Cody Jackson ccfc473c13 Found a few issues with navigation guards and fixed them
- The from/to routes were transposed so I flipped them
- Load initial settings wasn't receiving the store and the error was swallowed.
- Fixed some error reporting instead of just swallowing exceptions
2024-06-06 12:10:30 -07:00
Richard Cox a5661c575f
Remove usages of findAll for types supported by server-side pagination (#10795)
* 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

* - harvester machine-config
- project monitoring (and bug fixes)

* Disable workload screen if vai cache is on
- temp step until we get new overview

* TODOs and TEST

* Conditionally remove fetch of all secrets from SelectOrCreateAuthSecret

* TODOs and TEST

* Update SimpleSecretSelector
- only used in monitoring.coreos.com.alertmanagerconfig context

* View and Edit ingress - secrets

* node detail page - pods list

* Backup/Restore: Secrets (WIP)

* Backup/Restore: Secrets, and other usages of SimpleSecretSelector / SelectOrCreateAuthSecret

* Edit: Service account

* Add comments for remaining items

* 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

* ooof

* changes after self review... 3

* fix formatting

* Link new paginated label select with pagination setting

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

* Fix backup.spec e2e test

* fix formatting, paginationUtils.isSteveCacheEnabled --> paginationUtils.isEnabled

* Don't fetch all secrets on cloud creds page

* Fix backup.spec e2e test

* TODO tidying / tracking

* don't getch ALL workloads for hacky way to get a link to a service's workload

* Fix bad merge

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

* fix unit test

* Updates following review

* changes following self review

* Fix bottom bar of edit backup, edit restore pages

* revert temp change

* changes following self review

* Workaround for kubewarden unit tests in check plugin gate

* bump

* Fix e2e
2024-06-05 09:15:43 +01: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
momesgin f0b0f9376f
Add OCI chart support to repositories pages (#10907)
* add oci support

* fix typo

* fix import

* fix typo

* show oci type on the list table + send number type for all the exponential back-off values

* fix access isOciType from model

* fix conflict resolution error after merging master into branch

* update oci message

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-05-21 07:50:10 -07:00
Richard Cox f136df3962
Merge pull request #10853 from richard-cox/fix-chart-performance
Improve Performance of many helm chart based pages
2024-05-08 07:37:35 +01: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
Richard Cox 01219b751e
Merge pull request #10761 from richard-cox/pagination-node
Update Node list to support server-side pagination
2024-05-02 11:54:01 +01:00
Richard Cox af71daed1d Revert "This fixes an issue where catalog/charts were stale after a repo was updated"
This reverts commit 90ca1209f4.
2024-05-01 14:20:01 +01:00