Skip to content

Commit

Permalink
Merge pull request #1401 from zeari/container_definition_limits
Browse files Browse the repository at this point in the history
Add container limits to container summary page
  • Loading branch information
martinpovolny committed Jul 31, 2017
2 parents 8eb9a27 + f40111d commit 144e0ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/container_controller.rb
Expand Up @@ -13,7 +13,7 @@ def show_list
private

def textual_group_list
[%i(properties relationships smart_management), %i(env)]
[%i(properties relationships smart_management), %i(env limits)]
end
helper_method :textual_group_list

Expand Down
10 changes: 10 additions & 0 deletions app/helpers/container_helper/textual_summary.rb
Expand Up @@ -140,4 +140,14 @@ def collect_env_variables
[var.name, var.value, var.field_path]
end
end

def textual_group_limits
TextualMultilabel.new(
_("Request and Limits"),
:labels => [_("Resource"), _("Value")],
:values => [[_("Limit CPU cores"), @record.limit_cpu_cores],
[_("Limit CPU cores"), @record.limit_memory_bytes],
[_("Request CPU cores"), @record.request_cpu_cores],
[_("Request Memory"), @record.request_memory_bytes]])
end
end

0 comments on commit 144e0ca

Please sign in to comment.