[Bug 43581] New: Replace the legacy plugin management pages with a Vue Installed plugins page
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Bug ID: 43581 Summary: Replace the legacy plugin management pages with a Vue Installed plugins page Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Depends on: 35837 Target Milestone: --- Bug 35837 added a new "Plugin store" page (Administration > Plugins > Plugin store) for discovering and installing plugins from the community plugin store. That work was deliberately scoped as an *addition* alongside the existing plugin management pages (plugins-home.pl, plugins-enable.pl, plugins-upload.pl, plugins-uninstall.pl) rather than a replacement, so it could be reviewed as a self-contained, low-risk patch with nothing removed. This bug is the follow-up that completes the migration: it replaces those legacy Perl/TT pages with a new "Installed plugins" Vue page, built on an extended version of the REST API bug 35837 introduced. Objectives: * Extend GET /api/v1/plugins (already added by bug 35837, currently just an unfiltered "list everything" used by the Plugin store page's own "already installed" check) with capability filtering and full KohaTable/DataTables serverSide pagination, sorting and free-text search support. * Add PUT /api/v1/plugins/{plugin_class} (enable/disable) and DELETE /api/v1/plugins/{plugin_class} (uninstall), both delegating to the existing Koha::Plugins::Handler. * Add a routed "Installed plugins" Vue page (Administration > Plugins > Installed plugins) listing installed plugins with Configure/Run tool/Run report/Run admin/Enable/Disable/Uninstall actions, the classic "View plugins by class" filter, and a "Check for updates" action comparing installed versions against the plugin store's discovery API (reusing bug 35837's plugin-store-api-client.js). * Remove plugins-home.pl, plugins-enable.pl, plugins-upload.pl and plugins-uninstall.pl, and repoint every link to them (admin-home.tt, the admin left-menu, the Tools/Reports plugin listings, the staff-tool wrapper breadcrumb, Koha::Plugins::Base's go_home()) at the new page. Depends on bug 35837: reuses its REST install/upload endpoints and Koha::Plugins::Install/Store, its plugin-store-api-client.js discovery client, and its Dialog.vue confirmation-dialog-over-component-dialog fix. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35837 [Bug 35837] Add a fully fledged plugin store to Koha -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Sponsorship status|--- |Sponsored Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206488&action=edit Bug 43581: Extend the plugins REST API for listing and managing installed plugins GET /api/v1/plugins already existed (added by bug 35837, for the discovery page's own "already installed" check) but only returned every installed plugin unfiltered. Extends it with capability filtering (?capability=report/tool/configure/admin) and full KohaTable/DataTables serverSide-mode support (pagination, sorting, free-text search across name/description/author), matching what the Installed plugins management page's table needs -- the list isn't backed by a DBIC resultset, so this is applied by hand rather than via the generic $c->objects->search helper. Adds PUT /api/v1/plugins/{plugin_class} (enable/disable) and DELETE /api/v1/plugins/{plugin_class} (uninstall), both delegating to the existing Koha::Plugins::Handler rather than duplicating its logic. KohaTable gains an actions_menu option, rendering a row's actions as a dropdown instead of inline buttons -- the installed-plugins table needs up to 7 possible actions per row (configure/run tool/run report/run admin/enable/disable/uninstall/update), too many to lay out inline the way a single-action table can. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206489 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206489&action=edit Bug 43581: Add a Vue Installed plugins management page, replacing the legacy plugin pages Adds a single-page plugin manager (Administration > Plugins > Installed plugins) built on the previous commit's extended REST API: lists installed plugins, with enable/disable/uninstall/configure/run actions, flags any plugin running outside its declared minimum/ maximum Koha version, and a "Check for updates" action comparing installed versions against the plugin store (depends on bug 35837). The "View plugins by class" dropdown from the old plugins-home.pl is restored here (report/tool/configure/admin, matching the capability filter the REST API supports), and an unsigned-install rejection from its own "Upload plugin"/"Update" actions surfaces as a confirmation dialog rather than a silent failure. plugins-home.pl (with its report/tool/configure/admin method dispatch), plugins-enable.pl, plugins-upload.pl, and plugins-uninstall.pl are fully replaced by this page and the REST API -- deleting them, rather than leaving them dead, avoids two working install/management paths with two different sets of checks applied. Every link that used to point at them (admin-home.tt, AdminMenu.vue, the tools/reports plugin listings, the staff-tool wrapper breadcrumb) now points at this page instead; Koha::Plugins::Base's go_home() and a stale POD reference in Koha::Plugins::Handler are updated the same way. Test plan: 1. Enable the Plugins system preference (and log in as a user with plugin permissions) if not already on. 2. Administration > Plugins > Installed plugins. Confirm any already- installed plugins list correctly, with working Configure/Run/ Enable/Disable/Uninstall actions. 3. Confirm the URLs /cgi-bin/koha/plugins/plugins-home.pl, plugins-enable.pl, plugins-upload.pl, and plugins-uninstall.pl now 404 rather than loading a page. 4. Click "Check for updates"; if any installed plugin has a newer version in the store, it should show "Update available (x.y.z)". If nothing is out of date, confirm you get a clear "all plugins up to date" message rather than nothing happening. 5. Confirm the Administration home page, and the Tools/Reports plugin listings (if you have report/tool plugins installed), all link to this same page rather than a 404. Depends on bug 35837 (the plugin-store discovery page, REST install endpoints, and Koha::Plugins::Install/Store this reuses). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #206488|0 |1 is obsolete| | Attachment #206489|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206525&action=edit Bug 43581: Extend the plugins REST API for listing and managing installed plugins GET /api/v1/plugins already existed (added by bug 35837, for the discovery page's own "already installed" check) but only returned every installed plugin unfiltered. Extends it with capability filtering (?capability=report/tool/configure/admin) and full KohaTable/DataTables serverSide-mode support (pagination, sorting, free-text search across name/description/author), matching what the Installed plugins management page's table needs -- the list isn't backed by a DBIC resultset, so this is applied by hand rather than via the generic $c->objects->search helper. Adds PUT /api/v1/plugins/{plugin_class} (enable/disable) and DELETE /api/v1/plugins/{plugin_class} (uninstall), both delegating to the existing Koha::Plugins::Handler rather than duplicating its logic. KohaTable gains an actions_menu option, rendering a row's actions as a dropdown instead of inline buttons -- the installed-plugins table needs up to 7 possible actions per row (configure/run tool/run report/run admin/enable/disable/uninstall/update), too many to lay out inline the way a single-action table can. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206526&action=edit Bug 43581: Add a Vue Installed plugins management page, replacing the legacy plugin pages Adds a single-page plugin manager (Administration > Plugins > Installed plugins) built on the previous commit's extended REST API: lists installed plugins, with enable/disable/uninstall/configure/run actions, flags any plugin running outside its declared minimum/ maximum Koha version, and a "Check for updates" action comparing installed versions against the plugin store (depends on bug 35837). The "View plugins by class" dropdown from the old plugins-home.pl is restored here (report/tool/configure/admin, matching the capability filter the REST API supports), and an unsigned-install rejection from its own "Upload plugin"/"Update" actions surfaces as a confirmation dialog rather than a silent failure. plugins-home.pl (with its report/tool/configure/admin method dispatch), plugins-enable.pl, plugins-upload.pl, and plugins-uninstall.pl are fully replaced by this page and the REST API -- deleting them, rather than leaving them dead, avoids two working install/management paths with two different sets of checks applied. Every link that used to point at them (admin-home.tt, AdminMenu.vue, the tools/reports plugin listings, the staff-tool wrapper breadcrumb) now points at this page instead; Koha::Plugins::Base's go_home() and a stale POD reference in Koha::Plugins::Handler are updated the same way. Test plan: 1. Enable the Plugins system preference (and log in as a user with plugin permissions) if not already on. 2. Administration > Plugins > Installed plugins. Confirm any already- installed plugins list correctly, with working Configure/Run/ Enable/Disable/Uninstall actions. 3. Confirm the URLs /cgi-bin/koha/plugins/plugins-home.pl, plugins-enable.pl, plugins-upload.pl, and plugins-uninstall.pl now 404 rather than loading a page. 4. Click "Check for updates"; if any installed plugin has a newer version in the store, it should show "Update available (x.y.z)". If nothing is out of date, confirm you get a clear "all plugins up to date" message rather than nothing happening. 5. Confirm the Administration home page, and the Tools/Reports plugin listings (if you have report/tool plugins installed), all link to this same page rather than a 404. Depends on bug 35837 (the plugin-store discovery page, REST install endpoints, and Koha::Plugins::Install/Store this reuses). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43581 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 206527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206527&action=edit Bug 43581: Link the plugin store search page back to installed plugins Home.vue already links out to the store's Search page ("Search for new plugins"), but Search.vue had no way back other than the admin sidebar -- which, with 9 sections and 56 links, may not even have Plugins visible without scrolling. Adds a matching "Installed plugins" button to Search.vue's toolbar. Also fixes plugin-store.pl, left over from bug 35837: it redirected to plugins-home.pl when plugin_store_url was unconfigured, but that page no longer exists after this bug's earlier commit deletes it, and blocking the whole controller doesn't make sense now that it also serves the Home route, which doesn't need a store configured. Moves the "hide when unconfigured" behaviour to a client-side beforeEnter guard on the Search route instead, so only Search itself redirects (to Home) when there's nothing to search. Test plan: 1. yarn build && restart_all 2. Administration > Plugins > Plugin store: confirm the new "Installed plugins" button in the toolbar navigates to the installed-plugins page. 3. With plugin_store_url unset in koha-conf.xml, navigate directly to /cgi-bin/koha/plugin-store/search: confirm it redirects to the installed-plugins page instead of erroring. 4. prove t/Koha/Plugins/Store.t t/Koha/Plugins/Install.t t/db_dependent/api/v1/plugins.t 5. yarn cypress run --spec t/cypress/integration/PluginStore_spec.ts,t/cypress/integration/PluginManager_spec.ts Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org