Skip to content
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

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

Manisha15
Copy link
Contributor

No description provided.

@Manisha15 Manisha15 force-pushed the add_hdd_device_limit branch 2 times, most recently from 5acdb9f to 5182cff Compare December 19, 2023 11:11
@@ -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)' %>
Copy link
Contributor

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;">&#9888;</span> Warning: Value exceeds the maximum limit of ' + maxLimit + '.</div>');
Copy link
Contributor

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?

Copy link
Contributor

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.

@Manisha15 Manisha15 merged commit 2fcf04c into theforeman:master Dec 19, 2023
2 of 3 checks passed
Manisha15 added a commit that referenced this pull request Dec 19, 2023
Manisha15 added a commit to ATIX-AG/foreman_fog_proxmox that referenced this pull request Dec 19, 2023
Manisha15 added a commit to ATIX-AG/foreman_fog_proxmox that referenced this pull request Dec 19, 2023
@Manisha15 Manisha15 deleted the add_hdd_device_limit branch February 12, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants