fix(frontend): fixed changing location
before we were setting the location on the window when we should have been just using Angular $location service instead [TESTING -> tested locally with docker compose and a complete build] - [ ] It works! - [ ] Comments provide sufficient explanations for the next contributor - [ ] Tests cover changes and corner cases - [ ] Follows Quay syntax patterns and format
This commit is contained in:
parent
a6b7560fdc
commit
6e533e3627
4 changed files with 12 additions and 10 deletions
|
@ -10,7 +10,7 @@
|
|||
});
|
||||
}]);
|
||||
|
||||
function BuildViewCtrl($scope, ApiService, $routeParams, AngularPollChannel, CookieService) {
|
||||
function BuildViewCtrl($scope, ApiService, $routeParams, AngularPollChannel, CookieService, $location) {
|
||||
$scope.namespace = $routeParams.namespace;
|
||||
$scope.name = $routeParams.name;
|
||||
$scope.build_uuid = $routeParams.buildid;
|
||||
|
@ -51,8 +51,9 @@
|
|||
'build_uuid': build.id
|
||||
};
|
||||
|
||||
ApiService.cancelRepoBuild(null, params).then(function() {
|
||||
document.location = '/repository/' + $scope.namespace + '/' + $scope.name;
|
||||
ApiService.cancelRepoBuild(null, params).then(function () {
|
||||
$location.path('/repository/' + $scope.namespace + '/' + $scope.name);
|
||||
|
||||
}, ApiService.errorDisplay('Cannot cancel build'));
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue