mirror of https://github.com/apache/cloudstack.git
new UI - template page - fix a bug: clicking a template whose status or size is not blank, then click another template whose status or size is blank, the latter one wrongly show status or size from the former one.
This commit is contained in:
parent
d95d76f740
commit
6ef5a83217
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue