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

Physical server page #970

Closed
wants to merge 48 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ca99b62
[Routes] Adds routes to physical_server
Mar 20, 2017
95edeb1
[EmsCommon] Adds physical_server flags
Mar 20, 2017
0ef30c0
[ui_constants] Adds physical_server structure
Mar 20, 2017
d60cc0a
[QuadIcon] Adds PhysicalServer structure
Mar 20, 2017
3c0e12f
[TextualSummary] Adds physical server flag
Mar 21, 2017
8affee9
[TextualSummary] Adds physical server flag
Mar 21, 2017
aa60337
[PhysicalServerFlags] Adds physical server flag
Mar 21, 2017
92c7549
[PhysicalServerViews] Adds all physical server views
Mar 21, 2017
4feb863
[PhysicalServerController] Adds physical server's controller
Mar 21, 2017
7142a11
[PhysicalServerToolbar] Adds physical server's toolbar structure.
Mar 21, 2017
bef6016
Add helpers to physical server pages
Mar 21, 2017
471a4e2
Change physical infra helpers
Mar 21, 2017
fb91056
Add images assets to physical server pages
Mar 21, 2017
ea20828
[Fix] Fixes all warning made by rubocop
Mar 21, 2017
0a3a4a3
[Fix] Fixes warning in files made by rubocop
Mar 22, 2017
4b2916a
[Fix] Fixes of warning made by rubocop into views and helpers of phys…
Mar 22, 2017
7bb757a
[Fix] Fixing some issues
Mar 22, 2017
7ad7e4b
[Fix] Changes html_safe to safe_join
Mar 22, 2017
019c7f4
[Typo] Typo some errors warning by rubocop
Mar 22, 2017
fefe826
[Typo] Delete a blank space after backslash
Mar 22, 2017
4d82e5d
[Fix] Turns into hash rockets syntax
Mar 22, 2017
5c0ef75
[Fix] Inserts '.try' method call
Mar 22, 2017
dc082d9
Merge remote-tracking branch 'manageiq/master' into physical_server_page
Mar 23, 2017
6d646bc
[BugFix] Changes the attribute methods call
Mar 23, 2017
26de5af
Create fetures for physical servers toolbar's buttons.
gabrielsvinha Apr 7, 2017
4b08d75
Update ci processing with methods for toolbar buttons
gabrielsvinha Apr 7, 2017
87c39e4
Update toolbar button with modify methods
gabrielsvinha Apr 7, 2017
f3c5a59
Insert cases for ems common show toolbar buttons
gabrielsvinha Apr 7, 2017
f069e05
Update textual summary name methods
gabrielsvinha Apr 7, 2017
19d23a1
Fix methods calls for physical server center button
gabrielsvinha Apr 10, 2017
f3f6bdc
Merge remote-tracking branch 'ManageIQ/master' into physical_server_page
gabrielsvinha Apr 10, 2017
9b82528
Remove & operators from physical server textual summary
gabrielsvinha Apr 11, 2017
7e836c4
Removes vms variable.
gabrielsvinha Apr 11, 2017
762d426
Fix ems_common controller
walteraa Apr 19, 2017
3f36681
Merge remote-tracking branch 'manageiq/master' into physical_server_page
walteraa Apr 19, 2017
8adb93b
Fix rubocop issues
walteraa Apr 19, 2017
301bb36
Fix rubocup styles for physical server textual summary
gabrielsvinha Apr 19, 2017
1c139d0
Merge branch 'physical_server_page' of github.com:lenovo/manageiq-ui-…
gabrielsvinha Apr 19, 2017
017ae3f
fixed robocop issues
MaysaMacedo Apr 19, 2017
088fb68
Fix rubocup styles for physical server textual summary
gabrielsvinha Apr 20, 2017
0fc2547
Merge remote-tracking branch 'ManageIQ/master' into physical_server_page
gabrielsvinha Apr 24, 2017
4bfd07a
merged 'physical_server_page' into fix
MaysaMacedo Apr 25, 2017
462f14f
Merge remote-tracking branch 'upstreamMIQ/master' into physical_serve…
MaysaMacedo Apr 25, 2017
13ee483
Fix CI processing controller
walteraa Apr 25, 2017
420a230
Merge remote-tracking branch 'upstream/physical_server_page' into phy…
MaysaMacedo Apr 25, 2017
ee96de7
fixed code climate issues
MaysaMacedo Apr 25, 2017
6e61f01
fixed rubocop issues
MaysaMacedo Apr 25, 2017
fd8c51e
Merge branch 'physical_server_page_fix' into HEAD
MaysaMacedo Apr 25, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 67 additions & 15 deletions app/controllers/ems_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,68 @@ def show_ad_hoc_metrics
drop_breadcrumb(:name => @ems.name + _(" (Ad hoc Metrics)"), :url => show_link(@ems))
end

def show_topology
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this method and instead use the MoreShowActions mixin which has the show_topology method.

@showtype = "topology"
@lastaction = "show_topology"
drop_breadcrumb(:name => @ems.name + _(" (Topology)"), :url => show_link(@ems))
end

def view_setup_params
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this method being called? What does it do?

