You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ocket8888 (via GitHub)" <gi...@apache.org> on 2023/08/23 05:01:19 UTC
[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7736: Separate SSL success and warning alert messages
ocket8888 commented on code in PR #7736:
URL: https://github.com/apache/trafficcontrol/pull/7736#discussion_r1302483940
##########
traffic_ops/traffic_ops_golang/deliveryservice/keys.go:
##########
@@ -127,16 +127,27 @@ func AddSSLKeys(w http.ResponseWriter, r *http.Request) {
api.CreateChangeLogRawTx(api.ApiChange, "DS: "+*req.DeliveryService+", ID: "+strconv.Itoa(dsID)+", ACTION: Added/Updated SSL keys", inf.User, inf.Tx.Tx)
+ var alerts tc.Alerts
+
if isUnknownAuth {
- api.WriteRespAlert(w, r, tc.WarnLevel, "WARNING: SSL keys were successfully added for '"+*req.DeliveryService+"', but the input certificate may be invalid (certificate is signed by an unknown authority)")
- return
+ alerts.AddAlert(tc.Alert{
+ Text: "WARNING: SSL keys were successfully added for '" + *req.DeliveryService + "', but the input certificate may be invalid (certificate is signed by an unknown authority)",
Review Comment:
can we take out the "WARNING: " and "Successfully " while we're at it? That information is given to you by the Level. Imagine logging these prefixed by their level:
> WARNING: WARNING: SSL keys were successfully added for 'something', but the input certificate may be invalid (certificate is signed by an unknown authority)
> SUCCESS: Successfully added ssl keys for something
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org