Commit Graph

53 Commits

Author SHA1 Message Date
Richard Cox a90029638a
Re-enable vai support for side nav and home page cluster lists (#15262)
* 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
2025-10-06 09:47:58 +01:00
Cody Jackson 0462944a9e Adds support for for an additional actions slot in our titlebar/masthead
Fixes #14977
2025-08-12 18:13:57 -07:00
Evgeniya Vashkevich 2e25bc83ae
Added back RKE1 removal, removed etcdbackup (#14786) 2025-07-14 08:29:27 -07:00
Neil MacDougall c0ea22f63b
RKE1 Clusters unsupported (#14226)
* Make RKE1 Unsupported

* Fix for unit tests

* Update a11y test for removed RKE1 toggle switch

* Fix missing import

* Remove RKE templates and related tests

* Fix lint and tidy up

* Removed unused code

* Updates e2e tests

* Tidy up e2e tests

* Fix lint

* Prevent edit of RKE1 cluster

* Remove RKE1 settings

* Fix lint with removed settings

* Remove e2e test for removed setting

* Remove unused e2e po

* Remove toggle switch from a11y test
2025-05-29 13:07:00 +01:00
Richard Cox cae343df78 Allow individual resource tables to supply overrides for product resource group settings 2025-04-11 11:00:02 +01:00
Alexandre Alves 598e32ea25
RKE2 Cluster Detail Page: Machine Pools List is not grouped by pool / machine deployment (#13623)
* 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>
2025-03-10 15:43:52 +00:00
Mo Mesgin a7a49eb9f9 Merge branch 'master' of github.com:rancher/dashboard into 13284-rke1-deprecation-banner 2025-02-21 11:07:31 -08:00
Richard Cox a1ed926776 Ensure cluster detail manchine and node lists are grouped correctly
- 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;
      }
   ```
2025-02-20 17:04:02 +00:00
Mo Mesgin c70353dc7a show warning in details page and when switching the rke1 toggle 2025-02-19 23:28:06 -08:00
Neil MacDougall 8001967416
Extensions: Add hooks to support virtual clusters (#11064)
* 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
2025-01-31 08:51:58 +00:00
Nancy 73bff036c5
remove references to window.c (#12281) 2024-10-17 11:03:15 -07:00
Cody Jackson 5052c2a8e8 Enabling `vue/require-explicit-emits` linting rule
https://github.com/rancher/dashboard/issues/11961
2024-09-19 09:58:53 -07:00
Cody Jackson 9b829c55ea Ran `yarn lint --fix` 2024-08-22 16:05:36 -07:00
Cody Jackson d5ce4fff2e Run the vue3 migration script
Commands run:

➤ yarn migrate
➤ git clean -fdx
➤ nvm use 20
➤ yarn
2024-08-22 16:05:36 -07:00
Cody Jackson f2f014597c Removing prop mutation in v-model usage 2024-08-12 14:47:52 -07:00
Cody Jackson c5ffe0504c Change the order we evaluate isImported with isCustom
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
2024-07-01 13:22:29 -07:00
Richard Cox b464d15ee0
Integrate new schemaDefinitions endpoint (#10141)
* 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
2024-02-28 17:08:35 +00:00
Alexandre Alves 74e543c524
show registration tab only on hosted providers with private endpoint/network (#10319)
* 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>
2024-02-05 10:08:40 +00:00
Francesco Torchia 5d01979955
Add e2e tests: RKE1 cluster details
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-01-16 15:14:15 +01:00
Francesco Torchia b5ec434a42
- Add providerSummary getter to machinedeployment model
- Hide provider labels for Harvester clusters

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-01-02 15:17:35 +01:00
momesgin 807e2dc96c
scaling down to zero restrictions for RKE1 (#10017)
* 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>
2023-12-14 10:08:34 -08:00
momesgin 19ef9f262c
fixed scale up button not showing up (#10019)
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-11-13 07:55:49 -08:00
Francesco Torchia 09168d3683
Add empty availableActions to fake rows in cluster provisioning details page
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-09-14 17:38:41 +02:00
Alexandre Alves 871bca5f9f
RKE1 / RKE2 custom clusters tab redirect (#9586)
* add missing conditions for rke1 custom cluster to redirect to regsitration tab when there's no machines registered

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-08-28 16:14:02 +01:00
Neil MacDougall c9e1a19396
Extension support for custom provisioning (#9246)
* 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>
2023-07-11 22:17:57 +01:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +02:00
Phillip Rak ade3c9f4e7 Replace all instances of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00
Phillip Rak 7cecbc0f62 Replace all instances of `v-html` with `v-clean-html`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-03-22 08:30:15 -07:00
Richard Cox 95fdf80dcb
Merge pull request #8224 from richard-cox/stale-management-resources
Fix stale management cluster resources
2023-02-23 11:58:24 +00:00
Shavindra d7e5dc50c4
[2.7.2] Handle nodeGroups undefined for imported EKS cluster (#8196)
* Handle nodeGroups undefined for manually imported RKE cluster.

* Forward part changes from #8222

---------

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
2023-02-22 15:41:12 +00:00
Richard Cox 6ce6632e13 Fix update of machines/pools in cluster detail Pools tab
- 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
2023-02-20 17:09:52 +00:00
Alexandre Alves 5f91d46762
Node Pool fake machines bug (#8151)
* 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>
2023-02-15 14:01:32 +00:00
Alexandre Alves 0e33fd4c13
getting elemental changes on cluster provisioning back to rancher dashboard (#7543)
* 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>
2023-01-27 16:12:47 +00:00
richa eeb8fa1d86
Added scale down promt confirmation on RKE clusters (#7926)
* Added scale down promt confirmation on RKE clusters

* Removed extra test code

* Modify toggleScaleDownModal function

* Added promt to RKE cluster
2023-01-19 13:34:16 +01:00
richa b89bcb595f
Prompt node pool (#7772)
* 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
2023-01-11 15:51:47 +01:00
Catherine Luse aaf65b60c6 Show both internal and external IPs in list of nodes 2022-12-07 09:53:50 -07:00
Shavindra 7601340ecc
Fix RKE2 Node status in cluster management. (#7169)
* Fix RKE2 Node status.
2022-11-29 14:21:13 +00:00
Neil MacDougall c5d9096ccc
Cluster Mgmt: Hide related resources if user can not acces local cluster (#7226) 2022-11-22 22:29:45 +00:00
Giuseppe Leo d2d4122bc0
Review HTML formatting rules (#6805)
* 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
2022-11-11 17:04:22 +01:00
Alexandre Alves 48da4a3ed0
Remaining shell items for Elemental in 2.7.0 (#7168)
* add file changes needed for remaining shell files to enter 2.7.0

* add missing model prop canScaleUpPool

* manually merging the translations string to fix PR merging issue

* address PR comments

* fix issue with expression

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-10-18 11:31:37 +01:00
Jordon Leach 2f241d0e39
Remove registration warning banner for custom clusters (#7183) 2022-10-13 09:30:06 -04:00
Jordon Leach c41223692a
Add gke hosted provider to token creation (#7031) 2022-10-04 10:07:14 -04:00
Jordon Leach 172bb2b0b9
Add warning banner for zero desired nodes in eks (#6850)
* Add warning banner for eks desired node groups

* Fix desired node group warning to filter for all node groups
2022-09-14 13:37:26 -04:00
Neil MacDougall 42a98b0adc
Show if there is an updated RKE Template available for a cluster (#6671)
* Add notification if update to an RKE template is available

* Add template name and upgrade info to cluster detail page
2022-08-22 15:58:09 +01:00
Neil MacDougall 8f7dcef5d5
Ensure that we show empty machine pools (#6425)
* 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>
2022-07-20 18:32:47 +01:00
Jordon Leach 8a09180184
Add registration tab to imported aks or eks clusters (#6226)
* Add registration tab to imported aks or eks clusters

* Add ready state check for eks and aks registration tabs
2022-07-18 11:09:21 -04:00
Neil MacDougall a73003018e
Fix snapshot location for rke1 clusters being empty (#6303)
* Fix snapshot location for rke1 clusters being empty

* Fix lint issues
2022-07-08 17:39:10 +01:00
Neil MacDougall fdc85696c9
Improve machine pools when there are a large number of machines (#6132)
* Improve cluster details machne pools information

* Remove unused code
2022-06-23 09:59:06 +01:00
Shavindra cfd6f6cf82
Display IP Address on RKE2 cluster nodes #5735 (#6062)
* Add IP address to RKE2 cluster machine pools list.
2022-06-01 12:32:50 +02:00
Phillip Rak 72b36cb360
Create Rancher Component Library (#5504)
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
```
2022-05-24 15:09:53 -07:00