Commit Graph

32 Commits

Author SHA1 Message Date
Richard Cox bec8e7aaed missed a param 2025-01-23 16:09:10 +00:00
Richard Cox 972e85e116 Changes following review
- fix and simplify FetchPageSecondaryResources
- ensure resource detail page events list doesn't add ns filters (not needed)
2025-01-23 15:56:47 +00:00
Richard Cox 86ae345eed Tidying up ready to review 2025-01-09 13:55:55 +00:00
Richard Cox 92430b36fb Finish off questions/reference 2025-01-08 14:07:16 +00:00
Richard Cox f589ccfd9b wip 2025-01-08 11:42:54 +00:00
Richard Cox 11eda663bf WIP 2025-01-07 13:34:18 +00:00
Richard Cox 4d4c06f624 Merge pull request #11984 from richard-cox/node-driver-fixes
Fix two node driver based issues
2024-09-26 16:15:57 +01: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
Nancy 85c5c28c22
Vue3 fix unit tests (#11776)
* remove $set from AKS validators

* fix cruGKE not rendering

* fix most aks unit tests

* fix crueks and eks config unit tests

* fix eks networking and nodegroup unit tests

* fix gke unit tests

* fix consumption gauge test

* fix namespacefilter tests

* fix command and taints unit tests

* fix questions unit tests

* fix hpa and service unit tests

* fix registryconfigs unit tests

* fix job unit tests

* fix longhorn unit tests

* fix addextensionsrepos unit tests

* fix rke2 basics unit tests

* fix container shell unit tests

* fix last aks pool test

* fix mount tests

* fix namespace and pv unit tests

* fix codemirror unit tests

* clean up aks, boolean, namespacefilter unit tests

* fix namespacefilter test

* remove redundant test case
2024-09-10 08:07:21 -07:00
Cody Jackson 8d59cd5914 Skipping all failing unit tests for the Vue3 merge. 2024-08-22 21:12:40 -07:00
Phillip Rak a71857ce7d Unit test updates - partially fixed
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:56 -07:00
Cody Jackson d81bd7d387 Updating all references to has-tooltip to v-popper--has-tooltip to be consistent with our upgraded library 2024-08-22 16:09:55 -07:00
Cody Jackson d47ce13f28 Fixed the remaining lint warnings and errors
The chart.test.ts is likely more broken now than it was. This can be fixed later.
2024-08-22 16:07:04 -07:00
cnotv 78d70353c5 Unit test: Migrate unit tests with the script 2024-08-22 16:07:03 -07:00
Cody Jackson 909affa02f Replacing $emit('input' with $emit('update:value'
This should've been done in the migration script and will be fixed for the next run.
2024-08-22 16:07:03 -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
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 7fce213bd8
Fix chart installation question groups are "None" if there is only 1 group defined (#10203)
* fix issue where if tabbed=multiple and only 1 group would show a tab called None

* create flag to hide tabs if there is only one group in questions + add e2e tests to verify questions tabs

* update v-if condition

* change chart install page from Epinio to NeuVector

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-01-04 19:02:19 +00:00
Mo Mesgin c453356ea1 fixed unit tests warnings 2023-09-20 15:49:53 -07:00
Richard Cox 4d0dc2aa88 Fix one bug in master
- arrays and objects values were not shown
  - the value parsed in is the actual value, rather than the values object
2023-08-24 14:56:30 +01:00
Richard Cox d99544a9bc Two PR based updates
- Use mode const in template
- use computed & Object.entries for more complex `options`
2023-08-24 14:54:47 +01:00
Bastian Hofmann b6429cfd5c Fix lint
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
Bastian Hofmann dcb8b2542b Fix tests
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
Bastian Hofmann 1ff5df01fd Add tests 2023-08-24 13:58:29 +01:00
Bastian Hofmann 03cea42ae5 Extended questions support
* Add radio buttons
* Add multi select for enums
* Add searchable for enums
* Add label support for select options in enums and radio buttons
* Add yaml editor
* Add tooltips
* Add validations: min, max, min_length, max_length, valid_chars, invalid_chars (app v1 compatibility)

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +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 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07: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
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
Richard Cox 25acc1f8eb Plugins: Rejig files to new shell locations (#5623)
* Doc

* v0.7.0

* v0.7.1

* v0.7.2

* Add creators

* v0.1.14

* v0.1.17

* Add Yarn link

* Tidy ups and typos

* Allow models to be loaded from plugins

* v0.1.15

* v0.1.18

* v0.6.6

* Improve readme, fix cyperss log msg

* v0.1.17

* v0.1.19

* v0.6.7

* v0.6.8

* Fix logo ref when in shell

* Fix lint issues

* Fix error in example

* Fix script to work on linux

* Add ability to revert moves without losing changes

* Fix bug with custom models in a plugin

* Fix build of UI packages

* Add dist-pkg to .eslintignore

* Pull out util from extend-router to prevent router being pulled in UI packages

* Update PLUGINS.md

* Remove duplicate dependency

* Reduce size of built UI packages

* Share codemirror. Other tidy ups

* Further improvements

* Tidy ups to support i18n in plugins

* Clen up add comments

* More clean-ups and comments added

* Rename from extension to plugin

* Missed file in rename

* v0.6.9

* TIdy ups following rename

* v0.1.20

* v0.1.21

* More refactor and tidy up

* v0.1.22

* v0.1.18

* v0.1.19

* v0.1.23

* v0.6.10

* Version Packages. Improve naming. Unload.

* v0.6.11

* v0.1.20

* v0.1.21

* v0.1.24

* v0.6.12

* v0.1.25

* v0.1.22

* v0.6.13

* Fix issues when plugin is builtin

* Add missing files

* Fix lint issues and watcher ignores

* Fixes following review

* v0.1.28

* v0.1.31

* v0.6.20

* Fix coer.js version

* Fix bug where plugins included via npm don't work

* Changes post merge

* Move plugins doc to dev guide, add note at top of README

* Update cypress version

* Add note about the reset --hard in rejig -d

* Fixes post merge

* Rename @ranch to @rancher and ad plugins

* Improve routes support, add package assets support

* Add uninstall hooks and pass interal opts

* Fix rejig script

* Minor fixes

* Routing tweaks
- attempted to improve `addRoutes` typing, failed a lot
- improved typings in plugins.ts
- added "@pkg/*" entry and vue-shim (for importing components) to the pkg creator
- fixed some linting
- safely fail when Verdaccio isn't running
- fixed some typos

* Remove frontmatter-markdown-loader reference from nuxt-config

* Revert "Remove frontmatter-markdown-loader reference from nuxt-config"

This reverts commit 29ef6f2f7b.

* Exclude creators from dashboard build

* Revert "Exclude creators from dashboard build"

This reverts commit 8ede93ee7c.

* Ingore creators via tsconfig
- We're still susceptible with vue shims in multiple packages
- Need to determine why packages can't use shim from route
- Probably need to move `./vue-shim.d.ts` in to `./shell`. Needs testing with a pkg that imports a component

* After rejig

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
2022-05-10 10:04:02 +01:00