-
Notifications
You must be signed in to change notification settings - Fork 231
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
EnvFrom Issue Updates #2198
EnvFrom Issue Updates #2198
Conversation
@@ -46,7 +46,7 @@ <h4 class="section-label"> | |||
entries="container.envFrom" | |||
selector-placeholder="Secret/Config Map" | |||
env-from-selector-options="$ctrl.valueFromObjects" | |||
add-row-link="Add ALL Values from a Resource" | |||
add-row-link="Add ALL Variables from Secret or Config Map" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Add ALL Values..." is more accurate since secrets and config maps don't have "variables."
@beanh66 Are you OK with that change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spadgett That works for me. So it would be "Add ALL Values from Secret or Config Map" correct? In that case we should also change the top link to match. Would the top links be: "Add Variable | Add Value from Secret or Config Map" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it would be "Add ALL Values from Secret or Config Map" correct?
@beanh66 Yup! That's what I was thinking
9e1b927
to
77d5889
Compare
@@ -134,7 +134,11 @@ | |||
return referenceValue; | |||
}; | |||
|
|||
ctrl.checkEntries = function(option) { | |||
ctrl.checkEntries = function(option, entrySelectedEnvFrom) { | |||
if(_.isEqual(option, entrySelectedEnvFrom)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does option === entrySelectedEnvFrom
work or is it a copy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it might... but the data within "entrySelectedEnvFrom" is "moved" over so kind of a copy ... I had thought about placing a check for option.kind === entrySelectedEnvFrom.kind
to avoid firing the _.isEqual
every time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could check the UIDs, something like (untested)
if (entrySelectedEnvFrom.metadata.uid === option.metadata.uid) {
return false;
}
assuming neither is ever null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secrets and config maps can contain megabytes of data, so would be good to avoid a deep comparison if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works, and understood on the object complexity... Went ahead and checked the ===
comparison, it does appear to function as expected, they evaluate as equal. Was a little unsure since one of the parameters is being pulled through a nested ng-repeat
@@ -46,7 +46,7 @@ <h4 class="section-label"> | |||
entries="container.envFrom" | |||
selector-placeholder="Secret/Config Map" | |||
env-from-selector-options="$ctrl.valueFromObjects" | |||
add-row-link="Add ALL Values from a Resource" | |||
add-row-link="Add ALL Values from Secret or Config Map" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for clarity here.
77d5889
to
9aa346e
Compare
@beanh66 Opinion on these proposed changes? I feel like we're repeating ourselves with some of the labels and headings. Before: After: |
EnvFrom issue fixes for CSS, copy, and UX
9aa346e
to
544127e
Compare
Hmm. True, that does feel a touch overkill... |
I'm going to go ahead and merge this since it fixes several problems. Thanks @cdcabrera @beanh66 @ncameronbritt I still wouldn't mind your thoughts on my screenshots just above, though: #2198 (comment) [merge] |
Looks like a webdriver flake [merge] |
@cdcabrera @spadgett see my comments below:
Thoughts? |
Yeah, I see your point. I prefer "Add Value from Secret or Config Map" It also has the nice property of matching the field you see (
Yeah, we should fix the group ordering. It might be a random order now. |
[merge] |
[test] |
Opened flake #2200 |
[merge] |
[test] |
[merge] |
[test] |
Evaluated for origin web console test up to 544127e |
Evaluated for origin web console merge up to 544127e |
Origin Web Console Test Results: FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_web_console/250/) (Base Commit: 9c144f3) (PR Branch Commit: 544127e) |
Origin Web Console Merge Results: FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_web_console/308/) (Base Commit: 9c144f3) (PR Branch Commit: 544127e) |
EnvFrom issue fixes for CSS, copy, and UX. Updates parts of #2182