dangogh closed pull request #1914: [Issue-1687] - DS Requests - adds stronger 
confirm when creating a request to delete a ds
URL: https://github.com/apache/incubator-trafficcontrol/pull/1914
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
 
b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
index 1c728d0617..3fd448da8d 100644
--- 
a/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
+++ 
b/traffic_portal/app/src/common/modules/form/deliveryService/edit/FormEditDeliveryServiceController.js
@@ -103,7 +103,7 @@ var FormEditDeliveryServiceController = 
function(deliveryService, type, types, $
                        createDeliveryServiceDeleteRequest(deliveryService);
                } else {
                        var params = {
-                               title: 'Delete Delivery Service: ' + 
deliveryService.displayName,
+                               title: 'Delete Delivery Service: ' + 
deliveryService.xmlId,
                                key: deliveryService.xmlId
                        };
                        var modalInstance = $uibModal.open({
diff --git 
a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
 
b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
index c99782fc40..b0083fa077 100644
--- 
a/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
+++ 
b/traffic_portal/app/src/common/modules/table/deliveryServiceRequests/TableDeliveryServiceRequestsController.js
@@ -35,15 +35,33 @@ var TableDeliveryServicesRequestsController = 
function(dsRequests, $scope, $stat
                        }
                });
                modalInstance.result.then(function() {
-                       var dsRequest = {
-                               changeType: 'delete',
-                               status: 'submitted',
-                               deliveryService: deliveryService
+                       params = {
+                               title: 'Delete Delivery Service: ' + 
deliveryService.xmlId,
+                               key: deliveryService.xmlId
                        };
-                       
deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest, false).
-                               then(function() {
-                                       $scope.refresh();
-                               });
+                       modalInstance = $uibModal.open({
+                               templateUrl: 
'common/modules/dialog/delete/dialog.delete.tpl.html',
+                               controller: 'DialogDeleteController',
+                               size: 'md',
+                               resolve: {
+                                       params: function () {
+                                               return params;
+                                       }
+                               }
+                       });
+                       modalInstance.result.then(function() {
+                               var dsRequest = {
+                                       changeType: 'delete',
+                                       status: 'submitted',
+                                       deliveryService: deliveryService
+                               };
+                               
deliveryServiceRequestService.createDeliveryServiceRequest(dsRequest, false).
+                                       then(function() {
+                                               $scope.refresh();
+                                       });
+                       }, function () {
+                               // do nothing
+                       });
                }, function () {
                        // do nothing
                });
diff --git 
a/traffic_portal/app/src/modules/private/deliveryServiceRequests/edit/FormEditDeliveryServiceRequestController.js
 
b/traffic_portal/app/src/modules/private/deliveryServiceRequests/edit/FormEditDeliveryServiceRequestController.js
index e4d1619b83..a978d0619a 100644
--- 
a/traffic_portal/app/src/modules/private/deliveryServiceRequests/edit/FormEditDeliveryServiceRequestController.js
+++ 
b/traffic_portal/app/src/modules/private/deliveryServiceRequests/edit/FormEditDeliveryServiceRequestController.js
@@ -89,14 +89,14 @@ var FormEditDeliveryServiceRequestController = 
function(deliveryServiceRequest,
                        switch (action.id) {
                                case $scope.DRAFT:
                                        dsRequest.status = 'draft';
-                                       
deliveryServiceRequestService.updateDeliveryServiceRequest(dsRequest.id, 
dsRequest).
+                                       
deliveryServiceRequestService.updateDeliveryServiceRequestStatus(dsRequest.id, 
'draft').
                                                then(function() {
                                                        $state.reload();
                                                });
                                        break;
                                case $scope.SUBMITTED:
                                        dsRequest.status = 'submitted';
-                                       
deliveryServiceRequestService.updateDeliveryServiceRequest(dsRequest.id, 
dsRequest).
+                                       
deliveryServiceRequestService.updateDeliveryServiceRequestStatus(dsRequest.id, 
'submitted').
                                                then(function() {
                                                        $state.reload();
                                                });


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to