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

Add container limits to container summary page #1401

Merged
merged 1 commit into from Jul 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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