Commit Graph

344 Commits

Author SHA1 Message Date
Phillip Rak 566111496d Prevent activating shortkeys when modals are active
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-02-14 11:06:32 -07:00
Neil MacDougall 1e18d03f4c
Add support for modifying doc links and add support for different links for Rancher Prime (#13020)
* Add support for different doc links

* Adding missing e2e test tags

* Auth page not accessible to standard user (admin tests seem sufficient)

* Ensure types are generated for version file

* Update doc links

* Update to remove plugin remove for builtin extensions

* Change the plugin load status back to how it was

* Fix i18n issue

* Fix translation load for built-in extensions
2025-02-07 10:38:41 +00:00
Neil MacDougall 8001967416
Extensions: Add hooks to support virtual clusters (#11064)
* Add hooks to support virtual clusters

* Fix lint issues

* Refinements

* Update for Vue 3 changes

* Fix import

* Minor tweaks

* Fix bug causing e2e tests to fail

* Fix lint issue

* Rename internal properties and ensure they don't break clone/save

* Ensure we generate types for the plugins package to give us access to mapDriver

* Simpler approach

* Fix lint issues and add type

* Remove unused code

* Revery unnecessary changes

* Bug fix for finding model extension

* Factor out string constant and add provider display method

* Add experimental to API

* Update typegen.sh to use SHELL_DIR var

* Move type def

* Fix lint issue

* Address PR feedback

* Update steve-class.js so we always get an array

* Fix type definition
2025-01-31 08:51:58 +00:00
Richard Cox c7b2aa7fbe Encode the filter param that SSP uses
- covers cases like filtering for a kube version (v1.31.1+k3s1)
2025-01-24 16:55:06 +00:00
Richard Cox 09194418bf finish off functional stuff 2025-01-09 16:50:41 +00:00
Richard Cox fb203f945f tidying up ready for review 2025-01-09 11:26:18 +00:00
Richard Cox 05eabe99be Merge remote-tracking branch 'upstream/master' into pagination-remove-findall-1 2025-01-08 11:47:54 +00:00
Richard Cox f980283813
Add server-side pagination to cluster explorer lists (#11672)
* cluster list now uses resource table

* New PaginatedResourceTable

* WIP

* add context to pag setting

* tidying up

* Add server-side pagination to cluster explorer events and general events list

* Servier-side pagination for catalog apps, cluster repo and operation

* Servier-side pagination for Service --> HPA, inmgress, services

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

* fixes after merge. apply PagResTable to node list, vue3 fixes

* - Fix issue where list components containing PaginatedResourceTables would incorrectly fetch all resources anyway
- convert reminaing storage lists

* policy section

* fix async button in manual refresh mode

* fgh

* aaaaa

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

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

* fixes / updates

* testing/tidying

* WIP - Rest of workload lists

* finish off workloads

* tidying up

* fix non-generic list filtering by namespace

* 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

* remove invalid sort/filter type

* Running through new indexed fields

* fix unit tests

* lint fixes

* Fixes after small review

* lint

* Test for check-plugin-gates pkg build from shell

* e2e fixes

* Testing new indexed fields with dev image

* tidyuing up imports in hope to fix ts error in check-plugins gate

* Fix failing check-plugin-gates
- caused by shell/scripts/test-plugins-build.sh importing list/catalog.cattle.io.clusterrepo.vue
- the component had been updated to a TS component
- check-plugin build outputs TS errors for a component file imports
- vs code shows no errors for imported file

* tidying up a smidge

* Many tweaks
- Remove final todo's
  - includes fix for service type clusterip/headless overlap
- Removed ununused ENDPOINT column (note ENDPOINT formatter used in other columns)
- Testing freshly added index fields

* Improve location of new place where componentWillFetch is set

* fix lint, comment updated

* Fix failing e2e tests
- fix cluster dashboard events test
- fix and greatly improve flaky events test
- fix hpa test
- functional fixes
  - fix sorting/filtering events by object type
  - fix hpa columns
2025-01-07 15:13:42 -07:00
Richard Cox cb87aa3b6e Remove ununused component, tweaks, update ResourceTabs events to be super ok 2025-01-07 15:31:15 +00:00
Richard Cox 11eda663bf WIP 2025-01-07 13:34:18 +00:00
Alexandre Alves 8a5cd702a4
fix keyboard nav for app bar (#12958)
* fix keyboard nav for app bar

* remove dones

* minor fixes based on another PR comment

* removed all space key for links + move floating-vue config to plugin definition

* rename tabbing-index to tab-order + add aria-label to main menu
2025-01-07 09:28:29 +00:00
Richard Cox e227f3ebd7 Many tweaks
- Remove final todo's
  - includes fix for service type clusterip/headless overlap
- Removed ununused ENDPOINT column (note ENDPOINT formatter used in other columns)
- Testing freshly added index fields
2025-01-06 15:06:35 +00: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 096d290627 Testing new indexed fields with dev image 2024-12-18 14:38:50 +00:00
Richard Cox 958e9d00d8 Fixes after small review 2024-12-17 11:45:35 +00:00
Richard Cox 8f02e8ab30 lint fixes 2024-12-16 16:58:33 +00:00
Richard Cox f837f889b7 Running through new indexed fields 2024-12-16 16:34:43 +00:00
Richard Cox 710c3a535e remove invalid sort/filter type 2024-12-16 15:48:10 +00:00
Richard Cox 95c693f850 Merge branch 'pagination-home-page' into pagination-cluster-explorer 2024-12-16 15:44:18 +00:00
Richard Cox 6b445fd71d Fix unit tests 2024-12-16 14:17:43 +00:00
Richard Cox 39c2cd7599 Fix issues with diplaying rke1 data in home page
- includes https://github.com/rancher/dashboard/pull/12881
2024-12-16 13:42:33 +00:00
Phillip Rak 9cd6679ad8 Remove `markRaw()` from `map`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-12-12 12:27:38 -07:00
Richard Cox 9b5d420b77 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....
2024-12-11 17:27:56 +00:00
Richard Cox 9d01007320 Updates following new indexed files 2024-12-10 16:12:36 +00:00
Richard Cox c2c96a53df Merge remote-tracking branch 'upstream/master' into pagination-home-page 2024-12-10 14:14:42 +00:00
Richard Cox 28135a19e7 Changes after review 2024-12-09 11:55:51 +00:00
Richard Cox 6f5657363b WIP - Rest of workload lists 2024-12-04 19:04:48 +00:00
Richard Cox 66f73dab5b fixes / updates 2024-12-04 11:54:28 +00:00
Richard Cox 475aaef2eb Merge branch 'pagination-home-page' into pagination-cluster-explorer 2024-12-02 17:45:16 +00:00
Richard Cox f1858b6f02 Iteration
Note - prov clusters is broken (only fetches local) due to blocking pr. breals
- notPinned list
2024-12-02 17:32:41 +00:00
Richard Cox 419cc30fd1 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 ???
2024-12-02 15:48:23 +00:00
Cody Jackson 68be8d4bc0 Removing code that's no longer necessary around back-button usage
Fixes https://github.com/rancher/dashboard/issues/11274
2024-11-25 16:31:44 -07:00
Richard Cox 006debbda7 fix async button in manual refresh mode 2024-11-15 16:38:02 +00:00
Richard Cox 1f61ce53cf - Fix issue where list components containing PaginatedResourceTables would incorrectly fetch all resources anyway
- convert reminaing storage lists
2024-11-15 15:40:00 +00:00
Richard Cox bbf4bcd929 Merge branch 'pagination-home-page' into pagination-cluster-explorer 2024-11-14 16:16:17 +00:00
Richard Cox 8e0fabc8ed 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 ???
2024-11-14 16:01:32 +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
Jordon Leach 8edfa0f154
Remove lodash import 2024-10-31 13:08:56 -04:00
Jordon Leach 75f26c4d7c
Replace cloneDeep with deepToRaw method - add nested reactive object case 2024-10-31 13:04:23 -04:00
Jordon Leach 2b55944791
Add deepToRaw method for recursively converting proxy objects to raw 2024-10-31 10:55:00 -04:00
Richard Cox 24f3a76580
Merge pull request #12171 from richard-cox/reactivity
Update model reactivety
2024-10-18 22:02:59 +02:00
Giuseppe Leo ab2244cf8e
Clone of global admin role not a 100% carbon copy (#12235)
* Add comment about the logic behind the goToClone methods

* Remove verbs key manipulation and map verbs with methods

* Add tests to ensure verbs are not manipulated

* Fix linters
2024-10-18 17:45:31 +02:00
Richard Cox 12fa019b53 Remove unused imports, improve const name 2024-10-09 13:40:00 +01:00
Phillip Rak 536bbdd615 Remove duplicate components matched by `require.context()`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-10-08 13:43:40 -07:00
Richard Cox 4d56a7f20e Update model reactivety
- `reactive` was applied to objects that made it into the store via loadAll (or loadPage)
- objects that are assigned to a component `data` object should also be reactive
- however there are scenarios where changes to existing or new properties on these object did not trigger reactivity (computed, watch, etc)
- fix is two parts
  - Ensure all model instances that make it into the store are reactive
    - where we just stick something from `classify` straight into the store... wrap it with reactive
  - Ensure new properties added to a reactive object aren't ignored
    - in `replace` re-reactive the object if there's new properties
2024-10-08 15:41:42 +01:00
Richard Cox a80c921018 Singleton versions fetcher to reduce changes and fix dup versions request on log in 2024-10-02 12:49:39 +01:00
Alexandre Alves 4a4a8cf84d make sure /rancherversion network request is done even if plugins are not to be loaded 2024-10-02 09:47:38 +01:00
Alexandre Alves 43048a2ea1 code cleanup 2024-09-30 18:11:13 +01:00
Alexandre Alves bc51a79005 apply some fixes for extensions logic in light of Vue3 migration 2024-09-30 18:11:13 +01:00
Phillip Rak 0e0a980f8b Replace `useStore` composable with vuex implementation
The `useStore` composable was implemented for Vue2 because vuex did not provide anything for the composition api. Now that we have migrated to Vue3, we have `useStore` exposed to us via Vuex.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-11 09:21:22 -07:00