{
"instances" => [ManageIQ::Providers::CloudManager::Vm, _("Instances")],
"images" => [ManageIQ::Providers::CloudManager::Template, _("Images")],
"block_storage_managers" => [ManageIQ::Providers::StorageManager,
_("Block Storage Managers"),
:block_storage_managers],
"object_storage_managers" => [ManageIQ::Providers::StorageManager,
_("Object Storage Managers"),
:object_storage_managers],
"storage_managers" => [ManageIQ::Providers::StorageManager,
_("Storage Managers"),
:storage_managers],
"miq_templates" => [MiqTemplate, _("Templates")],
"vms" => [Vm, _("VMs")],
"orchestration_stacks" => [OrchestrationStack, _("Stacks")],
# "configuration_jobs" => [ConfigurationJob, _("Configuration Jobs")],
"cloud_object_store_containers" => [CloudObjectStoreContainer, _('Cloud Object Store Containers')],
'containers' => [Container, _('Containers')],
'container_replicators' => [ContainerReplicator, _('Container Replicators')],
'container_nodes' => [ContainerNode, _('Container Nodes')],
'container_groups' => [ContainerGroup, _('Pods')],
'container_services' => [ContainerService, _('Container Services')],
'container_images' => [ContainerImage, _('Container Images')],
'container_routes' => [ContainerRoute, _('Container Routes')],
'container_builds' => [ContainerBuild, _('Container Builds')],
'container_projects' => [ContainerProject, _('Container Projects')],
'container_image_registries' => [ContainerImageRegistry, _('Container Image Registries')],
'container_templates' => [ContainerTemplate, _('Container Templates')],
'availability_zones' => [AvailabilityZone, _('Availability Zones')],
'host_aggregates' => [HostAggregate, _('Host Aggregates')],
'middleware_servers' => [MiddlewareServer, _('Middleware Servers')],
'middleware_deployments' => [MiddlewareDeployment, _('Middleware Deployments')],
'middleware_datasources' => [MiddlewareDatasource, _('Middleware Datasources')],
'middleware_domains' => [MiddlewareDomain, _('Middleware Domains')],
'middleware_server_groups' => [MiddlewareServerGroup, _('Middleware Server Groups')],
'middleware_messagings' => [MiddlewareMessaging, _('Middleware Messagings')],
'cloud_tenants' => [CloudTenant, _('Cloud Tenants')],
'cloud_volumes' => [CloudVolume, _('Cloud Volumes')],
'cloud_volume_snapshots' => [CloudVolumeSnapshot, _('Cloud Volume Snapshots')],
'flavors' => [Flavor, _('Flavors')],
'security_groups' => [SecurityGroup, _('Security Groups')],
'floating_ips' => [FloatingIp, _('Floating IPs')],
'network_routers' => [NetworkRouter, _('Network Routers')],
'network_ports' => [NetworkPort, _('Network Ports')],
'cloud_subnets' => [CloudSubnet, _('Cloud Subnets')],
'cloud_networks' => [CloudNetwork, _('Cloud Networks')],
'load_balancers' => [LoadBalancer, _('Load Balancers')],
'storages' => [Storage, _('Managed Datastores')],
'ems_clusters' => [EmsCluster, title_for_clusters],
'persistent_volumes' => [PersistentVolume, _('Volumes'), :persistent_volumes],
'hosts' => [Host, _("Managed Hosts")],
'physical_servers' => [PhysicalServer, _("Physical Servers")],
}
end

def display_block_storage_managers
nested_list('block_storage_manager', ManageIQ::Providers::StorageManager, :parent_method => :block_storage_managers)
end
Expand All @@ -77,12 +139,6 @@ def display_hosts
nested_list('hosts', Host, :breadcrumb_title => _("Managed Hosts"))
end

def view_setup_params
{
'physical_servers' => [PhysicalServer, _("Physical Servers")],
}
end

class_methods do
def display_methods
%w(
Expand All @@ -93,7 +149,7 @@ def display_methods
host_aggregates hosts images instances load_balancers middleware_datasources middleware_deployments
middleware_domains middleware_messagings middleware_server_groups middleware_servers miq_templates
network_ports network_routers object_storage_managers orchestration_stacks persistent_volumes
security_groups storage_managers storages vms physical_servers
security_groups storage_managers storages vms
)
end

Expand Down Expand Up @@ -385,6 +441,10 @@ def button
when "network_router_tag" then tag(NetworkRouter)
when "orchestration_stack_tag" then tag(OrchestrationStack)
when "security_group_tag" then tag(SecurityGroup)
# Physical server
when "physical_server_refresh" then refreshphysicalservers
when "physical_server_delete" then deletephysicalservers
when "physical_server_edit" then editphysicalservers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this button handling in physical_server_controller, not here in ems_common

end

pfx = pfx_for_vm_button_pressed(params[:pressed])
Expand Down Expand Up @@ -722,7 +782,6 @@ def form_instance_vars
@vmware_cloud_api_versions = retrieve_vmware_cloud_api_versions
@emstype_display = model.supported_types_and_descriptions_hash[@ems.emstype]
@nuage_api_versions = retrieve_nuage_api_versions
@hawkular_security_protocols = retrieve_hawkular_security_protocols
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change related to Physical Servers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as below.

end

def retrieve_provider_regions
Expand Down Expand Up @@ -775,13 +834,6 @@ def retrieve_container_security_protocols
[_('SSL without validation'), 'ssl-without-validation']]
end

def retrieve_hawkular_security_protocols
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this unrelated method being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this was changes in the master branch and came up with a merge made. But this is fixed in the next commits:

https://github.com/lenovo/manageiq-ui-classic/blob/physical_server_page/app/controllers/ems_common.rb#L776

[[_('SSL'), 'ssl-with-validation'],
[_('SSL trusting custom CA'), 'ssl-with-validation-custom-ca'],
[_('SSL without validation'), 'ssl-without-validation'],
[_('Non-SSL'), 'non-ssl']]
end

# Get variables from edit form
def get_form_vars
@ems = @edit[:ems_id] ? model.find_by_id(@edit[:ems_id]) : model.new
Expand Down