Commit Graph

148 Commits

Author SHA1 Message Date
Richard Cox 4b8e30cdae Wire in canViewResourceto the check in authenticated 2023-08-22 17:16:44 +01:00
LiuYan 56cb64da58 fix(LinkName): add node schema checking 2023-08-22 16:54:13 +01:00
Sean-McQ 5c2f28b4dc
this was a older line that got relocated up into the getSocketUrl method (#9462)
* this was a older line that got relocated up into the getSocketUrl method

* Fixes compiler warnings
2023-08-02 11:04:18 -04:00
Alexandre Alves e70abeb82c
UI says "Matches no existing clusters" when there is a null value for cluster selector in cluster groups (#9441)
* fix bug with matchexpression

* clear console logs

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-07-31 11:46:08 +01:00
Neil MacDougall 02e6e84f41
When execing into a container, try linux and windows commands when we can't determine if the node is windows (#9241)
* When execing into a container, try linux and windows commands when we can't determine if the node is windows

* Fix lint

* Lint: Remove trailing white space

* Use error message rather than last error

* extra failover, caching last working os against pod, errors, tests

* add __mocks__ folders to eslint ignore patterns

* standard user test fix

* removed unnecessary try/catch logic

* Revert "removed unnecessary try/catch logic"

This reverts commit c263131927.

---------

Co-authored-by: Sean <sean.mchugh@suse.com>
2023-07-28 21:28:03 -04:00
Richard Cox 77d65c9c9b Add additional types for extensions, fix other typing errors 2023-07-25 15:51:31 +01:00
Bastian Hofmann df28349726
Merge branch 'master' into embed-project-monitoring-dashboards 2023-07-13 15:37:34 +02: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
Cody Jackson 1b1f7dae33 Add the ability to import layouts from extensions
Addresses one facet of https://github.com/rancher/dashboard/issues/9216
2023-07-07 13:53:57 -07:00
Richard Cox 0245a8cb93 Merge remote-tracking branch 'upstream/master' into epinio/resolve-conflicts-with-master 2023-06-23 18:00:14 +01:00
momesgin d3302399f2
8657 - added unit tests for generateSupportLink (#9180)
* added unit tests for generateSupportLink

* added one more test case for generateSupportLink

* use it.each method to combine separate tests that are related

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-06-23 09:35:25 -07: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
Alexandre Alves fe8b75e816
fix bug with svg icon in header action extension point where colors for icon were being grabbed incorrectly (#9157)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-06-22 15:18:19 +01:00
Nancy Butler e00489165a use projecthelmchart dashboardValues for grafana url 2023-06-21 13:44:17 -07:00
Richard Cox 7feb5ca222 Move isGitRepo which depends on epinio stuff out of generic utils 2023-06-21 15:02:10 +01:00
Richard Cox 487ffad91c Fix build of epinio as an extension 2023-06-21 15:02:10 +01:00
Richard Cox 48f1114006 Merge remote-tracking branch 'upstream/master' into epinio-dev 2023-06-19 15:40:07 +01:00
wujun 717a2b2c14
HARVESTER: add bare-metal container and mcm support (#8754)
* HARVESTER: add bare-metal container and mcm support

* Harvester: Fix re-render old route component

* HARVESTER: fix services and hide repositories

* HARVESTER: add svg icon

* HARVESTER: add harvester version in explorer page

* HARVESTER: change openRancherManagerSupport => isRancherInHarvester

* HARVESTER: move method to models type

* HARVESTER: enhancement TopLevelMenu when use embedded rancher

* HARVESTER: polish harvester mode judgment

* HARVESTER: Add namespace resource quota help text

* HARVESTER: remove service filter

* HARVESTER: set harvester-baremetal-container-workload to false

* HARVESTER: fix svg & namespace component

---------

Co-authored-by: n313893254 <n313893254@126.com>
2023-06-15 13:28:08 -07:00
Bastian Hofmann 6c72d379d8
Embed project monitoring metric dashboards
This embeds the project monitoring Grafana metric dashboards if they are present and user has no access to cluster monitoring.

Fixes https://github.com/rancher/dashboard/issues/7286

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-06-09 16:29:23 +02:00
Richard Cox 9eea1852c3 Merge remote-tracking branch 'upstream/master' into master-epinio-dev 2023-06-08 14:54:40 +01:00
Shavindra 1c88aa9f8c
Handle Stringified Error Messages. (#9036)
* Update error handler to handle stringified JSON.
2023-06-05 19:31:09 +02:00
Richard Cox 1f17d72da0 Fix favicon
- fix for isSingleProduct
  - two link elements on page, we set the second one, browser showed first one
- not sure why this worked in normal mode
  - two link elements on page, we set the second one, browser showed second one
2023-06-02 18:25:45 +01:00
Nancy a9276ea340
fix grafana url utility (#9019)
fix grafana url on monitoring index

recompute grafana dashboard iframe url if monitoring version changes
2023-06-01 11:07:47 -07:00
Richard Cox d90ba881a6 Merge remote-tracking branch 'upstream/master' into merge-master-2 2023-05-25 16:51:00 +01:00
Qingyang Nong c0cdc2dbf3
HARVESTER: Cloud provider enhancement (#8935)
* HARVESTER: Cloud provider enhancement

* fix labels-annotations.js linting

* fix missing comma in labels.vue

* fix labels.vue missing bracket

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-05-22 16:49:19 -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
Richard Cox 281fb6672c Simplify forced filtering setting
- Given forced filtering is now not resource dependent have a high level utils function to determine if enabled
- This should have opened up the door to setting a nicer default then ALL_USER, however it's actually initially applied somewhere other than ns filter
- Fixed a bug where the all option [] was valid
2023-05-18 14:28:28 +01:00
Richard Cox 15bc1cd036 Changes following BE update and testing 2023-05-18 14:28:28 +01:00
Richard Cox 7e5ad5de34 Expand enforced namespace filtering to multiple namespaces and projects
> This uses a new endpoint that has yet to merge. See https://github.com/rancher/rancher/issues/40140

WIP
- Contains console.warns (via custom logger, can be disabled)
- Waiting for final BE endpoint changes to merge
- Contains TODOs to resolve on final enpoint changes delivered

Pertinent Points
- Incompatible with incremental loading / manual refresh
  - Harder to get counts (need to sum up from different namespaces)
  - Requires use of new steve pagination
- Enforced NS threshold has been removed
  - The threshold only applies to the primary resource. This has issues when loading a low count primary (daemon sets) which depends on a very high count secondary (pods)
  - Fixing this would involve knowing all secondary resources a list uses, which isn't currently possible (each resource is requested individually, need to know them all first)
- There is no way to subscribe to multiple namespaces (one or all)
  - We mock this in subscribe by only persisting changes to resources from within target namespaces
- Everything should work with Advanced Worker enabled
2023-05-18 14:28:28 +01:00
Francesco Torchia 646f2a1159
Merge pull request #8853 from torchiaf/fix/8655
Test automation around YAML chomping
2023-05-16 10:34:02 +02:00
Francesco Torchia 4da0da96a0
Clean create-yaml.js code
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-16 10:09:31 +02:00
Francesco Torchia 12f2f1d290
[create-yaml] add unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-11 17:12:08 +02:00
Alexandre Alves c876a2ecf6
Agent configuration RKE2 (#8643)
* porting Neils poc work

* add all namespaces to pod affinity ui + add banners to for windows warning and no defaults for limits area + set namespaces as input as default for agent configuration + add node selector to agent configuration

* update banner copy in affinity section for windows + add visual separator between node and pod affinity

* added weight input for node affinity - preferred + made weight input for pod affinity appear only for preferred + changed MatchExpressions component to cover matchFields and matchExpressions  in node affinityupdate banner copy in affinity section for windows + add visual separator between node and pod affinity

* fix lint errors

* working on e2e tests for agent configuration on rke2

* e2e tests work in progress

* working on e2e tests

* fix issue with Tolerations component where data wasnt being propagated because some inputs were missing a connection with the update method

* finish missing bits of e2e tests + fix height of inputs + revert back default affinity fetch

* disable no arbitrary waits in cypress

* fix broken e2e and unit tests

* fix e2e tests again

* fix lint issue

* set timeout for intercepting request to 10 seconds

* update path for default setting in agent configuration

* fix issue in dark mode in group panel + update strings to match rke1 interface + remove label from namespace input on pod affinity + clean up agent config data on save and restore it if it fails + change order of ui blocks in agent config interface

* address low hanging fruit PR comments

* remove console log

* move agent config po to components folder

* remove select.po in favour of labeledselect.po + fix data-testid in arrayList component and also its unit tests + make unit-input po leverage the use of LabeledInputPo + fix title assertion

* address final comments on e2e tests

* fix issues with PodAffinity component + update e2e test payload check

* final PR fixes

* addressing PR comments

* remove log

* reverting changes to ClusterManagerCreateRke2CustomPagePo as it was impacting other tests + add a method to go to custom cluster creation page

* e2e test updates

* updating banners copy

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-05-11 12:00:22 +01:00
Francesco Torchia 0ae05b59a9
Merge pull request #8552 from torchiaf/fix/5958
`ConfigMap`, handle chomping
2023-05-10 12:42:58 +02:00
Francesco Torchia 6a7362f5e3
calculate indentation in yaml creation
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-09 20:35:25 +02:00
Neil MacDougall da0d60720d
Auth Provider: Support Okta with LDAP search (#8679)
* Auth Provider: Support Okta with LDAP search

* Minor fixes

* Update UX and add detail of LDAP configuration

* Fix issues when logging out

* Fix i18n key
2023-05-03 10:07:58 +01:00
LiuYan 19e3217381
fix(grafana.js):add try-catch block to monitoring version request (#8722) 2023-05-02 11:05:23 +01:00
Francesco Torchia 98c91ce5a3
improve code comments
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-28 09:48:13 +02:00
Francesco Torchia 8f6b8c30df
Merge pull request #8271 from torchiaf/fix/5070-5
Remove jquery from SortableTable
2023-04-20 19:18:31 +02:00
Cody Jackson 487cf0d6a4 Migrating all of the files out of the nuxt directory into reasonable places within shell 2023-04-20 11:56:58 +02:00
Francesco Torchia 61adce9898
dom util, getParent function refactoring for readability
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-19 16:18:19 +02:00
Francesco Torchia eb1b97da1e
remove jquery, SortableTable
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-19 16:17:58 +02:00
Richard Cox cdc96df61d
Merge pull request #8347 from bashofmann/fix-grafana-url
Fix Grafana URLs in local cluster for new monitoring version
2023-04-18 10:44:01 +01:00
Francesco Torchia c3eedb3b31
Handle block styles in yaml files
- add the possibility to specify what Scalar Style to use in the yaml blocks ('|' or '>') and what Chomping style ('+' , '-' or empty)
  see https://yaml-multiline.info
- set default to style to '|+' (keep all newlines)
- adapt CruResource to get in input the new yaml options

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-03-29 15:59:42 +02:00
Giuseppe Leo da037a946e
Modify PSP deprecation warning message when upgrading a K3s custom cluster to v1.25 (#8464)
* Add decode utils for escaped HTML

* Allow to inject HTML in the markup as for i18n

* Correct wording and markup for PSP modal confirmation
2023-03-21 11:47:20 +01:00
Cody Jackson eecefff26a Moving the route files outside of the nuxt subfolder 2023-03-14 17:00:42 -07:00
Francesco Torchia 82ec6a4eda
Merge pull request #8220 from torchiaf/fix/5070-2
Remove jquery from position.js, select.js
2023-03-14 11:41:19 +01:00
Francesco Torchia fe2370db43
Merge pull request #8214 from torchiaf/fix/7758
Jobs, fix Duration field format
2023-03-14 11:26:55 +01:00