ocket8888 commented on a change in pull request #3739: TP: adds the ability to 
rearrange delivery service table columns as well as toggle column 
visibility/searchability
URL: https://github.com/apache/trafficcontrol/pull/3739#discussion_r308313418
 
 

 ##########
 File path: 
traffic_portal/app/src/common/modules/table/serverDeliveryServices/TableServerDeliveryServicesController.js
 ##########
 @@ -31,6 +33,32 @@ var TableServerDeliveryServicesController = 
function(server, deliveryServices, $
                        );
        };
 
+       var confirmRemoveDS = function(ds, $event) {
+               if ($event) {
+                       $event.stopPropagation(); // this kills the click event 
so it doesn't trigger anything else
+               }
+
+               var params = {
+                       title: 'Remove Delivery Service from Server?',
+                       message: 'Are you sure you want to remove ' + ds.xmlId 
+ ' from this server?'
+               };
+               var modalInstance = $uibModal.open({
+                       templateUrl: 
'common/modules/dialog/confirm/dialog.confirm.tpl.html',
+                       controller: 'DialogConfirmController',
+                       size: 'md',
+                       resolve: {
+                               params: function () {
+                                       return params;
+                               }
+                       }
+               });
+               modalInstance.result.then(function() {
+                       removeDeliveryService(ds.id);
+               }, function () {
+                       // do nothing
 
 Review comment:
   I don't like ignoring errors, can this just be a `console.error`? It might 
make debugging easier down the road

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

Reply via email to