Skip to content

Commit

Permalink
Added missing classes to list APPLIES_TO_CLASS_BASE_MODELS
Browse files Browse the repository at this point in the history
Added code back that was removed during refactoring to show different set of buttons when running a Dialog thru a custom button in VM explorer.

https://bugzilla.redhat.com/show_bug.cgi?id=1515433
Issue #2754
  • Loading branch information
h-kataria committed Nov 21, 2017
1 parent 387b4ca commit 8d49676
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller/buttons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def ab_group_delete
CloudVolume ContainerGroup ContainerImage ContainerNode ContainerProject
ContainerTemplate ContainerVolume EmsCluster ExtManagementSystem
GenericObjectDefinition Host LoadBalancer
MiqGroup MiqTemp NetworkRouter OrchestrationStack SecurityGroup Service
ServiceTemplate Storage Switch Tenant User Vm).freeze
MiqGroup MiqTemp MiqTemplate NetworkRouter OrchestrationStack SecurityGroup Service
ServiceTemplate Storage Switch Tenant User Vm VmOrTemplate).freeze
def applies_to_class_model(applies_to_class)
# TODO: Give a better name for this concept, including ServiceTemplate using Service
# This should probably live in the model once this concept is defined.
Expand Down
10 changes: 9 additions & 1 deletion app/controllers/vm_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,15 @@ def replace_right_cell(options = {})
elsif @in_a_form
# these subviews use angular, so they need to use a special partial
# so the form buttons on the outer frame can be updated.
if %w(attach detach live_migrate resize evacuate ownership add_security_group remove_security_group
if @sb[:action] == 'dialog_provision'
presenter.update(:form_buttons_div, r[
:partial => 'layouts/x_dialog_buttons',
:locals => {
:action_url => action,
:record_id => @edit[:rec_id],
}
])
elsif %w(attach detach live_migrate resize evacuate ownership add_security_group remove_security_group
associate_floating_ip disassociate_floating_ip).include?(@sb[:action])
presenter.update(:form_buttons_div, r[:partial => "layouts/angular/paging_div_buttons"])
elsif action != "retire" && action != "reconfigure_update"
Expand Down

0 comments on commit 8d49676

Please sign in to comment.