Removal of selected repositories initiated successfully.
-Removal of selected repositories initiated successfully.
+ +Name | -Type | -Sync Status | -Content | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
- {{ repository.name }} - | -{{ repository.content_type }} | -- - - Not Synced - - - {{ repository.last_sync.result | capitalize}} - {{ repository.last_sync_words }} ago - - - N/A - | -
-
-
- {{ repository.content_counts.puppet_module || 0 }} Puppet Modules
-
-
+
+
|
+
- - You currently don't have any Repositories included in this Product, you can add Repositories using the button on the right. - -
+ diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js index 6d6449b4e51..42bda774dd9 100644 --- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js +++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js @@ -143,7 +143,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll $scope.errorMessages = response.data.errors; }; - $scope.repositoriesTable.removeRow(repository.id); + $scope.detailsTable.removeRow(repository.id); repository.$delete(success, error); }; @@ -155,7 +155,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll }; updateRepositoriesTable = function () { - $scope.repositoriesTable.replaceRow($scope.repository); + $scope.detailsTable.replaceRow($scope.repository); }; }] ); diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js index dfd58d21d5d..081188740e3 100644 --- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js +++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js @@ -16,7 +16,7 @@ angular.module('Bastion.repositories').controller('NewRepositoryController', function ($scope, Repository, GPGKey, FormUtils, translate) { function success(response) { - $scope.repositoriesTable.rows.push(response); + $scope.detailsTable.rows.push(response); $scope.successMessages.push(translate('Repository %s successfully created.').replace('%s', $scope.repository.name)); $scope.transitionTo('products.details.repositories.index', {productId: $scope.$stateParams.productId}); } diff --git a/engines/bastion_katello/test/products/details/product-repositories.controller.test.js b/engines/bastion_katello/test/products/details/product-repositories.controller.test.js index 234bbf22cc7..1e01a11f848 100644 --- a/engines/bastion_katello/test/products/details/product-repositories.controller.test.js +++ b/engines/bastion_katello/test/products/details/product-repositories.controller.test.js @@ -56,7 +56,7 @@ describe('Controller: ProductRepositoriesController', function() { })); it("sets up the repositories nutupane table", function() { - expect($scope.repositoriesTable).toBe(expectedTable); + expect($scope.detailsTable).toBe(expectedTable); }); it("provides a way to remove all of the selected repositories in the table", function() { diff --git a/engines/bastion_katello/test/repositories/details/repository-details-info.controller.test.js b/engines/bastion_katello/test/repositories/details/repository-details-info.controller.test.js index d532ec5aa0a..e82714bf6e1 100644 --- a/engines/bastion_katello/test/repositories/details/repository-details-info.controller.test.js +++ b/engines/bastion_katello/test/repositories/details/repository-details-info.controller.test.js @@ -21,7 +21,7 @@ describe('Controller: RepositoryDetailsInfoController', function() { repositoryId: 1 }; - $scope.repositoriesTable = { + $scope.detailsTable = { replaceRow: function (row) {}, removeRow: function () {} }; @@ -62,22 +62,22 @@ describe('Controller: RepositoryDetailsInfoController', function() { it('should save the repository and return a promise', function() { var promise; - spyOn($scope.repositoriesTable, 'replaceRow'); + spyOn($scope.detailsTable, 'replaceRow'); promise = $scope.save($scope.repository); expect(promise.then).toBeDefined(); - expect($scope.repositoriesTable.replaceRow).toHaveBeenCalledWith($scope.repository); + expect($scope.detailsTable.replaceRow).toHaveBeenCalledWith($scope.repository); }); it('should save the repository successfully', function() { - spyOn($scope.repositoriesTable, 'replaceRow'); + spyOn($scope.detailsTable, 'replaceRow'); $scope.save($scope.repository); expect($scope.errorMessages.length).toBe(0); expect($scope.successMessages.length).toBe(1); - expect($scope.repositoriesTable.replaceRow).toHaveBeenCalledWith($scope.repository); + expect($scope.detailsTable.replaceRow).toHaveBeenCalledWith($scope.repository); }); it('should fail to save the repository', function() { @@ -113,14 +113,14 @@ describe('Controller: RepositoryDetailsInfoController', function() { }); it('should set the upload status to success and refresh the repository if a file upload status is success', function() { - spyOn($scope.repositoriesTable, 'replaceRow'); + spyOn($scope.detailsTable, 'replaceRow'); spyOn($scope.repository, '$get'); $scope.uploadContent('{"status": "success"}', true); expect($scope.uploadErrorMessages.length).toBe(0); expect($scope.uploadSuccessMessages.length).toBe(1); expect($scope.repository.$get).toHaveBeenCalled(); - expect($scope.repositoriesTable.replaceRow).toHaveBeenCalledWith($scope.repository); + expect($scope.detailsTable.replaceRow).toHaveBeenCalledWith($scope.repository); }); it('should provide a method to determine if a repository is currently being syncd', function() { @@ -134,11 +134,11 @@ describe('Controller: RepositoryDetailsInfoController', function() { it("provides a way to sync a repository", function() { spyOn($state, 'go'); - spyOn($scope.repositoriesTable, 'replaceRow'); + spyOn($scope.detailsTable, 'replaceRow'); $scope.syncRepository($scope.repository); expect($state.go).toHaveBeenCalled(); - expect($scope.repositoriesTable.replaceRow).toHaveBeenCalledWith($scope.repository); + expect($scope.detailsTable.replaceRow).toHaveBeenCalledWith($scope.repository); }); it("should provide a valid reason for a repo deletion disablement", function() { @@ -172,12 +172,12 @@ describe('Controller: RepositoryDetailsInfoController', function() { it('should provide a way to remove a repository', function() { repository.id = 1; - spyOn($scope.repositoriesTable, 'removeRow'); + spyOn($scope.detailsTable, 'removeRow'); spyOn($scope, 'transitionTo'); $scope.removeRepository(repository); - expect($scope.repositoriesTable.removeRow).toHaveBeenCalledWith(1); + expect($scope.detailsTable.removeRow).toHaveBeenCalledWith(1); expect($scope.transitionTo).toHaveBeenCalledWith('products.details.repositories.index', {productId: 1}); }); }); diff --git a/engines/bastion_katello/test/repositories/new/new-repository.controller.test.js b/engines/bastion_katello/test/repositories/new/new-repository.controller.test.js index 421d59be103..903cc257616 100644 --- a/engines/bastion_katello/test/repositories/new/new-repository.controller.test.js +++ b/engines/bastion_katello/test/repositories/new/new-repository.controller.test.js @@ -15,7 +15,7 @@ describe('Controller: NewRepositoryController', function() { $httpBackend = $injector.get('$httpBackend'); FormUtils = $injector.get('FormUtils'); - $scope.repositoriesTable = {rows: []}; + $scope.detailsTable = {rows: []}; $scope.successMessages = []; $scope.$stateParams = {productId: 1}; $scope.repositoryForm = $injector.get('MockForm');