Project

General

Profile

« Previous | Next » 

Revision 9234d6c5

Added by Ohad Levy over 6 years ago

fixes #20652 - moved compute_resource js code to webpack

this creates a new namespace under tfm, tfm.computeResource
where relevant functions are expoed under the compute resource
namespace, for example:

tfm.computeResource.ovirt.termplateSelected function

Additional common functions are also exposed under the same namespace:

tfm.computeResource.providerSelected

I left the host form NIC code out of this PR as it actually requires
code changes, changes in this PR are comsetic (mostly linting) and
convertion to ES6.

View differences:

app/views/compute_resources/form/_ovirt.html.erb
<%= password_f f, :password, :keep_value => true, :unset => unset_password? %>
<% datacenters = (f.object.uuid.nil? && controller.action_name != 'test_connection') ? [] : f.object.datacenters rescue []%>
<%= selectable_f(f, :uuid, datacenters, {}, {:label => _('Datacenter'),
:onchange => 'ovirt_datacenterSelected();',
:onchange => 'tfm.computeResource.ovirt.datacenterSelected();',
:help_inline_permanent => load_datacenters_button_f(f, !datacenters.empty?) }) %>
<% quotas = (f.object.uuid.nil? && controller.action_name != 'test_connection') ? [] : f.object.quotas.all rescue []%>
<%= select_f f, :ovirt_quota, quotas, :id, :name, {}, :label => _("Quota ID") %>

Also available in: Unified diff