{% block field %}
{% set cpu = 0.5 %}
{% set memory = 768 %}
{% set type = "nonkubernetes" %}
{% for option in object.environmentOptions %}
{% if option.optionType.name == "java.memoryLimit" %}
{% set memory = option.value %}
{% elseif option.optionType.name == "java.cpuLimit" %}
{% set cpu = option.value %}
{% elseif option.optionType.name == "kubernetes.cluster" %}
{% set type = option.value %}
{% endif %}
{% endfor %}
<div style="white-space: nowrap;">
<ul>
<li>CPU: {{ cpu }} vCore</li>
<li>RAM: {{ memory }} MB</li>
{% if type != "nonkubernetes" and type in admin.costs|keys %}
{% set costCPU = ((admin.costs[type].cost / admin.costs[type].cpu) * cpu) %}
{% set costRAM = ((admin.costs[type].cost / admin.costs[type].ram) * memory) %}
<li>Cost: {{ max(costCPU, costRAM) }}{{ admin.costs[type].currency }}/month </li>
{% endif %}
</ul>
</div>
{% endblock %}