Skip to content

Commit

Permalink
Add container limits to container summary page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari Zellner committed Jul 27, 2017
1 parent c5ed68e commit f40111d
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 f40111d

Please sign in to comment.