Skip to content

Commit

Permalink
Renamed miq_event related files to miq_event_definition for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
h-kataria committed Feb 5, 2021
1 parent 21b2da0 commit 399c972
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class MiqEventController < ApplicationController
class MiqEventDefinitionController < ApplicationController
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 0 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper/page_layouts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 1 addition & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2181,14 +2181,11 @@
x_post
},

:miq_event => {
:miq_event_definition => {
:get => %w(
show
show_list
),
:post => %w(

)
},

:condition => {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/config/routes.pending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ MiqAlertSetController:
- x_history
- x_search_by_name
- x_show
MiqEventController:
MiqEventDefinitionController:
- index
MiqPolicyController:
- adv_search_button
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@

it "and @explorer" do
@explorer = true
expect(subject[0]).to eq("event")
expect(subject[0]).to eq("miq_event_definition")
expect(subject[1]).to eq("_none_")
end

it "and not @explorer" do
@explorer = nil
expect(subject[0]).to eq("event")
expect(subject[0]).to eq("miq_event_definition")
expect(subject[1]).to eq("_none_")
end
end
Expand Down

0 comments on commit 399c972

Please sign in to comment.