This is an automated email from the ASF dual-hosted git repository.
ocket8888 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 747a3cdc59 Fix missing $scope.refresh function in CDNs table (#7853)
747a3cdc59 is described below
commit 747a3cdc5923350b1cb5aa3172c319ae56036f4e
Author: The Anh Nguyen <[email protected]>
AuthorDate: Wed Nov 1 17:50:17 2023 +0100
Fix missing $scope.refresh function in CDNs table (#7853)
---
.../app/src/common/modules/table/cdns/TableCDNsController.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/traffic_portal/app/src/common/modules/table/cdns/TableCDNsController.js
b/traffic_portal/app/src/common/modules/table/cdns/TableCDNsController.js
index 5909bb853c..3f2c5f0094 100644
--- a/traffic_portal/app/src/common/modules/table/cdns/TableCDNsController.js
+++ b/traffic_portal/app/src/common/modules/table/cdns/TableCDNsController.js
@@ -35,12 +35,13 @@ const getHref = cdn => `#!/cdns/${cdn.id}`;
/**
* @param {CDN[]} cdns
* @param {*} $scope
+ * @param {*} $state
* @param
{import("../../../service/utils/angular.ui.bootstrap").IModalService} $uibModal
* @param {import("../../../service/utils/LocationUtils")} locationUtils
* @param {import("../../../api/CDNService")} cdnService
* @param {import("../../../models/MessageModel")} messageModel
*/
-var TableCDNsController = function(cdns, $scope, $uibModal, locationUtils,
cdnService, messageModel) {
+var TableCDNsController = function(cdns, $scope, $state, $uibModal,
locationUtils, cdnService, messageModel) {
/**** Constants, scope data, etc. ****/
@@ -98,6 +99,10 @@ var TableCDNsController = function(cdns, $scope, $uibModal,
locationUtils, cdnSe
type: 1
}];
+ /** Reloads all resolved data for the view. */
+ $scope.refresh = function() {
+ $state.reload();
+ };
/**
* Deletes a CDN if confirmation is given.
@@ -253,5 +258,5 @@ var TableCDNsController = function(cdns, $scope, $uibModal,
locationUtils, cdnSe
};
-TableCDNsController.$inject = ["cdns", "$scope", "$uibModal", "locationUtils",
"cdnService", "messageModel"];
+TableCDNsController.$inject = ["cdns", "$scope", '$state', "$uibModal",
"locationUtils", "cdnService", "messageModel"];
module.exports = TableCDNsController;