* update release notes url and whats-new test
* link to latest release notes for rc builds
* fix home page e2e test; update release notes version check to use existing util
- Given forced filtering is now not resource dependent have a high level utils function to determine if enabled
- This should have opened up the door to setting a nicer default then ALL_USER, however it's actually initially applied somewhere other than ns filter
- Fixed a bug where the all option [] was valid
> This uses a new endpoint that has yet to merge. See https://github.com/rancher/rancher/issues/40140
WIP
- Contains console.warns (via custom logger, can be disabled)
- Waiting for final BE endpoint changes to merge
- Contains TODOs to resolve on final enpoint changes delivered
Pertinent Points
- Incompatible with incremental loading / manual refresh
- Harder to get counts (need to sum up from different namespaces)
- Requires use of new steve pagination
- Enforced NS threshold has been removed
- The threshold only applies to the primary resource. This has issues when loading a low count primary (daemon sets) which depends on a very high count secondary (pods)
- Fixing this would involve knowing all secondary resources a list uses, which isn't currently possible (each resource is requested individually, need to know them all first)
- There is no way to subscribe to multiple namespaces (one or all)
- We mock this in subscribe by only persisting changes to resources from within target namespaces
- Everything should work with Advanced Worker enabled
* cluster and rancher stores now use advanced worker
* Addressing feedback
* addressing PR feedback and unit tests
* Fixed sticky footer in Helm Chart Install Yaml (#8497)
* Remove dependency: nuxt
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Remove dependency @nuxt/types
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* fix lint
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Remove dependency: @nuxt/typescript-build
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Remove dependency: @nuxtjs/eslint-module
Remove dependency: @nuxtjs/proxy
Remove dependency: @nuxtjs/style-resources
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* align package.log
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Storybook, add vue-loader dependency
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
* Added placeholder in url input (#8036)
* Added placeholder in url input
* Added format checker for Url input
* Update test
* Fixed lint
* Fixed breaking for other providers
* Fixed lint
* Update vue options to preserve whitespace (#8742)
* Update vue options to preserve whitespace
* Bug fix with tidy-up
* Fix response times for multiple clusters (#8720)
* Update extensions publish workflow for assets in gh-pages branch (#8618)
* Update extensions workflow to move assets into gh-pages branch
Fix gh-pages check
* Move bundle execution - add default basename and ext version
* Fix basename op
* PR changes
* [v2.7] Update Chinese translation (#8731)
* Upgrade to Vue 2.7 (#8654)
* upgrade @vue/cli-xxx
* Update Vue to latest 2.7
* Update eslint-plugin-vue
* Disable new linting rules
* Remove linting issue
* Pin Dom purify library version
* Add resolution to avoid conflicts with packages
* Update yarn/lock after the enforced resolution
* Exclude node 16 types resolution
* Fixed extra space bug in the generic cluster-page (#8626)
* Fixed extra space bug in the generic cluster-page
* Fixed space issue in banner
* Revert changes
* Removed extra div
* Fixed selected rows counter (#8419)
* Fixed selected rows counter
* Fixed lint
* Fixed counter in selection.js
* Small fix in toAdd condition
* Lints
* Fixed condition for selected row counter
* Changes in focusAdjacent function
* Fixed lints
* Improve OPA Gatekeeper constraint detail page (#8586)
This adds the following functionality to the violations list on the OPA Gatekeeper constraint detail page:
* Add a namespace column to the violations
* Make the violations list searchable
* Allow to download the violations as a CSV, similar to CIS scanner violations
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
* Increase memory on build (#8751)
* Remove extension autoLoad functionality (#8700)
* fix(BrandImage): remove async fetch method (#8432)
* Removed hasClass method (#8752)
* Removed hasClass method
* Clean code
* Two minor tweaks
- supported store types now a const
- WORKERMODES --> WORKER_MODES
* Fix two bugs
- Ensure advanced worker runs in cluster manager with no current cluster context
- Ensure `resource.stop` from advanced worker successfully kicks off watch
Also
- make rancher, managment and cluster store names a const
* Tweaks
- Fix some comments (jsdoc --> standard, todos)
- Made the web worker redispatch requirement clearer
* Fix unit tests
* Fix resource.stop / resource.error TOO_OLD bugs
- Persist watcher error state after resource.stop
- this will ensure the resource.stop given alongside the resource.error TOO_OLD is ignored
- Ensure any errors are cleared when we succesfully connect (given above)
- Should fix the next resource.stop being ignored after recovering from TOO_OLD
- Fix resync watch params
- these weren't correct, so the resync after TOO_OLD never worked
- the format could be slimmer, but i thinkg it matches how other socket's data works
Note - I manufactored the TOO_OLD by setting a revision of 1 in subscribe resource.stop if it came from the advanced worker
---------
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
Co-authored-by: richa <richa.bisht@suse.com>
Co-authored-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Jordon Leach <40806497+jordojordo@users.noreply.github.com>
Co-authored-by: vickyhella <vickyhella@hotmail.com>
Co-authored-by: Giuseppe Leo <giuseppe.leo@suse.com>
Co-authored-by: Bastian Hofmann <mail@bastianhofmann.de>
Co-authored-by: LiuYan <361112237@qq.com>
Co-authored-by: Richard Cox <richard.cox@suse.com>
* Add tests to namespace picker for resources
* Get namespaces from state and map to options
* Add comment to the Namespace getter logic in the store
* Hide Rancher System namespaces
* Update existing test
* Add tests for namespaces getter
* Create getter to retrieve readonly namespaces
* Split active namespaces function
* Add fleet filtering logic
* Correct mode for NS component
* Add comment information about restriction for read only
*update docs links in translation file
*update chinese translation doc links
* fetch latest rancher version tag to determine doc url versioning
* fix hardcoded links to 2.6-only documentation
* update doc base url
- When there are over a configurable amount of resources to display in a list force the user to select a single namespace and use it to fetch resources related to the list
- Disabled by default, this can be enabled via the usual Global Settings --> Performance setting as usual
Functional Comments
- Gates for forcing the filter (count, resource type is namespaced, etc) apply only to the resources shown in the list.
- For example PV's aren't namespaced, so no enforced filtering. However they fetch PVC's which are namespaced
- For example we could have 10 resources to show in the list, but the resource types list component fetches 10000 other resources. The secondary resources are not taken in to account
- If we're under the threshold and have fetched all resources, if in that session we go over the threshold we won't fetch NS specific resources (because we have them all already)
- If we're over the threshold and have fetched namespaced resources, if in that session we go under the threshold we will fetch all resources
- If we're over the threshold and have fetched namespaced resources, going to a page that needs them all will result in us fetching them all (for instance from `events` to `cluster dashboard`)
- Deselecting a namespace and selecting it again should not kick off another http request
General Commit Comments
- The threshold to enforce the filter is set at 1500 as per manual fresh and incremental loading
- Optimised some code in ResourceList, resource-fetch and $loadingResources
1) getter of currentCluster will always be false in epinio, this was blocking updating the ns cache
2) getter was incorrect, brought in by bad merge https://github.com/rancher/dashboard/commit/b3f13843dda3450d218
- spent a lot of time working out why this wasn't causing issues in master, but given where/when it's called it doesn't currently make a change
- it might have been different if the cache was fully used though
- Don't cache gc state in store (avoids any chance of prompting change detection when update type accessed time)
- use TS instead of JS where possible
- split out two prompts into own file (on interval and on route change)
Remove resources from the store if they meet certain criteria. This will reduce the memory footprint of the dashboard and load on the backend (less watchers for large collections)
- GC is disabled by default and can be enabled via the Global Settings --> Performance tab
- User can configure
- The age in milliseconds in which a resource has to exceed in order to be gc'd
- The count which a resource has to exceed in order to be gc'd
- GC occures in stores that have it enabled
- ATM this is just the `cluster` store... but could be enabled for dashboard-store's such as the harvester one (one liner plus optional `gcIgnoreTypes` override for ignoring types)
- GC will be kicked off in two cases
- Route Change for a logged in state
- At a given interval
- Resource type _not_ GC'd if
- The store is ignoring the type
- For example the `cluster` store doesn't want to gc things like `schema` and `count`
- We're going to a page for that resource (list, detail, etc)
- For example don't GC pods if we're going to a pods page
- The last time the resource was accessed was recently
- We store the resource accessed time via hooking into actions and getters
- Setting the last accessed time will cause watchers of that type to trigger (only an issue for duplicate watchers)... but importantly not watchers of other types
- The resource is being used in the current page/context
- We store the route changed time and compare it to the resource accessed time
- There's too few resources
- We might as well keep them to avoid a network request to re-populate
// TODO:
- Should additional features be added to preferences
- if GC on route change is enabled
- if GC on interval is enabled, and how often it runs
- Sensible default preferences
- Remove some logging
* Created LocaleSelector component
* Updated backend on lacal changes
* Hide none option in language list
* Fixed hovered state and added down arrow to dropdown list
* Fixed preferences error on login screen
* Corrected order of check
* Added variable to stor value before login
* Fix locale saving when not logged in
* Removed commented code and add comments for variable
* Added loginc in commit for settign user Preference
Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
- my custom way no longer worked
- for some reason checkClusterChanging wasn't firing quick enough anymore
- the order of things looked correct (it should have disabled the outlets via clusterChanging before the auth middleware runs)
- however the old explorer page errored when navigating to something outside of the explorer product
- beef up the simpler route change handler
- add something to try to catch the change of product as well
- uses similar approach, don't show anything until the store is up to date with the route
* routing maybe
* remove nested edit views
* harvester custom routes
* fix loading imported dev cluster
* move harvester-manager hci.cluster type out of harvester pkg
* fixes for build-pkg
* fix harvester custom dialogs
* fix harvester pkg routing
* generateDynamicTypeImport hyphenated dirs
rename cloud_credential and machine_config back to cloud-credential and machine-config
* Appease linting
* Fix epinio pkg build
- Includes fixes for some dashboard component references
* Revert "Receiver credential secrets are deleted when secret is set to none"
This reverts commit 836460e2998959bcda0b14a9f6511f248980b7b5.
* Fix plugin modal cancel button in dark mode
* Ensure correct components loaded when a new version of a plugin is loaded
- The route matcher was never updated with new route-->component values
- This was due to `this.router.options.routes` not containing the result of `router.add`
- See https://github.com/vuejs/vue-router/issues/2280
* Revert "Revert "Receiver credential secrets are deleted when secret is set to none""
This reverts commit e524bb3d40ea7adfe35c38ec7870560625965d25.
* fix harvester manager->harvester routing
* rename dialogs
* move harvester-manager files out of harvester pkg
* Revert "remove nested edit views"
This reverts commit e835835943d63e74c50942884fec3706f8703047.
* plugin validators dynamic import - not working
* fix merge conflict
* fix harvester members
* fix conflict
* custom validators
* harvester table formatters
* members routing
* import path fixes
* harvester mutli load
* Port across tweaks made during dynamic plugin work
- harvester plugin can be bundled with the dashboard until dynamic work has been completed
- Nav directly to virt cluster dashboard instead of via /harvester-c-cluster
- Fix missing bottom border on virt cluster list, hide actions (as they're never populated)
* move config/settings and config/harvester-map
fix hci setting custom components
* fix harvester setting import path
* Move over SerialConsole and Novnc, remove harvester.notifications
- These components were so 1-1 with harvester in the end i moved them over
- Also removed the like-for-like generic.notification `harvester.notification` strings
* Remove isSingleVirtualCluster, most of isMultiVirtualCluster
* Fix two nav issues
- harv cluster members --> prefs --> click on-screen back
- dashboard --> prefs --> click on-screen back
Both of these would be better fixed by an incoming change to the default layout (don't show old content before switching page)
* Fix reload of project/namespace page
* Split out project namespace into it's own component (1 or 2)
* Split out project namespace into it's own component (2 or 2)
* use product hideSystemResources opt instead of isVirtual/product===virtual
* fix missing prop in header
* Move FilterLabel and CloudInitType to harv pkg + two other references
* Move Harvester Upgrade components to harv pkg
- Needs a review with Neil regarding generics
* rebase build+load not working
* fix harvester route in authenticated
* Experimental Changes
* Fix merge conflicts
* WIP Fix routing
- includes project/namespace and namespace pages
* Tidying up
* Move harvester core store to plugin, remove harvester code from authenticated flow
- harvester store is a steve store that now lives in the plugin
- harvester `loadVirtual` replaced with a shortened `loadCluster` in it's own store
- Also fix xterm css import
* Fix three routing related bugs
- Fix project/namespace create/edit/cancel/done flows
- Update harvester's loadCluster to better match loadCluster
- Make edit namespace page project resource agnostic
* Build fixes
* Fix create namespace button and other tweaks
* fix two issues with nav out of imported harvester cluster
* Fix alignment of action menu button
- Used in many places
- all generic table action menus
- global settings --> settings
- rke1 cluster detail page machine pool group actions
- project/namespace list project group actions
- resource detail page action menu
* Revert changes to app and pkg creators
- This should fix `check-plugins-build` gate
- It does hide the underlying issue, but that won't have been brought in by this PR?
Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
- harvester store is a steve store that now lives in the plugin
- harvester `loadVirtual` replaced with a shortened `loadCluster` in it's own store
- Also fix xterm css import
- Caused by `filteredRows` running causing `getActiveNamespaces` to run.. which in tern triggers other table's `filteredRows`, etc
- Fix is to only update `activeNamespaceCache` if there were actual changes
- Tested
- ns detail page
- project/namespaces list
- fleet resources
- fleet resources where there are only 1 entry in two workspaces
- fleet workspace switch toggles straight between 2 selections
- this results in the case that the row count doesn't change
- the `activeNamespaceCacheKey` cache is used to cover this case
- this was broken given in original pr and after my suggested edit
- This was broken by https://github.com/rancher/dashboard/pull/6261
- The `activeNamespaceCache` depends on the product (fleet requires workspaces, everything else namespaces)
- This needs updating when going to or from fleet
NOTE - On `head` (but not `ui-dashboard-index` `latest`) refreshing on the explorer pods page does not show the correct namespace filtered pods
Small tidyup for `activeNamespaceCache` and `activeNamespaceFilters` getters