mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
bug #3363: rescue exception when trying to parse a plain service template
This commit is contained in:
1 parent
31f2f805fb
commit
ab7b13b664
1 file changed
+6
-1
@@ -1390,7 +1390,12 @@ function initialize_create_service_template_dialog(dialog){
|
||||
}).on('valid', function() {
|
||||
if ($('#create_service_template_form_advanced',dialog).attr("action") == "create") {
|
||||
var json_template = $("#template", this).val();
|
||||
Sunstone.runAction("ServiceTemplate.create", JSON.parse(json_template) );
|
||||
try {
|
||||
Sunstone.runAction("ServiceTemplate.create", JSON.parse(json_template) );
|
||||
} catch(e) {
|
||||
popFormDialog("create_service_template_form", $("#oneflow-templates"));
|
||||
notifyError(e);
|
||||
}
|
||||
return false;
|
||||
} else if ($('#create_service_template_form_advanced',dialog).attr("action") == "update") {
|
||||
var json_template = $("#template", this).val();
|
||||
|
||||
Reference in new issue
Block a user