Skip to content

Commit

Permalink
Merge pull request #2785 from h-kataria/dialog_form_buttons_fix
Browse files Browse the repository at this point in the history
Added missing classes to list APPLIES_TO_CLASS_BASE_MODELS
  • Loading branch information
Dan Clarizio authored Nov 21, 2017
2 parents e9bf2e7 + 8d49676 commit 318c4e4
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 318c4e4

Please sign in to comment.