ocket8888 commented on a change in pull request #3534: TP Delivery Service
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r334638532
##########
File path:
traffic_portal/app/src/common/modules/form/deliveryServiceSslKeys/form.deliveryServiceSslKeys.tpl.html
##########
@@ -62,12 +76,12 @@
<span ng-show="hasError(dsSslKeyForm.privateKey)"
class="form-control-feedback"><i class="fa fa-times"></i></span>
</div>
</div>
- <div class="form-group" ng-class="{'has-error':
hasError(dsSslKeyForm.certificateSigningRequest), 'has-feedback':
hasError(dsSslKeyForm.certificateSigningRequest)}">
+ <div class="form-group" ng-class="{'has-error':
hasError(dsSslKeyForm.certificateSigningRequest) && requiresCrs(),
'has-feedback': hasError(dsSslKeyForm.certificateSigningRequest) &&
requiresCrs()}" ng-if="requiresCrs()">
Review comment:
if you have `ng-if` on these checking for a condition, what's the point of
styling them also based on that condition? if it's false, the element won't
exist in the DOM tree so it can't be styled anyway. That turns that condition
into a tautology in `ng-class`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services