You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/11/20 06:45:52 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request, #7210: APIv5 Delivery Service updates for Traffic Portal

ocket8888 opened a new pull request, #7210:
URL: https://github.com/apache/trafficcontrol/pull/7210

   Primarily the motivation of this PR was to support the change of the "Active" property of Delivery Services from a boolean to an enumerated constant. More generally, though, that means using APIv5 for requests that include DS representations in either the request or response body(ies). The structure of responses changed in APIv5 for certain requests - not just because of "active".  POST requests, for example, used to return a `response` that was an array where the length was always one and the only element was the created DS; instead they now just return the DS without wrapping it in an array.
   
   Also, the service was returning the entire HTTP response, so I had to go track down all the places it was used. To make it easier for both me and anyone else who ever has to do anything similar, I added typings to the Delivery Service and Delivery Service Request API services. I also eliminated like half the lines of code by just using `async`/`await` instead of `.then` chains and callbacks.
   
   <hr/>
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   Make sure existing tests still pass, filter Delivery Services on the basis of their "Active" property, create, update, and delete DSes and DSRs
   
   ## PR submission checklist
   - [x] This PR uses existing tests
   - [x] This PR doesn't need documentation 
   - [x] This PR doesn't need a CHANGELOG.md entry since the change to the DS structure is already in the changelog
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
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


[GitHub] [trafficcontrol] shamrickus merged pull request #7210: APIv5 Delivery Service updates for Traffic Portal

Posted by GitBox <gi...@apache.org>.
shamrickus merged PR #7210:
URL: https://github.com/apache/trafficcontrol/pull/7210


-- 
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


[GitHub] [trafficcontrol] shamrickus commented on a diff in pull request #7210: APIv5 Delivery Service updates for Traffic Portal

Posted by GitBox <gi...@apache.org>.
shamrickus commented on code in PR #7210:
URL: https://github.com/apache/trafficcontrol/pull/7210#discussion_r1041226589


##########
traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html:
##########
@@ -50,20 +50,20 @@
                     <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu-right dropdown-menu" uib-dropdown-menu>
-                    <li role="menuitem"><a ng-click="clone(deliveryService)">Clone Delivery Service</a></li>
+                    <li role="menuitem"><a ng-href="/delivery-services/{{deliveryService.id}}/clone?dsType={{deliveryService.type}}">Clone Delivery Service</a></li>

Review Comment:
   This removes the `#!` resulting in a 404



-- 
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


[GitHub] [trafficcontrol] shamrickus commented on pull request #7210: APIv5 Delivery Service updates for Traffic Portal

Posted by GitBox <gi...@apache.org>.
shamrickus commented on PR #7210:
URL: https://github.com/apache/trafficcontrol/pull/7210#issuecomment-1337904210

   Looks like something is wrong with the tooltip HTML:
   
   ![image](https://user-images.githubusercontent.com/5377636/205713668-ab2bfa92-4b6e-450c-b898-d3109adcf654.png)
   


-- 
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


[GitHub] [trafficcontrol] shamrickus commented on pull request #7210: APIv5 Delivery Service updates for Traffic Portal

Posted by GitBox <gi...@apache.org>.
shamrickus commented on PR #7210:
URL: https://github.com/apache/trafficcontrol/pull/7210#issuecomment-1338126616

   Getting a 400 when attempting to update a DS with DSRs enabled. Looks like it's not sending the `delivery_service_id` with the request.


-- 
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