Skip to content

Commit 4e132fc

Browse files
author
Jessica Wang
committed
CLOUDSTACK-3950: UI > template/ISO page > hide CopyTemplate/CopyISO action when it's region-wide (i.e. zoneid is null)
1 parent 8202acd commit 4e132fc

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎ui/scripts/templates.js‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,9 +1660,12 @@
16601660
} else {
16611661
allowedActions.push("edit");
16621662

1663-
if (havingSwift == false && havingS3 == false)
1663+
//Swift and S3 are region-wide secondary storage
1664+
//if (havingSwift == false && havingS3 == false)
1665+
if (havingSwift == false && jsonObj.zoneid != null) { //"jsonObj.zoneid == null" means it is registered on region-wide S3 => global to all zones
16641666
allowedActions.push("copyTemplate");
1665-
1667+
}
1668+
16661669
//allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network.
16671670
}
16681671

@@ -1697,8 +1700,10 @@
16971700
} else {
16981701
allowedActions.push("edit");
16991702

1700-
if (havingSwift == false)
1703+
//Swift and S3 are region-wide secondary storage
1704+
if (havingSwift == false && jsonObj.zoneid != null) { //"jsonObj.zoneid == null" means it is registered on region-wide S3 => global to all zones
17011705
allowedActions.push("copyISO");
1706+
}
17021707
}
17031708

17041709
// "Create VM"

0 commit comments

Comments
 (0)