This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 669c7149ca Refresh Delivery Service SSL Keys form after updating 
certificate (#7558)
669c7149ca is described below

commit 669c7149cada1d9fdcaeac504f0c6961f38436be
Author: Zach Hoffman <[email protected]>
AuthorDate: Tue Jun 6 22:37:22 2023 -0600

    Refresh Delivery Service SSL Keys form after updating certificate (#7558)
    
    Refresh Delivery Service SSL Keys form after renewing certificate
---
 .../FormDeliveryServiceSslKeysController.js                   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/traffic_portal/app/src/common/modules/form/deliveryServiceSslKeys/FormDeliveryServiceSslKeysController.js
 
b/traffic_portal/app/src/common/modules/form/deliveryServiceSslKeys/FormDeliveryServiceSslKeysController.js
index 3d7ce85e74..64a2644665 100644
--- 
a/traffic_portal/app/src/common/modules/form/deliveryServiceSslKeys/FormDeliveryServiceSslKeysController.js
+++ 
b/traffic_portal/app/src/common/modules/form/deliveryServiceSslKeys/FormDeliveryServiceSslKeysController.js
@@ -21,6 +21,7 @@
  * @param {*} deliveryService
  * @param {*} sslKeys
  * @param {*} $scope
+ * @param {*} $state
  * @param {import("../../../service/utils/LocationUtils")} locationUtils
  * @param {import("../../../api/DeliveryServiceSslKeysService")} 
deliveryServiceSslKeysService
  * @param 
{import("../../../service/utils/angular.ui.bootstrap").IModalService} $uibModal
@@ -28,7 +29,11 @@
  * @param {import("../../../service/utils/FormUtils")} formUtils
  * @param {import("angular").IFilterService} $filter
  */
-var FormDeliveryServiceSslKeysController = function(deliveryService, sslKeys, 
$scope, locationUtils, deliveryServiceSslKeysService, $uibModal, $anchorScroll, 
formUtils, $filter) {
+var FormDeliveryServiceSslKeysController = function(deliveryService, sslKeys, 
$scope, $state, locationUtils, deliveryServiceSslKeysService, $uibModal, 
$anchorScroll, formUtils, $filter) {
+
+       $scope.refresh = function() {
+               $state.reload(); // reloads all the resolves for the view
+       };
 
        var setSSLKeys = function(sslKeys) {
                if (!sslKeys.hostname) {
@@ -100,6 +105,7 @@ var FormDeliveryServiceSslKeysController = 
function(deliveryService, sslKeys, $s
                        
deliveryServiceSslKeysService.renewCert(deliveryService).then(
                                function() {
                                        $anchorScroll();
+                                       $scope.refresh();
                                        if ($scope.dsSslKeyForm) 
$scope.dsSslKeyForm.$setPristine();
                                });
                });
@@ -123,6 +129,7 @@ var FormDeliveryServiceSslKeysController = 
function(deliveryService, sslKeys, $s
                        deliveryServiceSslKeysService.addSslKeys(sslKeys, 
deliveryService).then(
                 function() {
                     $anchorScroll();
+                    $scope.refresh();
                     if ($scope.dsSslKeyForm) 
$scope.dsSslKeyForm.$setPristine();
                 });
                });
@@ -140,5 +147,5 @@ var FormDeliveryServiceSslKeysController = 
function(deliveryService, sslKeys, $s
 
 };
 
-FormDeliveryServiceSslKeysController.$inject = ['deliveryService', 'sslKeys', 
'$scope', 'locationUtils', 'deliveryServiceSslKeysService', '$uibModal', 
'$anchorScroll', 'formUtils', '$filter'];
+FormDeliveryServiceSslKeysController.$inject = ['deliveryService', 'sslKeys', 
'$scope', '$state', 'locationUtils', 'deliveryServiceSslKeysService', 
'$uibModal', '$anchorScroll', 'formUtils', '$filter'];
 module.exports = FormDeliveryServiceSslKeysController;

Reply via email to