* 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
* 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>
- 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
* 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
* 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
* Add hooks to support virtual clusters
* Fix lint issues
* Refinements
* Update for Vue 3 changes
* Fix import
* Minor tweaks
* Fix bug causing e2e tests to fail
* Fix lint issue
* Rename internal properties and ensure they don't break clone/save
* Ensure we generate types for the plugins package to give us access to mapDriver
* Simpler approach
* Fix lint issues and add type
* Remove unused code
* Revery unnecessary changes
* Bug fix for finding model extension
* Factor out string constant and add provider display method
* Add experimental to API
* Update typegen.sh to use SHELL_DIR var
* Move type def
* Fix lint issue
* Address PR feedback
* Update steve-class.js so we always get an array
* Fix type definition
* Add comment about the logic behind the goToClone methods
* Remove verbs key manipulation and map verbs with methods
* Add tests to ensure verbs are not manipulated
* Fix linters
An error occurred logging in: proxy must report the same value for the non-writable, non-configurable property '"$ctx"'
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
* Removing everything related to scrollTrigger.
The latest vue router seems to behave exactly as it does with the modified scrollBehavior so it can all be removed.
* Removing unused $nuxt.{suffixes} that I found
- routeChanged (didn't find any watches of this event)
- nbFetching (The only place reading this was a computed property which wasn't used anywhere)
* Replace the use of Vue[installKey]
* Removing some ssr rehydration code since we're not doing ssr
* Remove the remaining $nuxt.$on,$off,$emit and replace with the use of our primary store which already had related code
* Replacing usages of the .$nuxt on vue instances with globalApp references
* Removing SSR dead code
* Fixing an issue where extensions could still be referencing window.$nuxt. This now provides a deprecation warning.
* Migrating another $nuxt over to the window.$globalApp
* Removed the usage of Vue.config.$nux
* Removed the usage of Vue.util.defineReactive
- Saw that the Nuxt component wasn't needed any longer so I removed it instead of trying to work around Vue.util.defineReactive
* Re-run missing check
---------
Co-authored-by: cnotv <giuseppe.leo@suse.com>
* resource edit AS yaml
* fix cruresource (yaml from form)
- lazy load the schemaDefinitions when needed, avoids sync all to createYaml before we have an async chance to fetch schemaDefinitions
* Fix questions
- there are only four places we use questions, none of which use schema, this is just to be safe
* cluster scan, plugins/fieldsForDriver, defaultFor, validationErrors
* pathExistsInSchema
- used to optionally show conditions tab/list in resource detail view
- logs of things in ingress list/edit
* createPopulated / defaultFor
defaultFor requires resourceFields, it's only used by createPopulated in one place to support machine configs without components
* wip
* WIP MONITORING.SPOOFED
- these aren't spoofed types, but secondary schemas
- testing fix blocked, primary schema's have resourceFields
* Move steve specific (resourceField) code to steve models
- create models for steve schemas and apply to cluster and management stores
- move resoureField based validationto steve model
- move pathExistsInSchema to steve store getter
- don't fetch schemaDefinitions on start up when saving prefs (not needed and blocking)
* comments / improvements
* (untested) refactoring
* Fix alertmanager definitions, add retry definition fetch
* Fix pathExistsInSchema for path length > 2
* Fix questions that accept schemas
- tested by adding Questions to random page and the node schema
* Fix to saving configmap part 1
- the save works but doesn't show data. the yaml is the same as before. debug info added
* Validation by resourceFields is a norman specific thing, so make it such
* small refactor
* Tidying up
* Remove rebase junk
* fix linting and unit tests
* fix unit tests
* fix linting from fix for test....
* Tidying up, fix alertmanagerconfig
* Remove unit test todos
* add unit tests for resource fields
* sdssdf
* Add unit tests for pathExistsInSchema
* JS --> TS
* Store schemas in local singleton cache to avoid hitting store
* fix minor changes from review
* cruresource changes following review
- improvement - remove spurious canDiff
- createResourceYaml - pass in resource to use instead of calc in code
* WIP changes to parseType
* Fix generic cloud credential and node driver forms
* handle missing reactivity given schema definitions not in store
* fix and add unit tests for `parseType`
* Fix create-yaml test
* Changes following review
- improved comments
- SchemaDefinitionCache is now per store (and is reset as such)
- typeRef now uses parseType
* Fix dep loop by moving route based helps in auth out to utils file
* fix unit tests
* Changes following review
- base resource model has cleanForX style functions which specific resources override with their own custom neads
- wire in the cleanForDownload into this pattern
- add cleanForDownload override for secrets
- Add a new tab, next to events, in the cluster dashboard
- Tab shows a list of all secrets of cert type
- List allows users to see which certs are expiring soon, how long they've lived etc
- Tab also shows a notification if certs are expiring or have expired
- Related fixes
- plumb in option list paging params (so we can show X of Y Certificates in pagination controls)
- fix usages of from = from || now
- Count requests to kube steve as steve requests (alongside local steve requests)
* 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>
- 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
* Moves sockets into the advanced worker
* worker can die peacefully now, making switching between cluster work.
* Make waitFor generic, wire in to waitForTestFn
* General Changes
- Fixes for switching cluster
- includes using common getPerformanceSetting
- avoid new code to unsub before socket disconnect
- handle `watch` `stop` requests
- lots of TODO's (questions, work, checks, test, etc)
- use common
* Switch socket fixes
- isAdvancedWorker should only be true for cluster store
- advancedWorker to be wired in
* Fix socket id for cluster workers
- sockets use an incremented local var for id
- when we nuke the socket file within the worker this resets, so they all ahve id of 1
- work around this by applying the unix time
* Fix handling of new partical counts response
- seen in dex cluster explorer dashboard
- count cards would be removed when partial counts response received
* Make resourceWatcher the sole location for watch state
- getters canWatch, watchStarted now are worked around (they look at state in the UI thread)
- we now don't call resource.stop or restart.start in subscription
- tidied up `forgetType`
- moved clearFromQueue from steve mutations into subscription mutations (better location)
- added and removed some TODOs
- fixed watch (stop handler should be higher up, include force watch handling)
* pushes the csrf value into worker and adds it to fetch request headers.
* refactors batchChanges to address ref concerns and be more performant
* Maintain schema reference whilst updating
- This change mutates input in a function, which is bad...
- but ensures the reference isn't broken, which is needed to maintain similar functionality as before
* Fix waitForTestFn
- Seen when creating or viewing clusters
* On unwatch ensure any pending watch requests are removed from the queue
- the probably would have been a problem if the worker wasn't nuked
- however as the codes there lets make it safe
Also added `trace` feature in advanced worker, will probably bring out to other places as well
* Fix navigation from cluster manager world to any cluster
- Ensure that we handle the case where the advanced worker was created but the resource watcher wasn't
- ... but fix case where this was happening (aka ensure that a blank cluster context is ignored)
* Tidy some TODOs
* Add perf settings page
- This will help test normal flow (when advanced worker is disabled)
- Note - setting is now in a bag. This may help us better support further settings (enable client side pagination, etc)
```
advancedWorker: { enabled: false },
```
* FIX - Nav from cluster dashboard --> specific event --> cluster dashboard and events not re-subbed
- Ensure we block default handling of resource.start (keep state in resource watcher)
* Tidying up some TODOs
* Adds in a cache and uses it to validate SCHEMA messages before batching.
* Forgot to actually save CSRF to the resourceWatcher when instantiated.
* an empty resource in a batchChange to signal remove
* Move addSchemaIndexFields to and created removeSchemaIndexFields in new file
- this avoids bringing class files into the worker
* Fix disconnect/reconnect
- Remove `syncWatch` (do the watch/unwatch straight away)
- Test/Fix re-sub on reconnect
- Test/Fix growls on disconnect
* Tidying up some TODO's
- including clean of workerQueue on resource.stop (this is SUPER defensive)
* batchChanges will now handle aliases
* Fix pods list - WIP
- ensure podsByNamespace is updated on batchChange
TODO
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works
* Fix pods list - fixes
- ensure podsByNamespace is updated on batchChange
Tested / Fixed
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works
* Tidying TODOs
* Remove default same-origin header
- https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
* Fixed TODO description
* Refactor subscribe, make it clear which vuex feature relates to what
* Lots of Fixes
- batchChanges fixes
- fix index is 0 issues (!/!!index)
- only `set` if we have to
- ensure we set the correct index after pushing to list
- ensure map is updated after reducing list size with limit
- podsByNamespace fixes
- ensure when ew replace... we don't use the same referenced object
- general service resource fixes
- ensure service's pods list stays up to date with store
* Multiple improvements/fixes
- resourceCache - store the hash instead of the whole object. This means longer load time be reduces memory footprint
- resourceWatcher
- don't re-sub on socket reconnect if watcher is in error
- don't sub if watcher is in error
- don't unwatch for 'failed to find schema' and 'too old' errors
- this clears the error, we won't to keep it to ensure we don't watch
- Remove #5997 comments, follow on work #7917
* toggle debug, remap alias types, cleaned up comments and console
* Unit tests for batchChanges
Much more scope for some crazy content
* Logging tweaks
- disable logging by default
- initWorker comes in too late to affect initial trace, so just rely on the `debug` to toggle at runtime
Co-authored-by: Richard Cox <richard.cox@suse.com>
* splitting up user settings belonging to DEV and updating references on rancher + update settings page to individually control each of the splitted settings
* move view in api to advanced features
* update copy of option in user prefs + update logic for inheriting value from another pref when one is not set on the server/api side + add toggleLocale shortcut to missing layouts + other minor changes
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
* 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>
* create custom model prop for provisioning.cluster in order to display correct age of a cluster in the case of an upgrade in rancher version
* simplify logic by setting creationTimestamp prop on resource-class model
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>