crowbar/crowbar-core

View on GitHub
crowbar_framework/app/views/nodes/families.html.haml

Summary

Maintainability
Test Coverage
.row
  .col-xs-12
    %h1.page-header
      = t(".title")

.panel.panel-default
  %table.table.table-hover
    %thead
      %tr
        %th
          = t(".name")
        %th
          = t(".units")
        %th
          = t(".ram")
        %th
          = t(".nics")
        %th
          = t(".drives")
        - if bios_raid_options[:show].include? :raid
          %th
            = t(".raid")
        %th
          = t(".hardware")
        %th
          = t(".cpu")
          
    %tbody
      - @families.each do |family_name, attributes|
        %tr
          %td
            %ul
              - attributes[:names].sort_by { |node| node[:alias] }.each do |node|
                %li
                  = link_to node[:alias], node_path(node[:handle]), :title => node[:description]
          %td
            = attributes[:names].length
          %td
            = format_memory(attributes[:family][:ram])
          %td
            = attributes[:family][:nics]
          %td
            = attributes[:family][:drives]
          - if bios_raid_options[:show].include? :raid
            %td
              = attributes[:family][:raid]
          %td
            = attributes[:family][:hw]
          %td
            = attributes[:family][:cpu]