Skip to content

Commit

Permalink
Adding chassis to physical infra dashboard and adding racks and chass…
Browse files Browse the repository at this point in the history
…is to provider's listnav
  • Loading branch information
felipedf committed Aug 30, 2018
1 parent 1023c1b commit c14d857
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/decorators/physical_chassis_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class PhysicalChassisDecorator < MiqDecorator
def self.fonticon
'pficon pficon-cluster'
'pficon pficon-template'
end

def quadicon
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/ems_physical_infra_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def textual_group_properties
def textual_group_relationships
TextualGroup.new(
_("Relationships"),
%i(physical_racks physical_chassis physical_switches physical_storages physical_servers datastores vms physical_servers_with_host)
%i(datastores physical_chassis physical_racks physical_servers physical_servers_with_host physical_storages physical_switches vms)
)
end

Expand Down
9 changes: 8 additions & 1 deletion app/services/ems_physical_infra_dashboard_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,30 @@ def servers_group_data
end

def attributes_data
attributes = %i(physical_servers physical_switches physical_racks physical_storages)
attributes = %i(physical_chassis
physical_servers
physical_switches
physical_racks
physical_storages)

attr_icon = {
:physical_chassis => 'pficon pficon-cluster',
:physical_servers => 'pficon pficon-cluster',
:physical_switches => 'pficon ff ff-network-switch',
:physical_racks => 'pficon pficon-enterprise',
:physical_storages => 'pficon pficon-container-node',
}

attr_url = {
:physical_chassis => 'physical_chassis',
:physical_servers => 'physical_servers',
:physical_switches => 'physical_switches',
:physical_racks => 'physical_racks',
:physical_storages => 'physical_storages',
}

attr_hsh = {
:physical_chassis => _('Chassis'),
:physical_servers => _('Servers'),
:physical_switches => _('Switches'),
:physical_racks => _('Racks'),
Expand Down
8 changes: 8 additions & 0 deletions app/views/layouts/listnav/_ems_physical_infra.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
= miq_accordion_panel(_("Relationships"), false, "ems_rel") do
%ul.nav.nav-pills.nav-stacked
%li
= li_link(:count => @record.number_of(:physical_chassis),
:tables => 'physical_chassis',
:record => @record,
:display => 'physical_chassis')
= li_link(:count => @record.number_of(:physical_racks),
:tables => 'physical_racks',
:record => @record,
:display => 'physical_racks')
= li_link(:count => @record.number_of(:physical_servers),
:tables => 'physical_servers',
:record => @record,
Expand Down
10 changes: 5 additions & 5 deletions spec/helpers/ems_physical_infra_helper/textual_summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
include_examples "textual_group", "Overview", %i(topology), "topology"

include_examples "textual_group", "Relationships", %i(
physical_racks
datastores
physical_chassis
physical_switches
physical_storages
physical_racks
physical_servers
datastores
vms
physical_servers_with_host
physical_storages
physical_switches
vms
)

include_examples "textual_group_smart_management", %i(zone)
Expand Down

0 comments on commit c14d857

Please sign in to comment.