bernardodemarco commented on code in PR #11970:
URL: https://github.com/apache/cloudstack/pull/11970#discussion_r2490108566
##########
server/src/main/java/com/cloud/api/query/dao/TemplateJoinDaoImpl.java:
##########
@@ -162,26 +163,23 @@ protected TemplateJoinDaoImpl() {
}
private String getTemplateStatus(TemplateJoinVO template) {
- String templateStatus = null;
- if (template.getDownloadState() != Status.DOWNLOADED) {
- templateStatus = "Processing";
- if (template.getDownloadState() == Status.DOWNLOAD_IN_PROGRESS) {
- if (template.getDownloadPercent() == 100) {
- templateStatus = "Installing Template";
- } else {
- templateStatus = template.getDownloadPercent() + "%
Downloaded";
+ if (template.getDownloadState() == Status.DOWNLOADED) {
+ return "Successfully Installed";
+ }
+ String templateStatus = "Processing";
+ if (template.getDownloadState() == Status.DOWNLOAD_IN_PROGRESS) {
+ if (template.getDownloadPercent() == 100) {
+ templateStatus = "Installing Template";
+ if (template.getFormat() == Storage.ImageFormat.ISO) {
+ templateStatus = "Installing ISO";
Review Comment:
It would be great to move these values of the `templateStatus` string into
constants (`Status.PROCESSING`, and so on)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]