Fix: Change admin button URL from absolute to relative path to fix URL on Geo secondaries
Relates to issue #565596 (closed)
Changes
- Change
admin_urlfromadmin_root_urltoadmin_root_pathinsidebars_helper.rbto use relative path instead of absolute URL - This ensures the Admin button stays on the current Geo site instead of pointing to the primary site when on a Geo secondary
Before Change
- The Admin button would alway links to the primary site's URL (e.g.,
http://127.0.0.1:3000/admin), even if you were on the Geo secondary -http://127.0.0.1:3001)
After Change
- The Admin button points to the primary Admin path when on the primary
http://127.0.0.1:3000/adminand the secondary Admin path when on the secondaryhttp://127.0.0.1:3001/admin
Testing
- Follow the Easy Installation for GDK to set up 2 Geo instances - a primary and a secondary - https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/72a913f8fbdda624c8f0c9572e3c61d0e14b9e19/doc/howto/geo.md#easy-installation
- Visit the primary and check that the Admin button at the bottom of the sidebar points to the Admin page on the primary
- Visit the secondary and check that the Admin button on the bottom of the sidebar points to the Admin page on the secondary
Edited by Scott Murray