-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
15,119 additions
and
27,353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/overrides/compute_resources_vms/form/add_react_to_host_form.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Deface::Override.new( | ||
:virtual_path => 'hosts/_unattended', | ||
:name => 'add_react_js_to_host_form', | ||
:replace_contents => "div#compute_resource", | ||
:text => "<%= render('compute_resources_vms/form/proxmox/add_react_js_to_host_form', host: @host, vm: @vm, compute_resource: @host.compute_resource) if @host.compute_resource %>", | ||
:original => 'ce6211df4eac241538eb3844e2ba5fb911a98772', | ||
) | ||
|
5 changes: 5 additions & 0 deletions
5
app/overrides/compute_resources_vms/form/remove_from_profile_network_and_storage.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Deface::Override.new( | ||
virtual_path: 'compute_attributes/_compute_form', | ||
name: 'remove_networks_and_volumes_partial', | ||
remove: "erb[loud]:contains('render :partial => \"compute_resources_vms/form/networks\"'), erb[loud]:contains('render :partial => \"compute_resources_vms/form/volumes\"')" | ||
) |
33 changes: 33 additions & 0 deletions
33
app/views/compute_resources_vms/form/proxmox/_add_react_js_to_host_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<% content_for(:javascripts) do %> | ||
<%= webpacked_plugins_js_for :foreman_fog_proxmox %> | ||
<%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm', "data-turbolinks-track" => true %> | ||
|
||
<% end %> | ||
<%= compute_resource %> | ||
<%= fields_for "#{type}[compute_attributes]", @vm || host.compute_object do |compute| %> | ||
<%= f.object_name%> | ||
<%= "this page is loaded"%> | ||
<% if compute.object %> | ||
<%= alert(:header => _('Notice'), | ||
:class => 'alert-info hide', | ||
:id => 'update_not_supported', | ||
:text => _('Virtual machine settings cannot be edited on an existing machine in %s') % | ||
compute_resource.provider_friendly_name) %> | ||
<%= render partial: provider_partial(compute_resource, 'base'), | ||
locals: { f: f, host: host, compute_resource: compute_resource, new_host: host.new_record?, new_vm: !compute.object.persisted?, | ||
arch: host.architecture_id, os: host.operatingsystem_id } %> | ||
<% else %> | ||
<% if host.new_record? %> | ||
<%= alert(:class => 'alert-danger', | ||
:header => _("Failed connecting to %s") % compute_resource, | ||
:text => _("Errors: %s") % compute_resource.errors.full_messages.to_sentence) %> | ||
<% else %> | ||
<%= alert(:class => 'alert-danger', | ||
:header => _("'%{host}' not found on '%{resource}'") % { :host => host.name, :resource => compute_resource }, | ||
:text => _("'%{host}' could be deleted or '%{resource}' is not responding.") % { host: host.name, resource: compute_resource}) %> | ||
<% end %> | ||
<% end%> | ||
<%= hidden_field_tag 'capabilities', compute_resource.capabilities, :disabled => true %> | ||
<%= hidden_field_tag 'provider', compute_resource.provider, :disabled => true %> | ||
<%= content_tag(:div,'', :id => :'supports_update', :data=> { :'supports-update'=> compute_resource.supports_update? || (host && host.new_record?) }) %> | ||
<% end if compute_resource %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.