Class: UffizziCore::ManageActivityItemsService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/manage_activity_items_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#containersObject

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

#deploymentObject

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_dataObject

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

#podsObject

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_itemsObject



17
18
19
# File 'app/services/uffizzi_core/manage_activity_items_service.rb', line 17

def container_status_items
  build_container_status_items(build_network_connectivities, build_containers_replicas)
end