diff --git a/ui/new/scripts/cloud.core2.iso.js b/ui/new/scripts/cloud.core2.iso.js index 16eaa0658b4..f9e7ead18bd 100644 --- a/ui/new/scripts/cloud.core2.iso.js +++ b/ui/new/scripts/cloud.core2.iso.js @@ -178,14 +178,16 @@ function isoJsonToDetailsTab(jsonObj) { $detailsTab.find("#displaytext_edit").val(fromdb(jsonObj.displaytext)); $detailsTab.find("#account").text(fromdb(jsonObj.account)); - - if(jsonObj.size != null) - $detailsTab.find("#size").text(convertBytes(parseInt(jsonObj.size))); - + var status = "Ready"; if (jsonObj.isready == "false") - status = jsonObj.isostatus; + status = fromdb(jsonObj.isostatus); $detailsTab.find("#status").text(status); + + if(jsonObj.size != null) + $detailsTab.find("#size").text(convertBytes(parseInt(jsonObj.size))); + else + $detailsTab.find("#size").text(""); setBooleanField(jsonObj.bootable, $detailsTab.find("#bootable")); setBooleanField(jsonObj.crossZones, $detailsTab.find("#crossZones")); diff --git a/ui/new/scripts/cloud.core2.template.js b/ui/new/scripts/cloud.core2.template.js index 4f73e22375f..66054e11d51 100644 --- a/ui/new/scripts/cloud.core2.template.js +++ b/ui/new/scripts/cloud.core2.template.js @@ -237,9 +237,14 @@ function templateJsonToDetailsTab(jsonObj) { var status = "Ready"; if (jsonObj.isready == "false") - status = jsonObj.templatestatus; + status = fromdb(jsonObj.templatestatus); $detailsTab.find("#status").text(status); + if(jsonObj.size != null) + $detailsTab.find("#size").text(convertBytes(parseInt(jsonObj.size))); + else + $detailsTab.find("#size").text(""); + setBooleanField(jsonObj.passwordenabled, $detailsTab.find("#passwordenabled")); $detailsTab.find("#passwordenabled_edit").val(jsonObj.passwordenabled); @@ -254,10 +259,7 @@ function templateJsonToDetailsTab(jsonObj) { $detailsTab.find("#ostypename").text(fromdb(jsonObj.ostypename)); $detailsTab.find("#ostypename_edit").val(jsonObj.ostypeid); - $detailsTab.find("#account").text(fromdb(jsonObj.account)); - - if(jsonObj.size != null) - $detailsTab.find("#size").text(convertBytes(parseInt(jsonObj.size))); + $detailsTab.find("#account").text(fromdb(jsonObj.account)); setDateField(jsonObj.created, $detailsTab.find("#created"));