-
Notifications
You must be signed in to change notification settings - Fork 230
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 Config Map and Secret Link #2201
EnvFrom Config Map and Secret Link #2201
Conversation
@@ -67,6 +67,11 @@ | |||
role="button" | |||
aria-label="Delete row" | |||
ng-click="$ctrl.deleteEntry($index, 1)"></a> | |||
<a | |||
ng-if="!$ctrl.editEnvironmentFromForm.$dirty" |
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 won't hide the link if the variables form above is dirty.
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 logic should be getting removed since we're headed in the recommended direction of displaying the "details" modal link as soon as a value is selected for the list.... per 20171004 comments
@beanh66 Is it odd that the links just disappear after an edit? I wonder if we shouldn't show the contents in a dialog of somewhere on the current page? Or open the link in a new tab? |
@spadgett When I discussed with @cdcabrera I suggested we have the link appear immediately after the item is selected from the dropdown (before clicking save) so users could click that link to open a modal and view the values prior to committing to saving the changes. Is this no longer a possibility? |
@beanh66 I think that's a better approach. The current PR does something different. @cdcabrera Let's try to work on what @beanh66 suggests |
@spadgett @cdcabrera Was thinking something like this: |
6609bca
to
23100db
Compare
Per discussion looking for a bit of style advice on using the modal setup for header, body, and footer classes... this is what is currently working in the PR where we make use of |
@spadgett @beanh66 had a question around the Secret display...
Edit: Per discussion going to approach this round as just showing the property names, no values |
@cdcabrera This example uses modal-header |
@spadgett @cdcabrera In general styling looks great! I was originally thinking we would only list the parameters and not show values as well but if we decide to show both like you have here, I think there should be an option to reveal the hidden values, otherwise why have them listed? |
aee5168
to
65b96ce
Compare
fc1c603
to
67fdf59
Compare
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 might be pretty easy to throw in a "Reveal Secret" link for secrets since you're already decoding the data.
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} | ||
<small class="muted">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4> | ||
|
||
<div ng-if="!($ctrl.overlayPaneEntryDetails.data | hashSize)" class="empty-state-message text-center"> |
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.
s/hashSize/size
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 any contrasting opinion to wrapping the size/lodash filter with hashSize
? Or we/I could do one big catch with a massive search and replace... I seem to keep making this slip up
<small class="muted">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4> | ||
|
||
<div ng-if="!($ctrl.overlayPaneEntryDetails.data | hashSize)" class="empty-state-message text-center"> | ||
The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} has no items. |
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.
"has no properties."
<div ng-if="$ctrl.overlayPaneEntryDetails.data | hashSize" class="table-responsive scroll-shadows-horizontal"> | ||
<table class="table table-bordered table-bordered-columns config-map-table key-value-table"> | ||
<tbody> | ||
<tr ng-repeat="(prop, value) in $ctrl.overlayPaneEntryDetails.data"> |
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.
nit: indentation
Looks good, just some minor comments. /test |
67fdf59
to
93fa531
Compare
@spadgett per quick discussion we'll aim to do the reveal secret as a separate PR |
93fa531
to
e887e86
Compare
I was able to create this error viewing details for at a config map with your changes. It seemed to be trying to decode a config map value.
|
@@ -27,6 +29,16 @@ | |||
|
|||
ctrl.setFocusClass = 'edit-environment-from-set-focus-' + uniqueId; | |||
|
|||
ctrl.viewOverlayPanel = function(entry) { | |||
ctrl.decodedSecretData = SecretsService.decodeSecretData(entry.data); |
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 shouldn't need to call this if we're not showing the secret content. For now, I'd just use entry.data
and not decode.
</div> | ||
<div class="modal-body"> | ||
<h4>{{$ctrl.overlayPaneEntryDetails.metadata.name}} | ||
<small class="muted">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4> |
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.
Instead of -
use –
<small class="muted">- {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}}</small></h4> | ||
|
||
<div ng-if="!($ctrl.overlayPaneEntryDetails.data | size)" class="empty-state-message text-center"> | ||
The {{$ctrl.overlayPaneEntryDetails.kind | humanizeKind : true}} has no properties. |
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 use lowercase names for kinds in sentences throughout the console, so remove the true
flag here.
ng-if="$ctrl.overlayPaneEntryDetails.kind === 'ConfigMap'" | ||
content="value" | ||
limit="1024" | ||
newline-limit="20" |
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.
Probably want to make these limits smaller since it's shown in a dailog.
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.
heh, agreed!
Setup for config map and secret details link. Styling adjustments per @sg00dwin.
e887e86
to
2e1dbef
Compare
This PR is sequenced to go in before PR "Environment From Fix Drag & Order Display" #2238 |
/lgtm |
Automatic merge from submit-queue. |
EnvFrom Issue Updates for...
EnvFrom issue fixes for CSS, copy, and UX. Updates parts of #2182
Initial work is aimed at re-opening the discussion around behavior... this PR initially...
@beanh66