Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

chore[#50212]: rename to `edit_host`

Kabiru Mwenjaf240bf25c9d9
diff --git a/modules/storages/app/components/storages/admin/storage_view_component.html.erb b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
index 342dcc33e0a..d8e9bedbb59 100644
--- a/modules/storages/app/components/storages/admin/storage_view_component.html.erb
+++ b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
@@ -26,7 +26,7 @@
icon: :pencil,
tag: :a,
scheme: :invisible,
- href: edit_host_name_configuration_admin_settings_storage_path(storage),
+ href: edit_host_admin_settings_storage_path(storage),
aria: { label: I18n.t('storages.label_edit_storage') } ,
data: { 'test-selector': 'storage-edit-button' }
)
diff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rb
index 8a7f4d80f18..6f96cb51960 100644
--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb
+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb
@@ -41,7 +41,7 @@ class Storages::Admin::StoragesController < ApplicationController
# Before executing any action below: Make sure the current user is an admin
# and set the @<controller_name> variable to the object referenced in the URL.
before_action :require_admin
- before_action :find_model_object, only: %i[show destroy edit edit_host_name_configuration update replace_oauth_application]
+ before_action :find_model_object, only: %i[show destroy edit edit_host update replace_oauth_application]
# menu_item is defined in the Redmine::MenuManager::MenuController
# module, included from ApplicationController.
@@ -102,12 +102,8 @@ class Storages::Admin::StoragesController < ApplicationController
# rubocop:enable Metrics/AbcSize
- # Edit page is very similar to new page, except that we don't need to set
- # default attribute values because the object already exists
- # Called by: Global app/config/routes.rb to serve Web page
def edit; end
-
- def edit_host_name_configuration; end
+ def edit_host; end
# Update is similar to create above
# See also: create above
@@ -122,7 +118,7 @@ class Storages::Admin::StoragesController < ApplicationController
redirect_to edit_admin_settings_storage_path(@storage)
elsif OpenProject::FeatureDecisions.storage_primer_design_active?
@storage = ServiceResultErrorsPresenter.new(service_result)
- render :edit_host_name_configuration
+ render :edit_host
else
@errors = service_result.errors
render :edit
diff --git a/modules/storages/app/views/storages/admin/storages/edit_host_name_configuration.html.erb b/modules/storages/app/views/storages/admin/storages/edit_host.html.erb
similarity index 100%
rename from modules/storages/app/views/storages/admin/storages/edit_host_name_configuration.html.erb
rename to modules/storages/app/views/storages/admin/storages/edit_host.html.erb
diff --git a/modules/storages/config/routes.rb b/modules/storages/config/routes.rb
index f53a49ec2f6..7d9c98d2978 100644
--- a/modules/storages/config/routes.rb
+++ b/modules/storages/config/routes.rb
@@ -37,7 +37,7 @@ OpenProject::Application.routes.draw do
only: %i[new edit update]
member do
- get '/edit_host_name_configuration' => '/storages/admin/storages#edit_host_name_configuration'
+ get '/edit_host' => '/storages/admin/storages#edit_host'
delete '/replace_oauth_application' => '/storages/admin/storages#replace_oauth_application'
end
end