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

pulp_file: Repositories & Remotes #137

Merged
merged 11 commits into from
Dec 30, 2024
Merged

pulp_file: Repositories & Remotes #137

merged 11 commits into from
Dec 30, 2024

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Oct 30, 2024

Related to #81 - first parts

Adds a Pulp file menu section, with Repositories and Remotes, much like in Ansible.

shares RemoteForm & RepositoryForm, DeleteRemoteModal and DeleteRepositoryModal, LazyRepositories and LazyDistributions, and ListPage / DetailPage*
(TODO(later): share more code still, or switch to a common implementation with per-plugin sections/actions)

trying to follow a plugin='ansible'|'file'|'rpm' prop pattern, with a plugin2api(plugin).RepositoryAPI.list(...) etc.

@himdel himdel force-pushed the pulp-file branch 3 times, most recently from a6d3bae to 767c04e Compare November 17, 2024 18:36
@himdel himdel force-pushed the pulp-file branch 3 times, most recently from 1878035 to c8a9bcd Compare November 17, 2024 22:24
@himdel himdel mentioned this pull request Dec 30, 2024
himdel added a commit that referenced this pull request Dec 30, 2024
* remove uses of Certified

* DeleteAnsible{Remote,Repository}Modal -> Delete{Remote,Repository}Modal

* unbeta login, status

* remove double css import

both CollectionDependenciesList & CollectionUsedbyDependenciesList are only used from src/containers/collection-detail/collection-dependencies.tsx which already imports it

* fixup imports

nothing should import from under src/*/**

* conditional hr - only between resrouces
@himdel himdel force-pushed the pulp-file branch 3 times, most recently from 007ce95 to fc8ec03 Compare December 30, 2024 19:33
@himdel himdel marked this pull request as ready for review December 30, 2024 19:57
@himdel
Copy link
Collaborator Author

himdel commented Dec 30, 2024

So, on the one hand, this approach definitely adds too much duplicate code. Even when sharing DeleteRemoteModal, DeleteRepositoryModal, RemoteForm and RepositoryForm, and built on top of ListPage, it's still net +1.5 kLOC.

On the other, this exists now, works, and is not making a common base + plugin actions implementation later any harder. :shipit:


Testing:

  • Repository
    • list empty
    • create (with or without distro)
    • edit
    • delete
    • list
  • Remote
    • list empty
    • create
    • edit
    • delete
    • list

@himdel himdel merged commit c0e03bf into main Dec 30, 2024
2 checks passed
@himdel himdel deleted the pulp-file branch December 30, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant