Skip to content

Commit

Permalink
Fixup images
Browse files Browse the repository at this point in the history
  • Loading branch information
Manisha15 committed Jul 11, 2024
1 parent 531d642 commit a0897d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/views/compute_resources_vms/form/proxmox/_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
<% node_id = f.object.node_id %>
<% bridges = compute_resource.bridges(node_id) %>
<% volids = compute_resource.images_by_storage(node_id, 'local', 'iso') %>
<%= react_component('ProxmoxVmType', { vm_attributes: object_to_attributes_hash(f.object, true), nodes: nodes, images: images, pools: compute_resource.pools, storages: compute_resource.storages, from_profile: true, new_vm: new_vm, bridges: bridges, volids: volids}) %>
<% logger.warn("******************** images are #{images.as_json}")%>
<%= react_component('ProxmoxVmType', { vm_attributes: object_to_attributes_hash(f.object, true), nodes: nodes, images: images.as_json, pools: compute_resource.pools, storages: compute_resource.storages, from_profile: true, new_vm: new_vm, bridges: bridges, volids: volids}) %>
2 changes: 1 addition & 1 deletion webpack/components/ProxmoxVmType.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ProxmoxVmType = ({
from_profile, new_vm, storages, bridges, volids }) => {
console.log("*************** vm_attrs", vm_attributes, from_profile);
const nodesMap = nodes.map(node => ({value: node.node, label: node.node}));
const imagesMap = images.map(image => ({value: image, label: image}));
const imagesMap = images.map(image => ({value: image.uuid, label: image.name}));
const poolsMap = pools.map(pool => ({value: pool.poolid, label: pool.poolid}));
const [activeTabKey, setActiveTabKey] = React.useState(0);
const handleTabClick = (event, tabIndex) => {
Expand Down

0 comments on commit a0897d3

Please sign in to comment.