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

Namespace detail - fix Sign all #3652

Merged
merged 6 commits into from
Apr 27, 2023
Merged

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Apr 25, 2023

Issue: AAH-2308

Before: "sign all" would only sign collections in the repository of the first collection of the currently displayed list.

After: "sign all" only works when a repository is selected

20230425235133
20230425235205

Also updates findDistroBasePathByRepo to fix fallback,
allows SignCollectionAPI.sign to find repository by name,
and when using the myCollectionsByRepo route, use the repo to preset the repository filter

himdel added 5 commits April 25, 2023 23:03
…paces/:namespace

and update on route change, but only when matching or unset
make Sign all disabled when a repository is not selected,
don't disable it when no collections are found (other filters may be in place),

Issue: AAH-2308
@himdel himdel requested a review from jerabekjiri April 25, 2023 23:57
@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 Apr 25, 2023
@himdel himdel removed the backport-4.6 This PR should be backported to stable-4.6 (2.3) label Apr 25, 2023
@@ -19,7 +19,8 @@ export function findDistroBasePathByRepo(distributions, repository) {
const distro = distributions.find(
(distro) => distro.name === repository.name,
);
return distro ? distro.base_path : distro[0].base_path;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh :D, sorry for this 🤦

Copy link
Contributor

@jerabekjiri jerabekjiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice 👍 LGTM

@himdel himdel merged commit 7dd6688 into ansible:master Apr 27, 2023
@himdel himdel deleted the namespace-repo-sign branch April 27, 2023 15:25
@patchback
Copy link

patchback bot commented Apr 27, 2023

Backport to stable-4.7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.7/7dd6688b978c600b7e9650c379ee438f3ed3c8d2/pr-3652

Backported as #3658

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Apr 27, 2023
* CollectionFilter: change filter names to sentence case

* NamespaceDetail: set repository_name filter from /repo/:repo/my-namespaces/:namespace

and update on route change, but only when matching or unset

* findDistroBasePathByRepo - fall back to first distribution if any, not null[0]

* SignCollectionsAPI - support signing by repository name in addition to pulp_href

* Namespace detail: sign all collections only signs current repo now

make Sign all disabled when a repository is not selected,
don't disable it when no collections are found (other filters may be in place),

Issue: AAH-2308

* sync fail messages with #3655

(cherry picked from commit 7dd6688)
himdel added a commit that referenced this pull request Apr 27, 2023
* CollectionFilter: change filter names to sentence case

* NamespaceDetail: set repository_name filter from /repo/:repo/my-namespaces/:namespace

and update on route change, but only when matching or unset

* findDistroBasePathByRepo - fall back to first distribution if any, not null[0]

* SignCollectionsAPI - support signing by repository name in addition to pulp_href

* Namespace detail: sign all collections only signs current repo now

make Sign all disabled when a repository is not selected,
don't disable it when no collections are found (other filters may be in place),

Issue: AAH-2308

* sync fail messages with #3655

(cherry picked from commit 7dd6688)

Co-authored-by: Martin Hradil <mhradil@redhat.com>
@github-actions github-actions bot added the backported-4.7 This PR has been backported to stable-4.7 (2.4) label Apr 27, 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.

2 participants