Skip to content

Commit

Permalink
Fix missing $scope.refresh function in CDNs table (#7853)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntheanh201 authored Nov 1, 2023
1 parent 9775b3e commit 747a3cd
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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. ****/

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;

0 comments on commit 747a3cd

Please sign in to comment.