-
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
Allow EnvFrom Prefix #2377
Allow EnvFrom Prefix #2377
Conversation
a3c0ced
to
a6b6b19
Compare
a6b6b19
to
26c953a
Compare
@@ -170,7 +170,8 @@ | |||
} | |||
|
|||
.key-value-editor .key-value-editor-input, | |||
.key-value-editor-header { | |||
.key-value-editor-header, | |||
.environment-from-editor-header { |
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.
@sg00dwin made adjustment for the column widths see PR screenshot. Still looking like the column containing the prefix field is a few pixels off compared to the ui-select column above
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.
It'd probably be good for EnvironmentService compact method to remove empty prefixes.
@@ -87,6 +87,11 @@ | |||
} | |||
}; | |||
|
|||
ctrl.removePrefix = function (entry) { |
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.
Should no longer be needed.
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.
Agreed, on the clean up list
<small class="pficon pficon-help" | ||
aria-hidden="true" | ||
data-toggle="tooltip" | ||
data-original-title="Optional prefix added to each environment variable name for this resource."></small> |
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.
Maybe remove "for this resource." since it's a column header with many resources.
I know I'm picking nits on my own suggested wording :)
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.
agree, drop the "for this resource"
{{entry.configMapRef.name}}</span> | ||
<span ng-if="entry.secretRef.name">secret | ||
<span ng-if="entry.prefix">"{{entry.prefix}}"</span> | ||
{{entry.secretRef.name}}</span> |
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.
Maybe...?
Use all keys and values from config map my-config-map, adding name prefix "my-prefix-"
@jwforres is better at wording stuff then me, though.
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.
tough to stuff that into one sentence, would probably read better as two.
"Use all keys and values from config map my-config-map. Names will be prefixed with "my-prefix".
placeholder="Add prefix" | ||
id="envfrom-prefix-{{$index}}" | ||
name="envfrom-prefix-{{$index}}" | ||
ng-model="entry.prefix"/> |
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.
We usually don't include the self-closing /
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.
Old habits, can remove
<div class="form-group environment-from-input"> | ||
<div class="environment-from-input" ng-if="!$ctrl.isEnvFromReadonly(entry) && $ctrl.hasOptions()"> | ||
<label for="envfrom-prefix-{{$index}}" class="sr-only">Prefix</label> | ||
<input type="text" |
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.
This should have a pattern with a corresponding validation error. (I'll need to look up the correct regex for prefix.)
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, yeah send it over
Looks like prefix has to match the env name regex We're using |
944e8ab
to
26622e7
Compare
@cdcabrera Are you asking if we should show the prefix in the modal? I would just show the names as they are defined in the secret. |
@spadgett indeed was wondering if the prefix needed to be displayed in some fashion within the modal itself |
26622e7
to
343cf64
Compare
Opened envFrom to allow prefix input.
343cf64
to
bafca94
Compare
@spadgett per request removed the extra component bindings. Should now only have the main ones
Also as noted the "ng-pattern" copied over from key/values component misses out on special characters tacked onto the end, corrected it. There's still some funkiness around empty strings that happens on both Key/Values and EnvFrom @sg00dwin your styling updates have been merged into this PR |
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.
Code looks good, and this fixes the fundamental bug. We can look at any additional changes to presentation as follow-on work.
/lgtm |
Automatic merge from submit-queue. |
Opened envFrom to allow prefix input.
Related to #2182 and closes #2362