Commit Graph

77 Commits

Author SHA1 Message Date
Richard Cox 2c337d5b16 Merge remote-tracking branch 'upstream/master' into pagination-home-page-alt-list 2025-10-10 10:01:38 +01:00
Richard Cox 966a7a4c46
Merge pull request #15534 from richard-cox/pagination-extensions-resource-enable
Allow extensions to enable server-side pagination for new resource types
2025-10-07 13:39:35 +01:00
Richard Cox d58e8182d0
Merge pull request #15392 from richard-cox/update-event-sort-order
Table Sort Improvements
2025-10-07 11:00:30 +01:00
Richard Cox 4305bcb0ba Merge remote-tracking branch 'upstream/master' into pagination-extensions-resource-enable 2025-10-06 11:20:05 +01:00
Richard Cox a90029638a
Re-enable vai support for side nav and home page cluster lists (#15262)
* generic changes from https://github.com/rancher/dashboard/pull/14492/files

* VERY WIP
- move out watch event stuff into own file
- improve typing
- start resolving core unwatch & unwatchIncompatible of side nav cluster watches (not going to store) being seen as incompatible with find cluster action that does go into store

* very wip, vaguely working

* starting to tidy up

* more tidying

* wip - pre-pivot

* maybe...

instead of upfront unwatch with lots of complicated logic... only do it if we hit the issue (i.e. no page entry into page )

* tidying up

* asd

* Remove now uneeded sideNavCache

* big refactor, untested

* tidying up

* tidying

* more tidying

* more tidying

* add some super basic unit tests, fix another

* remove debug logger and last todos

* more unit test fixes

* Fix two bugs, and fix e2e tests
- we don't always have the mgmt cluster, so take this into account
  - i've checked all usages of `['management/byId'](MANAGEMENT.CLUSTER`

* more e2e fixes

* Tidying up following review
- more comments
- rename of method to something more sensisble

* Disable support for ssp in side bar and clusters
2025-10-06 09:47:58 +01:00
Richard Cox 5accc8cfa9 Show alternative restricted, locally paginated home page cluster list
- show alt list only if vai is on and there's more than X total clusters
- list contains Y rows fetched via vai requested (capped and sorted)
2025-10-03 14:53:58 +01:00
Richard Cox d6471d6e77 Disable support for ssp in side bar and clusters 2025-10-02 14:17:04 +01:00
Richard Cox 539d61dbd9 Allow extensions to enable server-side pagination for new resource types
- previously only completely generic lists were supported in extensions (i.e. no custom list component or custom headers)
- now we allow extensions to explicetely state a resource type is enabled
  - this type MUST have pagination settings applied either via product or component config
2025-09-29 15:06:43 +01:00
Richard Cox dacccbc659 Update addTableColumn to support server-side pagination definition
- add additional config to be used when ssp is enabled
- this is designed to support running old extensions in new dashboard
  - they should also support running the stale ResourceTable as well

Additionally
- update list of compatible columns to search/sort on given BE fixes being resolved
2025-09-26 13:29:55 +01:00
Richard Cox 8044d08d8e Tidying up following review
- more comments
- rename of method to something more sensisble
2025-09-23 14:10:51 +01:00
Richard Cox da2484b0cb Sort Improvements + Fix Events SSP sort
- Apply SSP sort order with generic `:desc` notation,
- Allow headers to provide default sort order
- Ensure SSP first seen and last seen column sorts behave the same
2025-09-11 11:16:46 +01:00
Richard Cox a8fb3efbfd Fix two bugs, and fix e2e tests
- we don't always have the mgmt cluster, so take this into account
  - i've checked all usages of `['management/byId'](MANAGEMENT.CLUSTER`
2025-09-08 16:56:46 +01:00
Richard Cox 166e8cb9f0 VERY WIP
- move out watch event stuff into own file
- improve typing
- start resolving core unwatch & unwatchIncompatible of side nav cluster watches (not going to store) being seen as incompatible with find cluster action that does go into store
2025-09-05 11:18:32 +01:00
Richard Cox a8ce915fdc generic changes from https://github.com/rancher/dashboard/pull/14492/files 2025-09-05 11:18:32 +01:00
Richard Cox eb1c08032f
Project Scoped Secrets (#14772)
* rename variables

* change button names + fix import

* apply pagination to secrets

* Major Changes

- secrets and project scoped secrets are now two pages
  - this fixes the issue where resource-fetch and associated mixins just fail with two of the same type on page
    - incremental loading would have been broken for both
- project scoped secrets
  - now correct lists upstream secrets that a project scoped based and on the target cluster
    - lots of work to get CRUD for management secrets in explore/cluster world
    - also includes a specific page to override the store for create/edit/view
  - these are now correctly grouped by project
  - updated to work with SSP enabled
- secrets list
  - shows if the secrets comes from a project
  - shows if the secret is a project scoped secret (only used on upstream cluster)
  - updated to work with SSP enabled
  - disabled update/delete of secrets created from project scoped (these just reset when sync runs again)
- disabled new detail view
  - this is broken, it ignores both storeOverride and currentStore, always going to `cluster` store


TODO:
- mostly testing
- blocked on some BE issues (bugs, additional indexed field)

* ... progress. will update commit message

* Revert "Merge pull request #14748 from richard-cox/revert-project-secrets"

This reverts commit be3962261d, reversing
changes made to 62d80084d9.

* tidy, and remove e2e

* test fixes

* fix vai group by

* Fix for grouping (secrets --> group by namespace --> pss --> table is incorrectly grouped but toggle is correct

* fix warning

* fix clone/yaml, fix default/system pss

* don't fetch projects, it wipes out header. this means in upstream we won't show project names for pss downstream

* fix lint

* fix ts complain

* Tweak column tooltips

* Add cypress logs for failing tests

* pipe in `inStore`

* tweaks to cypress logs process
- better name
- log http requests
- only create logs if run failed

* Secret selector improvements and test fixes
- don't cache or watch secrets if we're showing multiple selectors on a page
- ensure we classify secrets (make it into an instance of a model)

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
Co-authored-by: momesgin <mo.mesgin@suse.com>
2025-07-15 08:27:26 +01:00
Richard Cox ce70f83265 Primary change - Fix and improve labelSelectors and vai auto updates
- labelSelector has two primary applicators
  - matching utils function
    - this should normally NOT be cached and not receive updates over sockets
    - this is done by stipulating transient = true
  - findLabelSelector
    - this should normally be cached and receive updates
    - this is done by stipulating transient = false
    - when applicable (workload and services detail page) we want live updates whilst we're on the page
      - we don't when we leave, so unwatch
- fix and align these two and their usages
  - ensure each input (transient) is correct for context
  - ensure response is in the correct format and handled correctly
- improved typing

Additionally
- Improve labelling for network policy ingress/egress label selectors
- Replace empty table with 'no details' in cis report detail page's list's sub row
- On services page handle the very weird use case of no visibility on pods
- Fix issue where extension catalog was not showing when refreshing on extension catalog page list
- Fixed an issue where we would ALWAYS show false positive invalid field warning in console
- Bump up default page size from 10k to 100k
  - this is for requests we make to the new vai cache outside of pages
  - it matches the default they use when proxying requests to target kube cluster
2025-07-03 14:25:37 +01:00
Richard Cox fd92fbe93c
Merge pull request #10435 from richard-cox/optimise-branding-apps-fetch
Fetch only specific csp adapter helm apps... instead of all helm apps
2025-06-23 09:13:31 +01:00
Richard Cox 25a8573c08 Remove `=` from ssp search term filters 2025-06-20 11:19:35 +01:00
Richard Cox 9795943139 Merge remote-tracking branch 'origin/pagination-disable-clusters' into optimise-branding-apps-fetch
# Conflicts:
#	shell/plugins/steve/steve-pagination-utils.ts
2025-06-11 18:35:10 +01:00
Richard Cox 37e233194a Merge remote-tracking branch 'upstream/master' into optimise-branding-apps-fetch 2025-06-11 18:34:08 +01:00
Richard Cox c0dd86096b Disable SSP for side nav and home page cluster list
- See https://github.com/rancher/dashboard/issues/14493
2025-06-11 18:12:25 +01:00
Richard Cox 75afc17979
Handle new vai-on updates to resources (#13150)
* port of wip

* asdassad

* Update vai / sql cache based api filtering to match latest changes

* Revert "Pin Rancher version to v2.11-2053ce644a31cd8053d1f58e2487154b0b8513b6-head for e2e tests"

This reverts commit 60f62107e7.

* sdfdsf

* dsfdsf

* asdsad

* fix dynamic hide local cluster changes

* improvements

* aaaa

* Working through todo's/tidys

* Remove debug / tidy up

* resolving todos

* remove some debug

* Tidying up #1

* Make manual refresh and auto-refresh visible on perf setting, disabled by default

* Remove dev stuff

* Fix some e2e tests

* Updated comment

* Wire in resource.changes debounce, clearer label for feature `listAutoRefreshToggle`

* Temporarily disable all watches when vai enable
- remove once rancher/rancher#40773 is resolved, which will then finally fix #12734

* Revert "Temporarily disable all watches when vai enable"

This reverts commit c708f468e4.

* Fix nextResourceVersion
- Ensure it handles resource revisions (in both LIST or individual resources) that are strings
- add unit tests

* Update after review
2025-06-11 18:11:35 +01:00
Richard Cox d870c07cf1 Finish testing, fix search services, reference new rancher/rancher issues 2025-06-03 13:20:25 +01:00
Richard Cox 2a518c33f8 Update given BE progress 2025-06-03 09:58:47 +01:00
Richard Cox bbd8ee7eb8 Fix failure to fetch workload resources in monitoring chart install
- with vai on the filter fields need to be defined
- blocked on https://github.com/rancher/rancher/issues/48603
2025-06-03 09:58:47 +01:00
Richard Cox 138ab7783b Fix harvester machine config options
- machine config reaches out to specific downstream cluster with hardcoded urls
- vai on world needs to construct url with vai filters though
- previously these required cluster schemas (missing for cluster management pages)
- now they're schema missing safe
2025-05-29 15:55:19 +01:00
Richard Cox 91bd67fab4
Merge pull request #14313 from richard-cox/pagination-depaginate
Ensure features outside of SSP continue to work with ui-sql-cache on
2025-05-29 15:32:05 +01:00
Richard Cox e63c83483a Quote filter values that contain special characters 2025-05-28 13:31:30 +01:00
Richard Cox c446b7aff6 Merge remote-tracking branch 'upstream/master' into pagination-depaginate 2025-05-28 12:10:49 +01:00
Richard Cox 7bc66ab90d fix tests, more lint fixes 2025-05-28 12:05:48 +01:00
Richard Cox 980d4b06d9
Integrate new label select filtering (#12919)
* Test / Wire in new label filtering to limited places

- Wired in to
  - Workload detail page - pods and services (broken due to reverse selector)
  - Service Detail - Pods List
  - Service create/edit - Pod selector tab
- Also
  - Fix showPodRestarts in random location
- TODOs
  - Lots of testing / validation required
  - reverse deployment --> service selector (not services given deployment, but for each service contains pods from deployment)
  - workload model usages of pods getter
  - services model usages of pods getter
  - many many more....

* wired in, NOT tested

* improvement

* sdfdsf

* ryrty

* werer

* The great test off begins

* testing and tidying

* testing and tidying

* First good run

* tests, fixes and improvements

* updates

* Tidying up

* Fixes (namespace orientated), tweaks, updates

* Fix unit test

* Fixes for vai off

* Re-write `matching`
- handle namespaces better (given if the resource is namespaced
- better align with legacy matching fn (given specific scenarios that should return none or all)

* Lots of fixes, but mainly vai off --> pods list --> deployment detail --> pods list updates correctly

* fix lint, unit test

* e2e fix

* Fix weird plugins build validation failure (TS error on expected param for JS method with a default)

* Fix workload services

* changes following mini code review

* Only show pods tab if workload type supports it, always show pod resource table if tab is shown
2025-05-28 11:17:25 +01:00
Richard Cox 20e7af3e59 Merge remote-tracking branch 'upstream/master' into pagination-depaginate 2025-05-28 11:09:25 +01:00
Richard Cox 587d90f28e changes following review 2025-05-14 15:55:59 +01:00
Richard Cox 3f977655ef Revert changes related to projects in local cluster 2025-05-14 15:35:55 +01:00
Richard Cox 573a6f630c Handle de-pagination, plus mimic non-vai default `limit` and avoid unlimited response count
- steve depaginate is used by cluster and project bindings, snapshots
2025-05-08 17:33:47 +01:00
Richard Cox 5a07a5ff90 Fix two vai on pagination issues
- Header project/ns filter was broken (changes mostly in mixin)
- incorrect resource filtering in local cluster given obsure or system namespaces
2025-05-01 18:10:59 +01:00
Richard Cox 91486e17d4 Updates 2025-03-10 15:19:36 +00:00
Richard Cox 3afaaccaff Wire in sorting/filtering clusters on on new human name label 2025-03-10 15:19:10 +00:00
Richard Cox e1ce7750ab Ensure new filtering syntax is used and enable vai tests again 2025-03-04 13:54:07 +00:00
Richard Cox de82273de8 Address failing plugin builds TS failure
error  in ../../shell/plugins/steve/steve-pagination-utils.ts:37:50

TS2339: Property 'name' does not exist on type 'Namespace'.
    35 |       if (hideObscure || hideSystem) {
    36 |         res.push(PaginationParamFilter.createSingleField({
  > 37 |           field: 'metadata.namespace', value: ns.name, equals: false
       |                                                  ^^^^
    38 |         }));
    39 |       }
2025-02-27 09:00:38 +00:00
Richard Cox ef05aab4f4 Update pagination settings (almost) ready for production
- 'almost' applies to enabling SSP by default
- Previously the ui-performance object contained a required set of resources to apply SSP to
- This isn't workable going forward where the available resources will be updated between versions
- Now the default is to use a set of default resources which can change between versions
- Users can override if they wish
2025-02-27 09:00:38 +00:00
Richard Cox 6913c70097 Fix to track backend changes for exact/partial matches 2025-02-26 14:54:31 +00:00
Richard Cox 7f2c00143e Wire in newly supported mgmt cluster status.connected property 2025-02-26 14:54:31 +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 cb87aa3b6e Remove ununused component, tweaks, update ResourceTabs events to be super ok 2025-01-07 15:31:15 +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 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