* 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
* hide grouping controls for machines and machine pools in prov cluster details view corresponding tab
* Fix rke1 pool list
---------
Co-authored-by: Richard Cox <ricox@suse.com>
- their resource table elements turned these off
- this misconfiguration was ignored until grouping was fixed in https://github.com/rancher/dashboard/pull/11663
- specifically the addition of the if in computedGroupBy
```
computedGroupBy() {
// If we're not showing grouping options we shouldn't have a group by property
if (!this.showGrouping) {
return null;
}
```
* 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
Both isImported and isCustom end up being true when using a custom cluster. There's some prior art which seems to indicate swapping the evaluation is acceptable.
This resolves https://github.com/rancher/dashboard/issues/11160
* 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
* change condition to show registration tab only on hosted providers with private endpoint/network + adds unit tests
* address pr comments
---------
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
* disable scale down to zero
* scaling down to zero restrictions for RKE1
* removed extra optional chaining
* removed wrong condition for minus button
* added unit tests
* combined rke1 and rke2 scale down modals + more tests + minor refactor
* delete unused file ScaleRke1NodeDownDialog.vue
* moved logic from created to data + used nameDisplay for both rke1 and rke2
---------
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
* 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>
* Handle nodeGroups undefined for manually imported RKE cluster.
* Forward part changes from #8222
---------
Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
- fix issue where ..
- state 1 - X machines + Y fake machines = total
- state 2 - X+1 machines + Y-1 fake machines = same total
- same total meant sortable table `arrangedRows` value wasn't updating
- fix is to ensure the sort generation changes so `arrangedRows` doesn't return the cached rows
- this is the same method used for the project/namespace list
* update fakeMachines naming matching function
* update code based on PR comment
* Final tweak
- isElementalCluster will always result in the same `machinePoolInfName.includes(machineFullName)`, so exit early with it
- tidy up var names
---------
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Richard Cox <ricox@suse.com>
* getting elemental changes on cluster provisioning back to rancher dashboard
* code cleanup
* apiversion created from machineCconfig schema attributes
* add machine-config loader to load it from an extension
* fix issue where elemental cluster details could not be displayed + minor changes and fixes
* fix bug where elemental infrastructureRef.name for elemental start with nc- and therefore was generating a fake machine when it shouldnt + cleanup prov cluster model
* prevent code change
* getting k8s file back up to master state to avoid complex merge conflicts
* getting k8s file back up to master state to avoid complex merge conflicts
* applying changes to cluster.x-k8s.io.machinedeployment
* Address PR feedback
---------
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
* Added prompt in machinedeployment
* Save users promptConfirmation in cookies
* Changed pormpt size
* Added comments to the code, replace mounted function with create
* Fixed review comments
* Removed cookies added scale pool promt variable in prefs file
* Corrected pref variable name format and update comments
* Added confirmation prompt option in pref page
* Prevent ESLint to format generated paths
* Add HTML ESLint Rules
* Format all the Vue HTML templates except Harvester
* Exclude Harvester package from linting HTML, keeping old formatting rules
* Ensure that we show empty machine pools
* Fix two bugs
- empty pool message would show twice in a single pool when there were two empty pools (missing id meant fake machines were all grouped together)
- ensure detail page for rke1 clusters show
Co-authored-by: Richard Cox <richard.cox@suse.com>
This adds a new project for Rancher Components under `pkg/rancher-components` and replaces components used throughout dashboard with the versions used here. All imports for the following components have been updated:
```
|- BadgeState.vue
|- Banner.vue
|- Card.vue
|- Form
|- Checkbox.vue
|- LabeledInput.vue
|- LabeledTooltip.vue
|- RadioButton.vue
|- RadioGroup.vue
|- TextAreaAutoGrow.vue
```