diff --git a/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb b/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb index c5d2b75721..054cfee17d 100644 --- a/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/MarketPlaceAppJSON.rb @@ -62,7 +62,11 @@ module OpenNebulaJSON end def update(params=Hash.new) - super(params['template_raw']) + if !params['append'].nil? + super(params['template_raw'], params['append']) + else + super(params['template_raw']) + end end def export(params=Hash.new) diff --git a/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js b/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js index 8de2c31700..64f2ca2dbe 100644 --- a/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js +++ b/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js @@ -64,8 +64,8 @@ define(function(require) { "MarketPlaceApp.chgrp": _commonActions.multipleAction('chgrp'), "MarketPlaceApp.chmod": _commonActions.singleAction('chmod'), //"MarketPlaceApp.update" : _commonActions.updateTemplate(), - //"MarketPlaceApp.update_template" : _commonActions.updateTemplate(), - //"MarketPlaceApp.append_template" : _commonActions.appendTemplate(), + "MarketPlaceApp.update_template" : _commonActions.updateTemplate(), + "MarketPlaceApp.append_template" : _commonActions.appendTemplate(), "MarketPlaceApp.rename": _commonActions.singleAction('rename') } diff --git a/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates.js b/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates.js index c8a3462895..2d5d793660 100644 --- a/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates.js +++ b/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates.js @@ -78,6 +78,8 @@ define(function(require) { } function _setup(context) { + var that = this; + context.off("click", ".vmTemplate_edit"); context.on("click", ".vmTemplate_edit", function() { $("#vmTemplate_text", context).hide(); diff --git a/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates/html.hbs b/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates/html.hbs index 5cc8fa867a..831b608790 100644 --- a/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates/html.hbs +++ b/src/sunstone/public/app/tabs/marketplaceapps-tab/panels/templates/html.hbs @@ -27,13 +27,15 @@ -
{{#if appTemplate}} +{{~htmlDecode appTemplate~}} +{{else}} - {{tr "You can provide a template for the resource that will be created in OpenNebula"}} ++ {{~tr "You can provide a template for the resource that will be created in OpenNebula"~}} +
{{/if}} -
{{#if vmTemplate}} +{{~htmlDecode vmTemplate~}} +{{else}} - {{tr "You can provide a VM template associated to the resource that will be created in OpenNebula"}} ++ {{~tr "You can provide a VM template associated to the resource that will be created in OpenNebula"~}} +
{{/if}} -