Skip to content
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
merged 6 commits into from
May 22, 2023

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented May 18, 2023

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.

20230518232547
20230518232605
20230518232619
20230518232633
20230518233407
20230518233856

…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)
@github-actions github-actions bot added backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) labels May 18, 2023
@himdel himdel changed the title Repository URL - always use disto base_path, show in detail screen Repository URL - always use distro base_path, show in detail screen May 18, 2023
@himdel himdel removed the backport-4.6 This PR should be backported to stable-4.6 (2.3) label May 18, 2023
@himdel
Copy link
Collaborator Author

himdel commented May 18, 2023

Cc @newswangerd this should add copiable repository URLs in detail screen.

@himdel himdel requested a review from jerabekjiri May 18, 2023 23:40
@newswangerd
Copy link
Member

Cc @newswangerd this should add copiable repository URLs in detail screen.

This looks good! Thanks for doing this

@himdel himdel merged commit 295e36d into ansible:master May 22, 2023
19 of 21 checks passed
@himdel himdel deleted the getRepoURL branch May 22, 2023 21:28
@patchback

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>
@github-actions github-actions bot added the backported-4.7 This PR has been backported to stable-4.7 (2.4) label May 23, 2023
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants