From f295dfa9fc79af84a1b1d5ccf05a09e48bc37a51 Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Thu, 16 Mar 2017 14:28:08 +0100 Subject: [PATCH 1/2] Overriding the default_show_template so that for m. domain, m. server and m. server group the own show partial is used (with angular controller initialization etc.) --- app/controllers/middleware_domain_controller.rb | 4 ++++ app/controllers/middleware_server_controller.rb | 4 ++++ app/controllers/middleware_server_group_controller.rb | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/app/controllers/middleware_domain_controller.rb b/app/controllers/middleware_domain_controller.rb index 9ee25c0fb05..612cd0269a9 100644 --- a/app/controllers/middleware_domain_controller.rb +++ b/app/controllers/middleware_domain_controller.rb @@ -13,6 +13,10 @@ def self.display_methods %w(middleware_server_groups) end + def self.default_show_template + "#{model.name.underscore}/show" + end + menu_section :cnt private diff --git a/app/controllers/middleware_server_controller.rb b/app/controllers/middleware_server_controller.rb index 3d18f9f114e..da9a3420de0 100644 --- a/app/controllers/middleware_server_controller.rb +++ b/app/controllers/middleware_server_controller.rb @@ -162,6 +162,10 @@ def self.display_methods %w(middleware_datasources middleware_deployments middleware_messagings) end + def self.default_show_template + "#{model.name.underscore}/show" + end + def button selected_operation = params[:pressed].to_sym diff --git a/app/controllers/middleware_server_group_controller.rb b/app/controllers/middleware_server_group_controller.rb index dc8341e0e92..354c1c9329e 100644 --- a/app/controllers/middleware_server_group_controller.rb +++ b/app/controllers/middleware_server_group_controller.rb @@ -38,6 +38,10 @@ def self.display_methods %w(middleware_servers) end + def self.default_show_template + "#{model.name.underscore}/show" + end + def textual_group_list [%i(properties), %i(relationships smart_management)] end From b7bd3f7932ce43ec716a36b9eb4222ffd4f91908 Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Thu, 16 Mar 2017 14:29:08 +0100 Subject: [PATCH 2/2] Adding missing entry for middleware_server_group. Although, it's not necessary now, when the own show logic is used. --- app/views/shared/views/ems_common/_show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/views/ems_common/_show.html.haml b/app/views/shared/views/ems_common/_show.html.haml index 24d4e273ca0..0bb8d604849 100644 --- a/app/views/shared/views/ems_common/_show.html.haml +++ b/app/views/shared/views/ems_common/_show.html.haml @@ -1,7 +1,7 @@ #main_div - arr = %w(container_images container_image_registries containers container_replicators container_routes) - arr.concat(%w(container_builds container_projects container_nodes container_services container_groups availability_zones host_aggregates)) - - arr.concat(%w(middleware_servers middleware_deployments middleware_datasources middleware_domains middleware_messagings)) + - arr.concat(%w(middleware_servers middleware_server_groups middleware_deployments middleware_datasources middleware_domains middleware_messagings)) - arr.concat(%w(security_groups floating_ips cloud_subnets network_routers network_ports cloud_networks)) - arr.concat(%w(load_balancers container_templates)) - arr.concat(%w(cloud_tenants ems_clusters flavors resource_group hosts instances images miq_templates cloud_volumes))