From 4645214a665b47a482aad8010abc5f49e1ab360c Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Fri, 5 Feb 2021 16:10:16 -0500 Subject: [PATCH] Renamed miq_event related files to miq_event_definition for consistency --- ...vent_controller.rb => miq_event_definition_controller.rb} | 4 ++-- app/helpers/application_helper.rb | 2 -- app/helpers/application_helper/page_layouts.rb | 2 +- app/views/{miq_event => miq_event_definition}/show.html.haml | 0 .../{miq_event => miq_event_definition}/show_list.html.haml | 0 config/routes.rb | 5 +---- product/views/{MiqEvent.yaml => MiqEventDefinition.yaml} | 0 7 files changed, 4 insertions(+), 9 deletions(-) rename app/controllers/{miq_event_controller.rb => miq_event_definition_controller.rb} (93%) rename app/views/{miq_event => miq_event_definition}/show.html.haml (100%) rename app/views/{miq_event => miq_event_definition}/show_list.html.haml (100%) rename product/views/{MiqEvent.yaml => MiqEventDefinition.yaml} (100%) diff --git a/app/controllers/miq_event_controller.rb b/app/controllers/miq_event_definition_controller.rb similarity index 93% rename from app/controllers/miq_event_controller.rb rename to app/controllers/miq_event_definition_controller.rb index 9eca40dd8f4c..b0b310ba5edc 100644 --- a/app/controllers/miq_event_controller.rb +++ b/app/controllers/miq_event_definition_controller.rb @@ -1,4 +1,4 @@ -class MiqEventController < ApplicationController +class MiqEventDefinitionController < ApplicationController before_action :check_privileges before_action :get_session_data after_action :cleanup_action @@ -36,7 +36,7 @@ def init_show def get_session_data @title = _("Events") - @layout = "miq_event" + @layout = "miq_event_definition" @lastaction = session[:miq_event_lastaction] @display = session[:miq_event_display] @current_page = session[:miq_event_current_page] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0a94f0695efb..228476bc1c5b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -390,8 +390,6 @@ def db_to_controller(db, action = "show") when "ScanItemSet" controller = "ops" action = "ap_show" - when "MiqEventDefinition" - controller = "miq_event" when "User", "Group", "Patch", "GuestApplication" controller = "vm" action = @lastaction diff --git a/app/helpers/application_helper/page_layouts.rb b/app/helpers/application_helper/page_layouts.rb index 811723679970..5425340c0722 100644 --- a/app/helpers/application_helper/page_layouts.rb +++ b/app/helpers/application_helper/page_layouts.rb @@ -27,7 +27,7 @@ def layout_uses_listnav? miq_ae_export miq_ae_logs miq_ae_tools - miq_event + miq_event_definition miq_policy miq_policy_export miq_policy_logs diff --git a/app/views/miq_event/show.html.haml b/app/views/miq_event_definition/show.html.haml similarity index 100% rename from app/views/miq_event/show.html.haml rename to app/views/miq_event_definition/show.html.haml diff --git a/app/views/miq_event/show_list.html.haml b/app/views/miq_event_definition/show_list.html.haml similarity index 100% rename from app/views/miq_event/show_list.html.haml rename to app/views/miq_event_definition/show_list.html.haml diff --git a/config/routes.rb b/config/routes.rb index 2700273a4346..f65eb8f18cc8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2181,14 +2181,11 @@ x_post }, - :miq_event => { + :miq_event_definition => { :get => %w( show show_list ), - :post => %w( - - ) }, :condition => { diff --git a/product/views/MiqEvent.yaml b/product/views/MiqEventDefinition.yaml similarity index 100% rename from product/views/MiqEvent.yaml rename to product/views/MiqEventDefinition.yaml