* Heavy code cleanup: move function to utils, config and types to their own file
* Add fallback and tests for version comparison not retrieving values
* Fix refactoring
* Add partial case of array filterBy
* Replace multiple functions handling the same case with single getter; add covering tests
* Add no parameter case to be correctly handled
* Add case with different chart values, e.g. Epinio issue case
* Prevent issues if retrieved version is undefined; Add unit tests for upgrade cases
* Filter out charts if lack parameters
There are certain scenarios where we want to apply hooks, but it might not make sense to apply all of them. For instance, we have `_beforeSaveHooks` hooks that we want to apply when the "Edit as YAML" button is clicked on a form, but it doesn't make sense to apply the `save-machine-pools` hook at this point; we are only changing the mode of editing so we should not be saving changes at this point. However, we still would want to apply the `set-registry-config` hook.
Co-authored-by: Richard Cox <richard-cox@users.noreply.github.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
- fixes issue in handleConflict that meant
- conflicts were not detected
- non-conflicting changes were not applied to users resource
- see #9597 issue description for more detail
- white page errors should not be visible in prod
- these were were enabled in all envs via the port of shell/initialize/client.js after nuxt
- that came from the output of a template
- the template has some features on via debug state when built
- we now disable these features in prod
- Additionally..
- set some process values that were being skipped but still used
- always log uncaught errors in `fetch`s. in theory we should be monitoring $fetchState.error but we never do. this has led to some painful debugging with customers
* Move persistent volume constants and configurations away from model
* Add fallback for drivers with name only
* Enable support for CSI volume
* Prevent errors if no name is provided for route in CRUResource method
* Update test to check plugin options and value
* Update i18n
* Add support for Pay-As-You-Go (PAYG) CSP billing adapter
Also check for the `rancher-csp-billing-adapter` for PAYG offering.
* Only run through apps list once, fix fresh install issue
- Make the check for csp app common
- only loop through apps once
- fixed an issue where new users with no v3/settings/ui-brand value would not get their suse brand
- tested by checking for `ui-plugin-operator` app
* Fixes following merge conflict
* Only run through apps list once, fix fresh install issue
- Make the check for csp app common
- only loop through apps once
- fixed an issue where new users with no v3/settings/ui-brand value would not get their suse brand
- tested by checking for `ui-plugin-operator` app
* Only run through apps list once, fix fresh install issue
- Make the check for csp app common
- only loop through apps once
- fixed an issue where new users with no v3/settings/ui-brand value would not get their suse brand
- tested by checking for `ui-plugin-operator` app
* Fix excpetion thrown during setup flow
* e2e: improve user avatar toggle
* revert force click change
* Beef up home page goToAndWaitForGet
* Beef up home page goToAndWaitForGet
* Revert "Beef up home page goToAndWaitForGet"
This reverts commit 125a478daf.
* Revert "Beef up home page goToAndWaitForGet"
This reverts commit d771f88b7d.
* Revert "revert force click change"
This reverts commit ca57ae6768.
* Revert "e2e: improve user avatar toggle"
This reverts commit 90fa05dc9e.
* Revert "Fix excpetion thrown during setup flow"
This reverts commit 8bad76b99e.
* Fixes after merge
* Fixes after merge
---------
Co-authored-by: Richard Cox <richard.cox@suse.com>
- if we have the brand and that brand value is not what we want it to be... set it
- if we use brandSetting?.value a falsy brandSetting would result in the code below triggering
- ui-brand setting comes from the existence of a helm app
- this was broken for the initial case (there is a brand... but no brand setting
- cause by a computed property not re-running given change after `fetch`
- fixing this reactivity exposed some other scenarios where we need to be safe
- for instance when logged out, or in the process thereof
* Extension support for custom provisioning
* FIx lint issues
* Discovery / Tweaks
- fix issue where namespacesOverride was lost
- tidy up PROVIDER
- try to handle missing provider=type url param (could be missing extension-params)
- added a few comments to comments to come back to
* Names and typings
- change param --> customParam to make it clearer it's not url params
- add labels-annotations to shell types
* Wire in provider detailTabs
- as per original readme this should be made generic (extension point working directly with ResourceTabs)
* Update IClusterProvisioner & docs
* Improvements / Changes to support proving out DO extension
- cluster hooks optional
- buff up save hook (and pass in cluster when calling apply fn)
- move normalizeName into generic place
- bring back async create machine config
- hack for do extension (map example provider to do provider)
* updates, add optional saveCluster, add missing kube file
- saveCluster complements hooks, doesn't skip handling of addons, etc
- ensure register hooks take the `this` context in all worlds
* Adding docs
* Updates
- location config based changes
- change customParams to context
- add query param
- add new extention point to add tabs to cluster create cluster config section
- fixed some typing
- fixed issue where cluster was not passed to before / after hooks (only important if 'this' changes
* Changes following review, fix `t` in plugins
* Fix linting
* Docs updates, pass through more edit/view things
* Conditionally show the namespace grouping in the cluster list
- means users can differentiate between clusters with same name in different namespaces
- useful when clusters created via extension provisioner where ns can be selected
* docs tweaks, actually include the provisioning page in docs
---------
Co-authored-by: Richard Cox <richard.cox@suse.com>
- Moving the store setting to enable/disable filtering in the store to a function in a computed property caused havoc for churn
- Make this much neater by moving flag to the setup stage for both ns filter
- 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
* update resource fetching on list views so that secondary resources follow the logic of manual refres
h and/or incremental loading if the main resource defines it
* Update resource-fetch logic to take into consideration the storeType for each individual request + fix logic regarding namespace for fetching resources + update missing resources logic (nodes and prov clusters)
* fix tipo
* reinstate hash system to handle requests for nodes and prov cluster lists
* revert mutation code + add check to register type if it doesnt exist on loadDataPage action
* fix issue with timeout that wasnt working properly for the update of live and delayed cols after manual refresh
* Take in to account the per resource count when calculating `limit`
- This means primary resources with a smaller amount don't restrict secondary resources with larger amounts
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
* Add PSA resource model, edit, list, types, config, utils and navigation
* Remove controls sorting from config file in PSA form due unnecessary added logic
* Add missing type to exemptions
* Remove component specific grid alignment styling
* Add meaningful values on PSA form tests
* Add prefix for the namespace PSA form
* Correct PSA form test
* Revert RKE cluster erroneous changes
* Rename all the PSA form values to match specification and avoid issues
* Create function to convert array to dictionary
* Add types and replace function with utility in PSA form
* Trim exemptions values for PSA form
* Correct util test and function
* Enable YAML editor for PSA resource
- caused by circular dependency of
- index.vue --> resource-fetch mixin --> resource-fetch-namespaced mixin --> index.vue
- not sure why the works on most pages... but bugs out for this one... but the fix makes sense
The catalog.cattle.io.clusterrepos/{repo} resource doesn't subscribe to updates. We now force a full request in the areas where it's appropriate to do so.
fixes#7668
- This might be possible (as fleet workspaces are similar to namespaces
- To address though would need to re-fetch resources when workspace changes
- Currently when ns changes we always go to an invalid state first
- Single NS (show list & fetch resources) --> Multiple NS (hide list) --> Single NS (show list & fetch resources)
- For workspace we skip the middle part and don't fetch with latest
- 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
* update url for namespaced requests for secondary data
* remove unnecessary type and id setting on resource-manager as for all requests now come from Steve api + fix issue where changing namespace on workload creation would cause an error on PVC because of undefined value
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
* Convert Rancher settings into Typescript and add interface
* Allow Rancher settings to be validated
* Add Rancher Settings min password length validation
* Replace settings number input with labeled input of type number for validation; Added missing required, focus, locale and labels attributes
* Add min/max/between value/length cases to global validation cases
* Correct validation syntax
* Add tests for the global settings
* Correct naming and assign directly rules to the inputs
* Create initial tests for CreateEditView
* Prevent Settings view to break if no setting is found for given ID
* Add max password length validation
* Add i18n to settings validation
* Add form validation to the CRUD component
* Prevent form to fail for resource types without validation
* Add test for no validation cases
* Remove form validation in favor of local view logic, due complexity issues
* Correct validator linting issue
* Correct i18n; Add types; Correct min/max/between validations i18n and combine the last
* Add translation type
* Correct validation translation types and definitions
* Replace custom validations with predefined rules
* Reintroduce form validation in abstracted configuration to pass settings through
* Add tests for new generic form validations
* Correct between values and length validation
* Split tests to use pre-existing rulesets due complexity and different cases
* Cleanup jsdoc in form validation
* Cleanup form validation mixin
* Add global settings test for generating rules from config
* Replace value.value with value for validating the resource
* Correct validation call and test instantiation
* Add note about value.value exception
* Disable faulty test due lacks of information
* Replace min/max value validation with between
* Add missing type for settings getter
* Move type folder within shell
* Move settings logic from config to utils