Commit Graph

110 Commits

Author SHA1 Message Date
Nancy 21167e1dc9
fix labeledselect getOptionLabel to use reduce prop when labels change (#8176)
* fix labeledselect getOptionLabel to use reduce prop when labels change

* Add unit tests

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2023-02-15 09:19:48 -07:00
Giuseppe Leo f3f7a2a022
PSA: Update PSA default (#8133)
* Change inputs order for PSP/PSA/CIS; Code cleanup

* Add CIS override input; add and correct i18n for CIS

* Change label and input status, based on criteria

* Prevent issues for missing CIS profile args

* Disable logs to avoid code pollution

* Fix test issue

* Update PSA template default label

* Change PSACT on CIS changes if above 1.25

* Add banner for CIS cases

* Remove duplicated logic

* Correct issue after rebase
2023-02-14 18:03:38 +01:00
Giuseppe Leo fb590d2539
LabeledSelect: Displayed label does not update with options (#8154)
* Update displayed value in labeled select inputs if option labe changes but not the value

* Replace generic label and key with props

* Add i18n
2023-02-14 10:42:30 +01:00
wujun dce47f6d4a
polish namespace (#7915)
* polish namespace

* fix no getter.filterNamespace case

* add notFilterNamespace document

* HARVESTER: fix review comment

* add changeAllNamespaces comment
2023-02-13 16:52:06 -07:00
Shavindra 26cf8c6872
Allow user to select Fleet repo protocol select. (#7648)
* Allow user to select Fleet repo protocol select.

* Fix protoccol select.

* Fix PR comments.

* Fix translations.
2023-02-10 09:31:37 +00:00
Alexandre Alves 6516e094b8
Extensions enhancements (#7777)
* add extensions API methods
---------

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>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-02-09 10:58:29 +00:00
Phillip Rak fe58a9075c
Merge pull request #7990 from catherineluse/ingress-service-text
Add text to help with Services and Ingresses
2023-01-27 15:45:10 -07:00
Giuseppe Leo 0768d82f16
PSA minor changes (#8022)
* Add missing and correct i18n PSA labels

* Correct description size by removing helper

* Add title to Namespace list tooltip if any PSA

* Allow to disable use of checkbox for PSA form

* Change timeout for growl to 5s on Pod warning due PSA

* Add type label for PSA

* Move PSA menu under Advanced

* Replace toggling system label with extending the value within the same

* Emit initial PSA form values con creation if no checkboxes due lack of interactions
2023-01-25 14:02:26 +01:00
Catherine Luse 1d885b8588 Add text to help with Services and Ingresses 2023-01-21 22:51:28 -07:00
Nancy Butler 53774ce38c move harvester-mgr stuff 2023-01-09 10:48:42 -07:00
Giuseppe Leo 3e31e9f138
Add support for Pod Security Admission in the Namespace resource (#7619)
* Create models, config and utils for PSA

* Create PSA tab form view

* Create custom labels for Namespace

* Add icon option for Namespace detail view

* Add icon for Namespace list

* Add PSA tab for Namespace edit view

* Add i18n for all the PSA parts

* Separate PSA labels between mode and versions

* Filter DetailTop Namespace labels from PSA versions

* Correct unit test

* Correct Namespace tooltips for details, to be created after fetching the resources

* Remove unnecessary model

* Add todo for PSA implementation

* Add TODO for tests with checkbox and select

* Correct namespace list link with model method

* Add TODO

* Move i18n key for PSA

* Align Namespace detail view chips icon to the top

* Restore labels and annotation to the Namespace view

* Merge LabelsPSA features to existing Labels component

* Move all the PSA logic from the view to the model

* Tweaks following review

DetailTop
- Remove PSA specific code from generic component

ResourceDetail
- Remove PSA specific code from generic component
- Remove plumbing for descriptions and icons from parent component to DetailTop

Labels&Annotations component
- Default `show system labels` to off
- Ensure size of `Labels` and `Annotations` titles are the same
- Improve padding
- Remove PSA specific code from generic component
- Removed un-needed margin-bottom

Project/Namespace List
- Improve padlock icon alignment
- Improve spacing around PSA list in tooltip (this will pop up often)

PodSecurtyAdmission settings component
- Improved alignment on PSA checkbox

General Improvements
- Always show Labels&Annotations on Namespace config (view) page

* Changes following testing
- Fix display of show/hide system labels when there are no system labels
- Ensure PSA order shown in project/namespaces list PSA tooltip matches PSA controls in Namespace edit/config page
- Remove two usages of lodash
  - pickBy --> new common pickBy
  - values --> Object.values

* Fix unit tests

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-06 16:01:40 +01:00
Phillip Rak b17cffc7a1 Update probe labels and placeholders
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-01-03 09:02:01 -07:00
Shavindra 8072146758
Remove initial-empty-row from ArrayListGrouped. (#7669)
* Remove initial-empty-row from ArrayListGrouped.

* Fix merge conflicts.

* Fix tests.

* Fix tests.

* Fix linting.
2022-12-20 12:13:06 +01:00
Francesco Torchia 84b187eea4
Merge pull request #7742 from torchiaf/fix/7638
Secrets, remove empty rows after a file upload
2022-12-19 10:26:19 +01:00
Catherine Luse b41d734054
Merge pull request #6688 from bashofmann/logging-flow-match-namespaces
Add additional namespaces match field to logging ClusterFlow page
2022-12-16 18:19:58 -07:00
Francesco Torchia 204b20a007
Secrets, remove empty rows after a file upload
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-16 18:39:00 +01:00
Francesco Torchia bd07f9551a
SelectPrincipal, add tooltip when retainSelection is true
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-16 10:58:14 +01:00
Francesco Torchia 93aafffe88
Select Member, add tooltip
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-15 17:15:33 +01:00
Catherine Luse 1b71ccf8e7
Merge pull request #7508 from catherineluse/cluster-registry
Improve UX for cluster scoped private registry config
2022-12-08 15:26:50 -07:00
Catherine Luse 02a55137ae Adjust columns, X button padding in registry form 2022-12-08 14:55:37 -07:00
richa c792d21dd9
Fixed icon size (#7557)
* Fixed icon size

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed icon size in simplebox

* icon fix in GrowlManager.vue

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed close icon size

* Fixed more icons sizes

* Fixed icon size in namespaces filter

* Reverd css changes in LabeledSelect component

* Fix on Header

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Richa Bisht <RBISHT@Richas-MacBook-Pro.local>
2022-12-08 16:52:53 +01:00
Nancy 002c984e0f
refactor promptModal component props (#7435)
* use modalData.componentProps to pass props to custom modal components

* linting errors
2022-12-06 09:41:17 -07:00
Catherine Luse 327f080f48 Respond to feedback on private registry changes 2022-12-05 10:24:30 -07:00
Catherine Luse cdefd0d6fc Resolve merge conflict 2022-12-05 10:23:35 -07:00
Catherine Luse f315c9e8e4 Respond to feedback on ArrayList 2022-12-04 18:47:48 -07:00
Catherine Luse 6b73767d74 Add value to ArrayList 2022-12-04 17:12:31 -07:00
Catherine Luse f0591407ef Refactor ArrayList to avoid queueUpdate 2022-12-04 17:12:31 -07:00
Catherine Luse a279d22fc7 Put ArrayList in component library and storybook, add unit tests 2022-12-04 17:12:30 -07:00
Giuseppe Leo 669474f1c3
Allow KeyValue component to disable defined keys and conditionally filter from the view (#7587)
* Allow KeyValue to disable and hide protected keys

* Add KeyValue stories to the style guide
2022-12-01 02:07:04 +01:00
Nancy 6f8ade5765
set default container securityContext (#7539) 2022-11-30 14:15:55 -07:00
Giuseppe Leo 398dd308d4
Add icon option to Banner and Error component (#7586)
* Add icon option for the Banner

* Add icon option for the Error

* Fix CruResource tests

* Apply @rancher/components linting rules
2022-11-30 18:10:39 +01:00
Nancy bc17dea8d5
Fix role form input event handling (#7562)
* allow cloning roles; fix unlabaled taggable select style

* fix role edit/view config style inconsistency

* fix role form input event handling
2022-11-30 08:57:31 -07:00
Nancy ac4f997a51
do not attempt to hide recent events tab when there are no events (#7540) 2022-11-29 08:53:37 -07:00
Nancy 8a0f8211bd
allow cloning roles; fix unlabeled multi-select style (#7258)
* allow cloning roles; fix unlabaled taggable select style

* fix role edit/view config style inconsistency
2022-11-22 08:29:47 -07:00
Bastian Hofmann 60ebcaff7f Add additional namespaces match field to logging ClusterFlow page
This also fixes a styling issue in the select fields on the Flow and ClusterFlow page

Fixes
2022-11-21 09:45:08 +01: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
Shavindra 91d1e64a39
Fix project name editable. (#7223)
* Fix project name editable.
* Added component name.
2022-11-15 17:26:07 +00:00
richa f2e1ae8ac8
Added blue color only to creation action (#7118)
* Added blue color only to creation action

* Removed test code

* Revert some changes without dummy text

* Fixed names for attribute, color variables for dark and light theme, removed a tag

* Allow /rancherversion endpoint override (#7088)

* Fix KeyValue Component. (#7093)

* Fix KeyValue Component.

* Refactor solution.

* Fix PR comment.

* Adds new logos without Manager to bettr represent all sub-brands and improve readability

* Updates error of HSB colour to HSL

* Remove uneeded check - add custom check for old endpoints (#7058) (#7074)

* Allow to reset ui-brand global setting (#7110)

* Remove negative margin for Tabbed component, causing issues in Network policies (#7108)

* Update script to use newer version of Rancher Docker (#7114)

* Removed files from featured-carousel PR that should not be there at top-level (#7092)

* Allow wildcards in ingress hostnames (#7025)

Wildcards are allowed in ingress hostnames since Kubernetes 1.18: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#support-for-hostname-wildcards

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

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>

* Improve PSP deprecated banner
Fixes #7096

Previously...
- a new request for PSPs was made on each page visit
- the request would fail for users without access to the PSP
- failed requests equated to white page dev error (fine in prod)

Now...
- use the `counts` resource to determine if the user can see any PSPs
- move logic to a computed property

* Hide experimental charts from Cluster Tools

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Shavindra <Shavindra@users.noreply.github.com>
Co-authored-by: Kenneth Wimer <wimer@suse.com>
Co-authored-by: Jordon Leach <40806497+jordojordo@users.noreply.github.com>
Co-authored-by: Giuseppe Leo <giuseppe.leo@suse.com>
Co-authored-by: Bastian Hofmann <bashofmann@gmail.com>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-11-15 14:31:08 +01:00
richa b39bb589a8
Bug fix namespace value (#7170)
* Fixed namespance clear value bug

* Removed if condition

* Removed extra code

* Corrected the label for create namespace option
2022-11-15 14:17:10 +01:00
Bastian Hofmann cf8bab6b60
Clean up ResourceSelector 2022-11-14 15:21:08 +01:00
Bastian Hofmann d7a969d366
Add UI for PodDisruptionBudgets
This also adds a new menu group "Policy" which includes all policy related resources
* LimitRange
* NetworkPolicy
* PodDisruptionBudget
* ResourceQuota

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2022-11-14 15:21:02 +01: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 1e2baae84d
remove @input event from v-select (#7360)
* remove @input event from v-select as event is already sent by default by v-select

* adjust unit tests

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-11-09 17:40:43 +00:00
Richard Cox ceb38156e8
Add basic tests for some settings in the Branding Page (#6713)
* Set data test id and allow complex component to have default and inherited values for all the actions

* Create cluster tests with steps; Create cluster E2E test

* Extend command to use selector matchers

* Create test for cluster navigation and deletion

* Extend commands to find by id as in get method

* Extend documentation with guidelines and info about E2E

* Correct cluster delete and details tests to get menu within speciftc cluster row

* Add remaining E2E tests for the cluster

* Add baseUrl to the paths

* Add RKE2 selection on cluster creation for CI

* Add E2E debugging information

* Rename clluster manager E2E for consistency

* Correct data test ID after rebase

* Prevent cluster provider errors if no management parameter is provided

* Prevent accessing objects in mutation if none is provided

* Remove imported cluster sample due discarded logic

* Reset RKE2 switch on cluster creation

* Adjust test naming for cluster manager

* Replace static data test ID with a variable

* Groupped tests under different common types

* Add POs for pages and componets used in the cluster tests
- fixes #6627
- provides common POs and page POs
- covers a lot of the basic list features

* Remove testid from generic create page
- this is a page at the top level of vue
- any custom test id would need to come from params (cluster, product and/or resource)

* Fix application of branding, color and theme from settings
- The watchers for settings apply them
- This was not happening as they never changed from the initial value
- Caused by 771f168a5b
- Revert to the initial way. This may break epinio but that can be fixed later on

* Add basic tests for some settings in the Branding Page
- Add PO to easier test pages that have a cluster id in their path
- Skip some tests (either liable to change, or hard to validate change)
- There's issues getting values from shadow dom, see value() from labeled-input

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2022-11-09 14:22:02 +00: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
Nancy b92d49df66
move harvester service add on translations back into shell (#7189) 2022-10-13 12:56:16 -07:00
Shavindra e94b5a26ba
Prevent blocking effect secondary resources on workloads (#6860)
* move secondary data requests to a non-blocking ui method + pass loading props to the correct labeled selects

* main data loading procedure for secondary data done

* use pvcs from secondary resource fetch on storage component

* rename loading props to asyncDataLoading for better context

* cleanup

* move secondary resources data loading logic to a mixin

* cleaning up resource-manager mixin

* fix issue where namespace  wasnt being updated on secondary requests

* add doc description for data structure for resourceData

* minor change

* add plural option to resource-manager + remove loading var from workloads for sec resources + optimise persistentvolume edit view

* improve persistentvolumeclaim edit view

* add loading flag

* addressing PR comments

* fix latest PR comments

* doc on classify option for resourceManagerFetchSecondaryResources param

* Ensure reponse for namespace resources mimics non-namespaced
- The resources returned when requesting namespaced types do not contain id, type and links properties.
- This isn't perfect, or universally applicable, but will work for the current set of use cases

* working on merge conflicts

* Remove files from bad merge

* Handle new namespaces
- The secondary resource manager fetches some resources by namespace
- The user however can supply a new namespace
- When in `new namespace` mode we need to
  - avoid trying to fetch namespaced resource
  - clear any cached namespaced resource
- this only currently applies to workloads, PV and PVC pages don't fetch namespaced resources

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-10-09 10:40:32 +01:00
Shavindra 7fa9b74d62
Fix KeyValue Component. (#7093)
* Fix KeyValue Component.

* Refactor solution.

* Fix PR comment.
2022-10-06 13:20:52 +01:00
Jordon Leach 7297b8553f
Plugin updates for custom charts within pkg (#7077)
* Plugin updates for custom charts within pkg

* Remove unnecessary valuesComponent set
2022-10-05 10:01:10 -04:00
Nancy 29e666c7a7
Revert "HARVESTER: fix select style (#7055)" (#7064)
This reverts commit 8909903e44.
2022-10-03 15:58:03 +01:00