Commit Graph

78 Commits

Author SHA1 Message Date
Neil MacDougall 0df4379238
Dynamic content (Part 1) (#15343)
* Initial version

* Fix lint issues

* Tidy ups and lint fixes

* Add some notes

* Localisations

* Avoid using general 'actions' class name

* Further fixes

* Remove test code

* Address feedback from walk through

* Add test ids and updated e2e tests, fix lint

* Work around version issues

* Update .gitignore

* Remove dev readme file

* Add simple developer docs, update type comments, bump icon package version number

* Address PR feedback

* Address PR feedback 2nd round

* Fix lint

* Use user id hash in the local storage key

* FIrst version of dynamic content

* Revert merge errors

* Fix merge errors

* Fix bad merge

* Proper merge revert

* Factor out system info for clearer code

* Tweak

* Tweaks to config

* Fix lint

* Tidy ups, better types and more documentation

* Add support for settings

* Improve docs

* Remove unnecessary try catches around window.localStorage

* Tidy up config and settings types

* Update config to allow us to test this, off by default

* Addm LTS, remove debug content (will do this differently)

* Add unit tests

* Update unis tests

* Fix unit tests

* Tidy ups

* Add check for release info being an array

* Use CDN endpoint

* Update to use final endpoint and updates comments for yaml or json

* Add server version type

* Fix first round of PR feedback and update tests

* Address PR feedback

* Ensure content is always returned as text

* Address PR feedback

* Unit test updates
2025-10-22 11:05:46 +01:00
Alexandre Alves 0f967a9692
Session Idle feature refactor (#15509)
* redoing PR without changes

* fix stash apply

* fine tuning inactivity logic + add missing change to deprecate inactivity  performance setting

* update inactivity utils module to a singleton + fix e2e test

* fix e2e test

* fix e2e test

* fix e2e test

* finally fix session idle e2e testsg

* update PR based on comments

* update PR based on comments

* updating logic to inactivity

* fix broken e2e test + remove console logs
2025-10-22 10:07:09 +01:00
Richard Cox 5803c9f4fc v4 2025-10-14 11:49:13 +01:00
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 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 c87d218c36 Merge remote-tracking branch 'upstream/master' into pagination-extensions-resource-enable 2025-10-03 09:25:12 +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 9fe21d8143 Fix disabled extension test involving PaginatedResourceTable
- this previously failed, re-enabled and resolved issues
2025-09-25 12:24:36 +01:00
Richard Cox 251fef5d8f Merge remote-tracking branch 'upstream/master' into pagination-fix-cluster-watch 2025-09-23 13:58:43 +01:00
Evgeniya Vashkevich ffd35563bc
Added providing credentials from extension (#15245) 2025-09-15 14:56:06 -07:00
Richard Cox cfd20e16b7 more tidying 2025-09-05 16:31:59 +01:00
Richard Cox 2230b97cea more tidying 2025-09-05 15:31:26 +01:00
Richard Cox 8c22f2b212 tidying up 2025-09-05 11:18:32 +01:00
Richard Cox 295b410194 big refactor, untested 2025-09-05 11:18:32 +01:00
Richard Cox 78bc66e1dc more tidying 2025-09-05 11:18:32 +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
Phillip Rak 4d64d2a56e Rename `Plugin` type to `ExtensionManager`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-08-20 16:10:38 -07:00
Phillip Rak 02c5258c8f Create plugin composable
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-08-20 16:10:37 -07:00
Jiri Tomasek c5b4d8114e
Handle UI plugins with chart version and appVersion not matching (#14207)
* Handle UI plugins with chart version and appVersion not matching

This change adds handling for UIPlugins which are installed from charts
where chart version and chart appVersion don't match.

- Determine plugin upgradability by comparing UIPlugin version with chart appVersion
with a fallback to chart version if appVersion is not available
- Update PluginInfoPanel to handle plugin version not matching chart version by checking
appVersion first
- Update InstallDialog to handle plugin version not matching chart version by checking
appVersion first
- Display plugin versions in `appVersion (chart version)` format if appVersion differs
from chart version

Fixes issue https://github.com/rancher/dashboard/issues/14204

* Add tests for uiplugins chartversion utils
2025-07-31 14:52:21 +01:00
codyrancher b4aeda9438
Putting in an override for no-unused-vars in regards to .d.ts files (#14961)
Fixes #9746
2025-07-30 08:03:55 -07: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
Neil MacDougall 533bcb3ec2
Notification Centre: Update 3: Simplify storage/encryption in local storage (#14642)
* Simplification of encryption

* Address PR feedback
2025-07-02 08:22:58 +01:00
Neil MacDougall 59a08dfa07
Add support for vue route and extension init (#14590)d
* Add support for vue route and extension init

* Fix lint

* Minor doc fix, fix issue with buttons when scrolled

* Ensure onReady is only called once

* Address PD feedback

* Address more PR feedback - simplify close on action

* Add support for vue route and extension init

* Fix lint

* Ensure onReady is only called once

* Address PD feedback

* Tidy ups

* Add one missing tidy up
2025-06-26 16:40:12 +01:00
Francesco Torchia 2924cd9723
Merge pull request #14525 from torchiaf/13924-cluster-targets
Fleet add Cluster targets Match Expressions
2025-06-20 17:48:14 +02:00
Neil MacDougall a0d725938c
Add Notification Center (#14419)
* Initial version

* Improve growl integration

* Fix lint issues

* Tidy ups and lint fixes

* Add a maxiumum number of notifications

* Add some notes

* Localisations

* Avoid using general 'actions' class name

* Remove clear all button

* Further fixes

* Remove test code

* Always show a read notification indicator

* Address feedback from walk through

* Add test ids and updated e2e tests, fix lint

* Bump version number to match backend

* Work around version issues

* Fix lint issue

* Fix e2e test

* Fix release notes seen issue breading login landing page

* Update .gitignore

* Remove dev readme file

* Remove todo and tweak comments

* Add simple developer docs, update type comments, bump icon package version number

* Update lock file

* Address PR feedback

* Address PR feedback 2nd round

* Fix lint

* Fix broken import

* PR feedback

* Used partial

* PR review feedback

* Use user id hash in the local storage key

* Encrypt the notifications in local storage

* Remove persist stuff from store

* Fix bug with initialization of the store and release notes

* Bug fix - store encryption key

* Debounce setting of notifications to avoid loop
- tab 1 can fight tab 2 if tab 2 progresses whilst tab 1 processes stale content

---------

Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-19 19:47:50 +01:00
Francesco Torchia 1a6c154a47
Fleet add FleetClusterTargets component and wire it in GitRepos and HelmOps
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-18 15:46:41 +02:00
Francesco Torchia 81b7956ff5
lint
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-18 11:16:02 +02:00
Francesco Torchia f760e562c4
Fleet HelmOps various fixes
- types refactoring
- fix workspaces check
- add typescript

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-06-18 11:16:01 +02: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 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 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
yonasberhe23 d3024525bb add accessibility test coverage 2025-05-19 09:23:39 -07:00
Richard Cox c11db5c4a4 Updates following PR review
- gate incremental page by page number on is steve url + is steve cache enabled
- update incremental object property names, document
- remove fix for event lister errors
- add generic getters to help determine if steve behaviour should be used (getters will also be used in future PR)
2025-05-12 16:35:04 +01:00
Richard Cox 5b59f0edec Merge remote-tracking branch 'upstream/master' into pagination-with-incremental 2025-05-07 14:44:12 +01:00
Francesco Torchia 9ff31fa071
Merge pull request #14124 from aruiz14/fleet-deprecate-resourceKeys
Use BundleDeployment status for showing Bundle resources list
2025-05-06 23:29:24 +02:00
Jordon Leach 7e58161982
Initial `$shell` api - add `ModalManager` and `SlideInPanelManager` (#13840)
* Initial $shell internal-api - Add ModalManager and SlideInPanelManager components

* Use Teleport for Modal and SlideIn managers - Add unit tests

Unit test fix

* Add focus trap and tabindex to Modal and SlideIn managers
2025-04-16 15:09:05 -04:00
Alejandro Ruiz 1e0cfc0651 Deprecate unused functions and types 2025-04-15 10:29:07 +02:00
Jordon Leach 562c32df73
Add internal api scaffolding and documentation (#13839)
* Add internal api scaffolding and documentation

* Fix docs build

* Refactor `apiName` to a static method for proper enforcement

* Restructure idea around ts augmentation for internal apis
2025-04-14 13:11:47 -04:00
Richard Cox 64590dfc2c Remove SSP performance setting enabled/disabled flag, only use FF 2025-04-10 10:29:15 +01: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
Alejandro Ruiz 8c49d0c0e1
Merge branch 'master' into perf-improvements 2025-01-24 10:23:25 +01:00
Alejandro Ruiz db7f9b52d6 Use BundleDeployments to calculate Bundles summary 2025-01-23 18:41:02 +01:00
Richard Cox 8ff97aaf60 fix linting 2025-01-23 17:17:35 +00:00
Richard Cox c19aabe62c Move PaginatedResourceTable and ResourceLabeledSelect to type file, improving naming 2025-01-23 17:06:08 +00:00
Phillip Rak a47c507533 Update vue shims
This updates the augment from `@vue/runtime core` to `vue`.

See: vuejs/router#2295

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-01-16 14:28:43 -07:00
Richard Cox 8dcc72299b Two side nav improvements
- Reduce the flicker of cluster icons when the top level menu component is recreated given a change to the page's layout
- Add finer changes and comments to reduce churn from user / system changes to resources
2025-01-06 13:48:43 +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