1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Solved bug when memory cost is empty (#517)

This commit is contained in:
Abel Coronado 2017-10-05 11:49:16 +02:00 committed by Ruben S. Montero
parent f7633ae1d0
commit 021639f967

View File

@ -110,10 +110,12 @@ define(function(require) {
}
function caculatedTotalMemory(context){
var memory = document.getElementById('MEMORY_COST').value;
var type = document.getElementById('MEMORY_UNIT_COST').value;
memory = memory * 24 * 30; //24 hours and 30 days
document.getElementById('total_value_memory').textContent = convertCostNumber(memory);
$(".total_memory_cost", context).show();
if (memory != ""){
var type = document.getElementById('MEMORY_UNIT_COST').value;
memory = memory * 24 * 30; //24 hours and 30 days
document.getElementById('total_value_memory').textContent = convertCostNumber(memory);
$(".total_memory_cost", context).show();
}
}
function _setup(context) {