Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto select one and only cluster from pasted config #888

Merged
merged 3 commits into from
Sep 21, 2020

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Sep 15, 2020

  • Disable add button with tooltip if no clusters are selected
  • Add functionality to tooltip to display correctly over disabled
    elements

Signed-off-by: Sebastian Malton smalton@mirantis.com

fixes #850

@Nokel81 Nokel81 requested a review from a team September 15, 2020 17:24
@Nokel81 Nokel81 self-assigned this Sep 15, 2020
@@ -54,8 +54,7 @@

form:not([novalidate]):invalid &[type=submit]:not(.active),
&:disabled {
color: silver;
background: $buttonDisabledBackground;
opacity: 50%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this Lens standard behaviour?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, most other disabled items change opacity.

@jim-docker
Copy link
Contributor

jim-docker commented Sep 15, 2020

This works for "Paste as target" but not for "Select kubeconfig file":

Screen Shot 2020-09-15 at 5 25 57 PM

For drag-and-drop and file section by clicking the file folder the "Add cluster(s)" button remains disabled even though there is only one context in the kubeconfig. Or maybe that is intended...

@Nokel81 Nokel81 requested a review from jim-docker September 17, 2020 15:24
@Nokel81 Nokel81 added area/ui enhancement New feature or request labels Sep 17, 2020
Copy link
Contributor

@jim-docker jim-docker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except...this definitely gums up the integration tests, which open the drop-down and click on 'minikube'. Now it is probably deselecting 'minikube' and then trying to click the button, which will be grayed out.

Trying to run the tests locally makes it even worse, because it'll depend on how many contexts the user has in their config.

@Nokel81
Copy link
Collaborator Author

Nokel81 commented Sep 17, 2020

@jim-docker I just opened #917 to fix those tests

Sebastian Malton and others added 2 commits September 18, 2020 14:04
- Disable add button with tooltip if no clusters are selected
- Add functionality to tooltip to display correctly over disabled
  elements

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 force-pushed the auto-select-first-cluster branch from ba85658 to 35ab6ff Compare September 18, 2020 18:08
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81
Copy link
Collaborator Author

Nokel81 commented Sep 21, 2020

I have push a simplification to the addCluster function in app_spec.ts. Jim's PR #890 will rectify this and make that function better for the longer term.

@Nokel81 Nokel81 requested a review from jim-docker September 21, 2020 17:07
@Nokel81 Nokel81 merged commit 7f6ae6e into lensapp:master Sep 21, 2020
This was referenced Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pasting in kube config will one cluster in add clusters doesn't auto select it
2 participants