Allow EnvFrom Prefix#2377
Conversation
a3c0ced to
a6b6b19
Compare
a6b6b19 to
26c953a
Compare
| .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.
@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
spadgett
left a comment
There was a problem hiding this comment.
It'd probably be good for EnvironmentService compact method to remove empty prefixes.
| } | ||
| }; | ||
|
|
||
| ctrl.removePrefix = function (entry) { |
There was a problem hiding this comment.
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.
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.
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.
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.
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.
We usually don't include the self-closing /
There was a problem hiding this comment.
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.
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.
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 |
spadgett
left a comment
There was a problem hiding this comment.
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