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

Let users paste certificate values #1068

Merged
merged 2 commits into from
Dec 22, 2016

Conversation

spadgett
Copy link
Member

When creating or editing a route, let users paste in the certificate values if they need to. Previously you could only upload from a file.

Fixes #964

screen shot 2016-12-22 at 9 32 33 am

When creating or editing a route, let users paste in the certificate
values if they need to. Previously you could only upload from a file.
@benjaminapetersen
Copy link
Contributor

Working through this, a few thoughts, but probably not to hold up your PR.

  • I skimmed right past the "secure routes" checkbox a few times expecting to see a "Security" heading at the same level as "Labels" below. Perhaps it would help draw the eye?
  • I'm curious if we should hide the boxes that are not relevant to a selection in the TLS Termination box. For example, if "Edge" doesn't need "Destination CA Certificate", do we need to show it?
  • I was surprised to see 4 sets, expected one option with just 2. Clearly I need to read up more on secure routes. 😄

@spadgett
Copy link
Member Author

I skimmed right past the "secure routes" checkbox a few times expecting to see a "Security" heading at the same level as "Labels" below. Perhaps it would help draw the eye?

Agree on this, although we'd have to decide how to make it look on the add to project page, which uses those heading for major sections. Maybe a smaller header?

openshift_web_console

I'm curious if we should hide the boxes that are not relevant to a selection in the TLS Termination box. For example, if "Edge" doesn't need "Destination CA Certificate", do we need to show it?

Yeah, maybe not. Trying to decide if we should show it and keep the existing warning if a value will be removed.

openshift_web_console

Maybe a stronger warning there saying the value will be removed from the route.

@spadgett
Copy link
Member Author

@benjaminapetersen I'm glad you made these comments because it got me testing. There's some stuff broken with routes (although they're fine in our 1.4 release). Working on fixes.

@benjaminapetersen
Copy link
Contributor

Ah, that totally makes sense if it has a value already but the type is changed so the value is no longer needed.

@spadgett
Copy link
Member Author

@benjaminapetersen I have showing and hiding the fields working, but it feels strange. The different termination types all support different certs. It's a bit disconcerting to see things appear and disappear when changing types. Since the certs are the last thing on the page, it can cause the page to jump/scroll when removed. Thinking we should table that.

@benjaminapetersen
Copy link
Contributor

Yeah, that works for me. Figured it was a note/discussion, but prob not holding up the PR if it makes things quirky.

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

On that note, LGTM!

@benjaminapetersen
Copy link
Contributor

Oh wait, just saw your comment about broken stuff with routes. Not a concern now, but will be?

@spadgett
Copy link
Member Author

Oh wait, just saw your comment about broken stuff with routes. Not a concern now, but will be?

About to push an update. There's an error creating edge routes currently. Also includes some improvement to the form (section headers).

@spadgett
Copy link
Member Author

@benjaminapetersen updated, PTAL at the second commit

* Make "Split traffic across multiple services" a checkbox like "Secure route"
* Add consistent section headings for "Alernate Services" and "Security"
* Fix bug where `insecureEdgeTerminationPolicy` was initialized to an
  invalid value, causing an error creating edge terminated routes
* Fix a bug where the range slider was not properly initialized for
  existing values
@benjaminapetersen
Copy link
Contributor

Checking it now

@benjaminapetersen
Copy link
Contributor

Couple observations:

  • I definitely like the headings for "Alternate Services" and "Security".
  • Checking "split traffic" is a bit jumpy. Couple things I struggled with here:
    • The slider works well, but once I click "edit weights as integers" I couldn't go back to the slider without refreshing the page.
    • When I switch to "edit weights as integers" it took me a while to figure out why I had a dropdown with only one service, even though the slider shows 2 services:
      screen shot 2016-12-22 at 2 47 03 pm
      I think its because the first service shows up above and the "weight" input now appears next to it. I had to think about that a bit as I expected everything I was interacting with to appear below the heading. I wonder if we could leave the above selector to be exclusive to "service to route to" and just list them all again under "split traffic" with the weight inputs (somehow show the primary service linked to the above "service to route to").
    • Once I added additional services beyond 2, it was a little easier to understand.

@spadgett
Copy link
Member Author

Yeah I don't disagree on the a/b services usability. I think we should revisit that (although probably a follow on at this point). We changed it to use the slider very recently.

@spadgett
Copy link
Member Author

Related PR #1053

@benjaminapetersen
Copy link
Contributor

Was just typing the same thing--I don't think that these observations relate to "paste cert value" so can def pull that out. I'll create an issue.

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

Only one nit in the code besides our discussion about the experience. Good to go!

@@ -24,7 +23,7 @@ angular.module('openshiftConsole')
var dropMessageSelector = "#" + scope.dropMessageID,
highlightDropZone = false,
showDropZone = false,
inputFileField = element.find('input[type=file]')[0];
inputFileField = element.find('input[type=file]');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we could do inputFileField = element.find('input[type=file]')[0]; or inputFileField = _.first(element.find()) here & not have to repeat the [0] a few places below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately I can't because I need the jQuery object in one place :/

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, true, because of the .change on 73, no worries!

@spadgett
Copy link
Member Author

thanks @benjaminapetersen !

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to 7816a26

@openshift-bot
Copy link

openshift-bot commented Dec 22, 2016

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/891/) (Base Commit: ab61c6f)

@openshift-bot openshift-bot merged commit 6bd8443 into openshift:master Dec 22, 2016
@spadgett spadgett deleted the paste-certs branch December 22, 2016 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants