* add "exludeFields" option on findAll, unit tests.
* fix e2e
* lint fix and e2e test
* updated action unit test and fixed cy.intercepts
* deleted urloptions and test, converted unit tests to ts, removed lodash
* deleted unused urloptions and test
* converted unit tests to ts
* removed lodash
* lint fix
* Added comment with issue for updating query parameters for steve
* Updated based on feedback
* added partial flag to mutations
* pulled out partial flag, excludeOptions logic now entirely within getter
* fixed tests after ripping out partial flag
* Fixed e2e test as 'find' action behavior changed but is still valid
* remove error icon when the condition is Ready and Waiting
* fixed importing clean tooltip directive
* change testing component name
* use replace instead of replaceAll to fix node version support issue on GH's unit test action
* added more unit tests
* import replaceAll polyfill and clean tooltip directive to jest setup
---------
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
* Cleanup code
* Prevent to JSON clone agent config if undefined
* Add clean-tooltip directive to jest configuration
* Remove agent cleanup from the before hook
* Split fetch methods in parts
* Move condition to parent
* Add tests for agent configuration
* SKip test till resolved extra setup
* Updated code comment based on changes
- caused by EXCLUDE_OPERATOR_PKG defaulting to truthy
- which meant no plugins were loaded by the ui
- which meant button to reload ui given changes to plugins was always shown
- when meant extension e2e test that removed plugin immediately used it to reload without waiting for remove to finish
- This occurred because..
- The user tries to access resource with 401 --> onLogout dispatched
- onLogout unbsubscribes to all stores
- stores are waiting for mgmt stores to be ready
- user still redirected to log in page
- user logs in
- mgmt stores ready
- stores now unblocked from waiting for mgmt --> continue in original onLogOut action
- Fix is to ensure we exit the wait early if we get the call to unsubscribe
- 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
- Filtering is now no longer done via `resources.project.cattle.io.`
- No need to update the URL anywhere or massage resources fetched via endpoint
- Also no need to make the planned change to remove `resources.project.cattle.io.` from side nav
> 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>
* fix fleet ui when user does not have permission to greate gitrepo or gitreporestrictions
* remove permission check from gitrepo norepos view
* re-load gitreporestriction schema before attempting to save
* rm unused fleet translation strings
fix fleet workspace banner translation rendering
- add 'showMarkdownLineBreaks' codemirror.js option and 'cm-markdown-line-breaks' class to display markdowns
- add 'styleSelectedText' to highlight selected text.
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
- Use `SteveDescriptionModel` as base of PodSecurityAdmissionTemplate model
- Provide a generic mechanism for model save to tweak the object that's saved
- In SteveDescriptionModel ensure the object that's saved has the correct description
- Save worked for other users of class ... as they saved via norman rather than steve
Tweaks
- Removed duplicate PSACT definition
- Fixed width of PSACT table name / description columns
- Normally we fetch resources and then watch using the revision in that responce
- If we get a resource.stop event we'll then try to find the current revision from the store
- This looks at the type cache's revision and revisions in each resource
- Bug
- the type cache's revision is set updated, which leads to very old revisions being used
- This can cause a `too old` error... which is handeld by refetchin the whole list
- Fix
- Ensure we set the collection's revision when we're likely to need it again
- Tested
- the different find/load store actions/mutations
- this includes incremental loading
- when we recieve a `too old` socket watch error we kick off a resync which will watch with a valid revision
- we'll get a resource.stop event following the previous error. socket is in error though so we correctly abort
- the error for this was misleading
Can be trigger with a fake revision on cluster list
In subscription `watch`
```
if (!trigger && type === 'management.cattle.io.fleetworkspace') {
trigger = true;
revision = 1;
}
```