You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/12/17 20:00:20 UTC
git commit: updated refs/heads/master to ff62ccc
Repository: cloudstack
Updated Branches:
refs/heads/master b6bac7f67 -> ff62ccc13
CLOUDSTACK-8075: UI > Instances menu > Add Instance > Select template/ISO > "shared" tab > select a shared template, click Next button => fix error "unable to find matched template object".
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ff62ccc1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ff62ccc1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ff62ccc1
Branch: refs/heads/master
Commit: ff62ccc13e6f2b2346adca03f240f59d92d87f92
Parents: b6bac7f
Author: Jessica Wang <je...@apache.org>
Authored: Wed Dec 17 10:58:43 2014 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Dec 17 11:00:10 2014 -0800
----------------------------------------------------------------------
ui/scripts/instanceWizard.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff62ccc1/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index e7225d3..3d3f74e 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -323,11 +323,22 @@
}
}
}
- }
- if (selectedTemplateObj == null)
+ }
+ if (selectedTemplateObj == null) {
+ if (sharedTemplateObjs != null && sharedTemplateObjs.length > 0) {
+ for (var i = 0; i < sharedTemplateObjs.length; i++) {
+ if (sharedTemplateObjs[i].id == args.currentData.templateid) {
+ selectedTemplateObj = sharedTemplateObjs[i];
+ break;
+ }
+ }
+ }
+ }
+ if (selectedTemplateObj == null) {
alert("unable to find matched template object");
- else
+ } else {
selectedHypervisor = selectedTemplateObj.hypervisor;
+ }
} else { //(args.currentData["select-template"] == "select-iso"
selectedHypervisor = args.currentData.hypervisorid;
}