New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #36373 - Add metadata expire option for custom repo to UI #10545
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issues: #36352 |
parthaa
reviewed
May 4, 2023
...javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
Outdated
Show resolved
Hide resolved
@parthaa updated |
Suggested patch. Add the X clear option. diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js
index 30bc43fba8..ffb77b4263 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js
@@ -232,6 +232,11 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
$scope.save($scope.repository);
};
+ $scope.clearMetadataExpire = function () {
+ $scope.repository['metadata_expire'] = null;
+ $scope.save($scope.repository);
+ };
+
$scope.clearAnsibleCollectionAuth = function () {
$scope.repository['ansible_collection_auth_url'] = null;
$scope.repository['ansible_collection_auth_token'] = null;
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
index 8b3e8e92e7..c12c1c4ddf 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
@@ -25,8 +25,10 @@
<dt translate>Type</dt>
<dd>{{ repository.content_type }}</dd>
- <dt ng-if="product.redhat != true" translate>Metadata Expiration</dt>
- <dd bst-edit-number="repository.metadata_expire" on-save="save(repository)" readonly="product.redhat || denied('edit_products', product)">
+ <dt ng-if="product.redhat != true" translate>Metadata Expiration (Seconds)</dt>
+ <dd bst-edit-number="repository.metadata_expire" on-save="save(repository)" readonly="product.redhat || denied('edit_products', product)"
+ deletable="repository.metadata_expire !== null"
+ on-delete="clearMetadataExpire()">
</dd>
</dl> |
@parthaa updated |
chris1984
changed the title
Refs #36352 - Add metadata_expire to repo details page
Fixes 36373 - Add metadata expire option for custom repo to UI
May 9, 2023
chris1984
changed the title
Fixes 36373 - Add metadata expire option for custom repo to UI
Fixes #36373 - Add metadata expire option for custom repo to UI
May 9, 2023
parthaa
approved these changes
May 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes introduced in this pull request?
What are the testing steps for this pull request?