app/views/vm_common/_config.html.haml
= render :partial => "layouts/flash_msg"
- case @display
- when "devices"
- devices = devices_details
- if devices.present?
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Devices')
%tbody
- devices.each do |item|
%tr
%td.label
= h(item[:name])
%td
%i.fa-2x.fa-fw{:class => item[:icon]}
= h(item[:description])
- when "os_info"
- os_info = os_info_details
- if os_info
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Basic Information')
%tbody
- os_info.each do |item|
%tr
%td.label
= h(item[:osinfo])
%td
%img{:src => image_path("svg/os-#{h(@record.os_image_name.downcase)}.svg")}
= h(item[:description])
- unless @record.os_image_name =~ /linux/
- account_policy = account_policy_details
%hr
%table.table.table-bordered.table-striped
%thead
%tr
%th{:colspan => "2"}= _('Account Policies')
%tbody
- if account_policy.blank?
%tr
%td
%strong= _('Not Available')
- else
- account_policy.each_slice(2) do |items|
%tr
- items.each do |item|
%td
%strong
= h(item[:field])
= h(item[:description])
- when "hv_info"
- vmminfo = vmm_info_details
- devices = devices_details
- if vmminfo
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Basic Information')
%tbody
- vmminfo.each do |item|
%tr
%td.label
= h(item[:vmminfo])
%td
= h(item[:description])
%hr
- if devices.present?
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Devices')
%tbody
- devices.each do |item|
%tr
%td.label
= h(item[:name])
%td
%i.fa-2x.fa-fw{:class => item[:icon]}
= h(item[:description])
- when "snapshot_info"
= render :partial => "vm_common/snapshots_desc"
= render :partial => "vm_common/snapshots_tree"
- when "vmtree_info"
= render :partial => "vm_common/vmtree"
- when "networks"
- vmminfo = vmm_info_details
- if vmminfo
- @record.hardware.networks.each do |adapter|
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Network Adapter')
%tbody
- {:ipaddress => _('IP Address'),
:ipv6address => _('IPv6 Address'),
:description => _('Description'),
:dhcp_server => _('DHCP Server'),
:dhcp_enabled => _('DHCP Enabled'),
:default_gateway => _('Default Gateway'),
:subnet_mask => _('Subnet Mask'),
:dns_server => _('DNS Server')}.each do |sym, label|
%tr
%td.label
= label
%td
= adapter.send(sym)
- when "resources_info"
%table.table.table-bordered.table-striped.table-summary-screen
%thead
%tr
%th{:colspan => "2"}= _('Account Policies')
%tbody
- {:cpu_limit => _("CPU Limit"),
:cpu_reserve => _("CPU Reserve"),
:cpu_reserve_expand => _("CPU Reserve Expand"),
:cpu_shares => _("CPU Shares"),
:cpu_shares_level => _("CPU Shares Level"),
:memory_limit => _("Memory Limit"),
:memory_reserve => _("Memory Reserve"),
:memory_reserve_expand => _("Memory Reserve Expand"),
:memory_shares => _("Memory Shares"),
:memory_shares_level => _("Memory Shares Level")}.each do |sym, label|
%tr
%td.label
= label
%td
= @record.send(sym)