Class: UffizziCore::ManageActivityItemsService
- Inherits:
-
Object
- Object
- UffizziCore::ManageActivityItemsService
- Defined in:
- app/services/uffizzi_core/manage_activity_items_service.rb
Instance Attribute Summary collapse
-
#containers ⇒ Object
Returns the value of attribute containers.
-
#deployment ⇒ Object
Returns the value of attribute deployment.
-
#namespace_data ⇒ Object
Returns the value of attribute namespace_data.
-
#pods ⇒ Object
Returns the value of attribute pods.
Instance Method Summary collapse
- #container_status_item(container) ⇒ Object
- #container_status_items ⇒ Object
-
#initialize(deployment) ⇒ ManageActivityItemsService
constructor
A new instance of ManageActivityItemsService.
Constructor Details
#initialize(deployment) ⇒ ManageActivityItemsService
Returns a new instance of ManageActivityItemsService.
6 7 8 9 10 11 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 6 def initialize(deployment) @deployment = deployment @containers = deployment.active_containers @namespace_data = UffizziCore::ControllerService.fetch_namespace(deployment) @pods = UffizziCore::ControllerService.fetch_pods(deployment) end |
Instance Attribute Details
#containers ⇒ Object
Returns the value of attribute containers.
4 5 6 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 4 def containers @containers end |
#deployment ⇒ Object
Returns the value of attribute deployment.
4 5 6 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 4 def deployment @deployment end |
#namespace_data ⇒ Object
Returns the value of attribute namespace_data.
4 5 6 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 4 def namespace_data @namespace_data end |
#pods ⇒ Object
Returns the value of attribute pods.
4 5 6 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 4 def pods @pods end |
Instance Method Details
#container_status_item(container) ⇒ Object
13 14 15 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 13 def container_status_item(container) container_status_items.detect { |container_statuses| container_statuses[:id] == container.id } end |
#container_status_items ⇒ Object
17 18 19 20 21 22 |
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 17 def container_status_items network_connectivities = build_network_connectivities containers_replicas = build_containers_replicas build_container_status_items(network_connectivities, containers_replicas) end |