-
Notifications
You must be signed in to change notification settings - Fork 81
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
Repository URL - always use distro base_path, show in detail screen #3737
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
No-Issue
…tory name and published alone is special, not pipeline:approved and rename Url to URL
…base_path when item.distributions is missing, load distribution, and either copy or alert no distribution when item.distributions is available, use disabled not alert (detail view will have distributions available, list won't)
Cc @newswangerd this should add copiable repository URLs in detail screen. |
This looks good! Thanks for doing this |
This comment was marked as outdated.
This comment was marked as outdated.
himdel
pushed a commit
to himdel/ansible-hub-ui
that referenced
this pull request
May 22, 2023
…nsible#3737) * page#addAlert - support alert ids No-Issue * getRepoURL - make it clear we need distribution_base_path, not repository name and published alone is special, not pipeline:approved and rename Url to URL * Copy CLI configuration - align with other implementation, use distro base_path when item.distributions is missing, load distribution, and either copy or alert no distribution when item.distributions is available, use disabled not alert (detail view will have distributions available, list won't) * AnsibleRepository detail - load distributions * repository detail - load distributions only once, show url too * Repository URL - use copy component (cherry picked from commit 295e36d) Also backports: Fix getRepoUrl so that it takes a parameter and returns the correct url. (ansible#3691) * Fix getRepoUrl so that it takes a parameter and returns the correct url. * Real equality. * Fix trailing backslash. No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com> (cherry picked from commit 5d7c183)
himdel
added a commit
that referenced
this pull request
May 23, 2023
…3737) (#3757) * page#addAlert - support alert ids No-Issue * getRepoURL - make it clear we need distribution_base_path, not repository name and published alone is special, not pipeline:approved and rename Url to URL * Copy CLI configuration - align with other implementation, use distro base_path when item.distributions is missing, load distribution, and either copy or alert no distribution when item.distributions is available, use disabled not alert (detail view will have distributions available, list won't) * AnsibleRepository detail - load distributions * repository detail - load distributions only once, show url too * Repository URL - use copy component (cherry picked from commit 295e36d) Also backports: Fix getRepoUrl so that it takes a parameter and returns the correct url. (#3691) * Fix getRepoUrl so that it takes a parameter and returns the correct url. * Real equality. * Fix trailing backslash. No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com> (cherry picked from commit 5d7c183) Co-authored-by: jctanner <tanner.jc@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-4.7
This PR should be backported to stable-4.7 (2.4)
backported-4.7
This PR has been backported to stable-4.7 (2.4)
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.
The
getRepoUrl
helper went through some changes recently, #3346 & #3691,but it only works when repository.name === distribution.base_path now.
That's not true for repositories without a distributions, repositories with spaces in name, or any repository where there was a distribution name clash and we created a new name.
=> make Repository Copy CLI configuration query the distribution api and use the actual base_path / fail when no distribution.
=> move loading distributions on the repo detail screen from a LazyDistributions component in DetailTab to the query method, allowing Copy CLI to be disabled on detail screen when no distributions,
=> change page addAlert to support alert ids - used to replace a "loading" alert with an "error"/"success" alert
And start showing the repository URL on the detail screen.