Fix and migrate missing clipboard buttons on Kubernetes cluster
What does this MR do and why?
The Copy to clipboard
buttons were not properly rendering in a read-only state. They also were using a deprecated style and needed to be migrated.
Screenshots or screen recordings
Before | After |
---|---|
Field | Default | Mouse hover | :hover |
:focus |
:active |
---|---|---|---|---|---|
Kubernetes cluster name | |||||
API URL | |||||
CA Cert |
How to set up and validate locally
- Turn on the feature flag for Kubernetes certificate clusters
echo "Feature.enable(:certificate_based_clusters)" | rails c
- Add a Kubernetes certificate cluster to any project. You should be able to leave
CA Certificate
blank, but if that doesn't work then in the model comment it out.
- After creating click on the name of the cluster in the list to go to the edit page.
- Turn the edit page into a read-only state. Easiest was is to remove the
!
from line 56 inapp/presenters/clusters/cluster_presenter.rb
- !cluster.provided_by_user?
+ cluster.provided_by_user?
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #417811 (closed)
Edited by Austin Regnery