-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Disk controller setup does not add hard disk other than virtio0 #304
Conversation
5acdb9f
to
5182cff
Compare
@@ -26,7 +26,10 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %> | |||
<%= f.hidden_field :storage_type %> | |||
<%= select_f f, :storage, compute_resource.storages(node_id), :storage, :storage, { }, :label => _('Storage'), :label_size => "col-md-2" %> | |||
<%= select_f f, :controller, proxmox_controllers_map, :id, :name, { }, :label => _('Controller'), :label_size => "col-md-2", :disabled => !new_volume, :onchange => 'controllerSelected(this)' %> | |||
<%= text_f f, :device, :label => _('Device'), :label_size => "col-md-2", :disabled => !new_volume, :'data-min' => 0, :'data-soft-max' => proxmox_max_device(f.object.controller), :onchange => 'deviceSelected(this)' %> | |||
<div> | |||
<%= text_f f, :device, :label => _('Device'), :label_size => "col-md-2", :disabled => !new_volume, :'data-min' => 0, :'data-soft-max' => proxmox_max_device(f.object.controller), :onchange => 'deviceSelected(this)' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data-min and data-soft-max are absolute as they are used by the limitedSpinner, right?
var submitButton = $(item).closest('form').find('[data-disable-with]'); | ||
if (!isNaN(maxLimit) && !isNaN(deviceNumber) && deviceNumber > maxLimit) { | ||
if (warningContainer.length === 0) { | ||
warningContainer = $('<div class="warning-container" style="color: red;"><span style="color: red;">⚠</span> Warning: Value exceeds the maximum limit of ' + maxLimit + '.</div>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you set the warning-container parameter (styles) and the internal <span style....) in the app/views/compute_resources_vms/form/proxmox/server/_volume_hard_disk.html.erb and just set the text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... we will change this after swiching the form to react.
5182cff
to
9bd8f87
Compare
No description provided.