Commit Graph

169 Commits

Author SHA1 Message Date
cnotv 03dba9f064 Add test for resource class 2023-12-15 17:30:22 +01:00
Shavindra de550a86d4 Merge branch 'master' into 9371-remove-unwatned-properties 2023-12-14 23:17:59 +01:00
Neil MacDougall 83550bd0ca
Yaml Editor: Auto-fold section in RKE2 cluster config (#10108) 2023-12-14 13:22:44 +00:00
Alexandre Alves 6637583874
remove "process." mentions from Dashboard and adjust code (#10119)
* remove process.client and process.server mentions and adjust code

* fix a couple of missing conditions for process.server

* remove commented line

* remove process.static

* fix lint errors

* uncomment code

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-13 08:41:26 +00:00
Richard Cox 8f0c769b60
Merge pull request #10054 from richard-cox/squash-findAll-secret-monitoring-chart
Avoid fetching all secrets and workloads when installing Monitoring Chart
2023-12-12 13:03:41 +00:00
Richard Cox c9b2f79053
Merge pull request #10024 from richard-cox/cluster-cert-view
Add certificates view to cluster dashboard
2023-12-12 11:57:20 +00:00
Giuseppe Leo cb6f806274
Correct issue with TS after tsconfig split with unit tests (#9686)
* Correct file test naming

* Correct test files import and names

* Restructure TS configuration with shared path

* Copied TS configuration for shell due current architecture state
2023-12-12 11:35:38 +01:00
Alexandre Alves 77d455041e
Wrong rendering of Markdown files (#9956)
* remove dompurify from markdown component + add missing html tags to allowed tags in v-clean-html

* fix lint error

* added styles for tables and blockquote based on github

* cleanup console.log

* fix missing tags after rebase

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-05 11:31:45 +00:00
Evgeniya Vashkevich 25618ad4a0
[INT] Replaced vue-clipboard2 library with clipboard-polyfill (#10072)
* [INT] Replaced vue-clipboard2 library with clipboard-polyfill
2023-11-30 16:31:35 -08:00
Neil MacDougall d5dccb4de4
Support "target=_blank" in A links via clean-html directive (#9928)
* Allow target=_blank on A tags through DOMPurify

* Remove unused params

* Fix lint issue

* Prevent directives from being overwritten

* Fix lint issues
2023-11-23 09:33:48 +00:00
Richard Cox 0c7e71139f Don't fetch all workload types to check for prom operator
- Previously ALL workloads were fetched and then filtered for those containing certain images
- We now do this upfront via API
- depends on https://github.com/rancher/dashboard/pull/10024
2023-11-17 17:59:54 +00:00
Richard Cox fd9285ea4d Remove use of findAll secrets - Monitoring Chart
- Contributes to #9964
- Monitorign chart fetched all secrets, then all usages of it filtered down to a single namespace
- So we now only fetch

Related
- Fix scenario where fetching all then fetching namespaced would return all results

Improvement
Also improve spacingin a placeholder
2023-11-17 17:58:43 +00:00
Shavindra cbf36ccbd1 Update import 2023-11-14 15:09:36 +01:00
Shavindra 3436e4271c Fix linting errors. 2023-11-14 10:51:46 +01:00
Shavindra ae801b424f Fix tests. 2023-11-14 09:29:17 +01:00
Richard Cox a92e2ef5a1 Fix failing storybook (broken import) 2023-11-09 09:13:46 +00:00
Richard Cox 4e3a282b79 Add certificates view to cluster dashboard
- 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)
2023-11-08 11:52:23 +00:00
Shavindra 9ac7eb2360 Removed unwanted properties from pod, secret and workload 2023-11-02 11:05:55 +01:00
Dai Yuzeng f2e0b6d304
Implement the directive of positive number (#9451) 2023-09-27 14:06:23 -07:00
Sean-McQ 718ffd6201
checks to see if membership editor is project and adds a project filter (#9761) 2023-09-27 13:37:54 -04:00
Richard Cox 3783381079
Merge pull request #9666 from richard-cox/remove-diagnostic-logging
Remove console output from diagnostic page
2023-09-27 17:37:43 +01:00
Richard Cox a70fe1b431
Merge pull request #9598 from richard-cox/fix-modified-resource
Fix resource modified handler
2023-09-27 17:36:49 +01:00
Richard Cox f97025c647 Remove console output from diagnostic page
- Follows on from
  - https://github.com/rancher/dashboard/pull/6603
  - https://github.com/rancher/dashboard/pull/6700
- To track messages the console methods were overwritten
- When the console methods were called, we would track message and then call the original console method
- Output into the standard browser console window was broken though
  - the inline stack trace for all logs is the place where the original console method is called
  - this was always `console.js`
- This causes issues whilst in development but also for logs coming from customers
- Investigate ways around this, but couldn't find anything nice
- short term solution is to remove the feature
2023-09-08 13:38:33 +01:00
Richard Cox eac7eea187 Ensure failures when saving YAML are caught 2023-09-01 16:40:47 +01:00
Alexandre Alves 9d27823a4a
add growl message to display warning messages from response headers (#9581)
* add growl message to display warning messages from response headers

* update growl styling based on feedback from Eden

* Many updates
- Move functionality into it's own file
- Add unit tests
- Fix issue where YAML PUTs weren't included in check (bug in master)
- Fix issue with separating warnings (bug in master)
  - previously this was done via `,`, however that appears in the messages themselves
  - add configuration which allows this to be customised
- Add configuration which would allow us to disable or expand how growls are shown

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-08-29 09:54:25 +01:00
Richard Cox f9aa1f38bb Fix resource modified handler
- fixes issue in handleConflict that meant
  - conflicts were not detected
  - non-conflicting changes were not applied to users resource
- see #9597 issue description for more detail
2023-08-25 18:41:04 +01:00
Richard Cox 6f32ed0df2
Merge pull request #9412 from WuJun2016/circular-dependency
fix circular dependency
2023-07-27 11:39:53 +01:00
Shavindra e11a73d6be
Fix fleet cluster labels and annotations save via YAML view. (#9383)
* Fix fleet cluster labels and annotations save via YAML view.
2023-07-26 13:25:31 +02:00
wujun f4856ffccc fix circular dependency 2023-07-26 17:45:27 +08:00
Sean-McQ 2c81742693
add "exludeFields" option on findAll, unit tests. (#9300)
* 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
2023-07-18 09:23:26 -04:00
Alexandre Alves 43ca333bdf
Table actions 'enabled' function not working correctly (#9331)
* fix bug

* fix lint issues

* fix lint issues + remove pkg folder

* address PR comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-07-17 16:07:24 +01:00
momesgin 7e77ec7d5e
remove error icon when the condition is Ready and Waiting (#9309)
* 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>
2023-07-14 13:09:04 -07:00
Giuseppe Leo 11f7cfe9f1
[RKE2] Cluster unable to provision after switching back to Back to Form from Edit as YAML (#9264)
* 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
2023-07-13 19:52:49 +02:00
codyrancher cc086ee953 Switch safemode to use the query param
Making this switch because using the path can lead to undefined routes and some confusion on wildcard routes.

https://github.com/rancher/dashboard/pull/9135#discussion_r1232391119
2023-07-09 09:07:42 -07:00
Richard Cox bbbad1d2aa
Merge pull request #9030 from richard-cox/log-validation-warnings
Log validation warnings when creating/editing resources
2023-06-27 11:34:23 +01:00
Richard Cox 0245a8cb93 Merge remote-tracking branch 'upstream/master' into epinio/resolve-conflicts-with-master 2023-06-23 18:00:14 +01:00
Alexandre Alves e84c8979b7
improve dev experience for extensions where builtin extensions will prevent external extension with the same name to load (#9147)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-06-23 17:27:51 +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
Richard Cox ed9ee99980 Fix failing e2e test
- 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
2023-06-09 15:40:06 +01:00
Richard Cox 9eea1852c3 Merge remote-tracking branch 'upstream/master' into master-epinio-dev 2023-06-08 14:54:40 +01:00
Richard Cox b07f8914bc Fix lint warnings 2023-06-05 09:40:26 +01:00
Jordon Leach d94e78c24a
Add extension image load dialog (#9010)
Update dialog with repo creation - update docs

Add uninstall for custom images

Add extension images list view

Add image load dialog and uninstall within extension image view

Update publish and bundle scripts for image load - move image page to tab

Add extension container build workflow file to pkg creator

Move plugin server template into extension build scripts

Fix publish script for multiple asset packages

Move ImageList view to separate page - add crd metadata for custom images

Update docs - fix references to images with catalog

Fix wording, cache state badge, masthead breadcrumb, when deleteing resources check for namespaces

Update docs - fix delete repo resource - default cache state

Trim image whitespace - populate extensionUrl

Add experimental badge
2023-06-02 08:28:47 -04:00
Richard Cox f5a5595f23 Log validation warnings when creating/editing resources
- on by default in 1.25
- in dev world these are warnings, in prod they're debug
- see https://kubernetes.io/docs/reference/using-api/api-concepts/#validation-for-unrecognized-or-duplicate-fields-setting-the-field-validation-level
2023-06-02 11:15:09 +01:00
Richard Cox bfa27646aa operator pkgs --> pkg 2023-06-01 18:24:04 +01:00
Richard Cox 1e8c6cb13d remove EXCLUDES_NUXT_PLUGINS, replace with EXCLUDE_OPERATOR_PKGS (to avoid loading operator plugins) 2023-05-26 16:17:28 +01:00
Richard Cox d5c5e6aa7c Fix log in --> redirect to log out
- 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
2023-05-23 12:09:37 +01:00
Phillip Rak 93be844701 Create a `v-clean-tooltip` directive
Update `VCleanTooltip`
Only purify if `value.content` is string

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00
Richard Cox aa34bd3e29 Fix churn issue
- 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
2023-05-18 14:28:28 +01:00
Richard Cox 9fada7f0b6 Remove richards-logger 2023-05-18 14:28:28 +01:00
Richard Cox 6fffc0d36a Fix linting 2023-05-18 14:28:28 +01:00