mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-02 09:47:00 +03:00
Bug #3094: Description is not filled up when updating a service template
This commit is contained in:
parent
340ccf61a1
commit
78a96b606a
@ -814,6 +814,10 @@ function updateServiceTemplateInfo(request,elem){
|
||||
<td class="key_td">'+tr("Name")+'</td>\
|
||||
<td class="value_td">'+elem_info.NAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">'+tr("Description")+'</td>\
|
||||
<td class="value_td">'+(htmlDecode(elem_info.TEMPLATE.BODY.description)||"-")+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">'+tr("Strategy")+'</td>\
|
||||
<td class="value_td">'+elem_info.TEMPLATE.BODY.deployment+'</td>\
|
||||
@ -1475,6 +1479,7 @@ var removeEmptyObjects = function(obj){
|
||||
|
||||
function generate_json_service_template_from_form() {
|
||||
var name = $('input[name="service_name"]', $create_service_template_dialog).val();
|
||||
var description = $('#description', $create_service_template_dialog).val();
|
||||
var deployment = $('select[name="deployment"]', $create_service_template_dialog).val();
|
||||
var shutdown_action_service = $('select[name="shutdown_action_service"]', $create_service_template_dialog).val();
|
||||
var running_status_gate = $('input[name="running_status_gate"]', $create_service_template_dialog).prop("checked");
|
||||
@ -1567,6 +1572,7 @@ function generate_json_service_template_from_form() {
|
||||
var obj = {
|
||||
name: name,
|
||||
deployment: deployment,
|
||||
description: description,
|
||||
roles: roles,
|
||||
custom_attrs: custom_attrs
|
||||
}
|
||||
@ -1634,6 +1640,8 @@ function fillUpUpdateServiceTemplateDialog(request, response){
|
||||
$("#service_name", dialog).attr("disabled", "disabled");
|
||||
$("#service_name", dialog).val(htmlDecode(service_template.NAME));
|
||||
|
||||
$("#description", dialog).val(htmlDecode(service_template.TEMPLATE.BODY.description));
|
||||
|
||||
// TODO Check if the template still exists
|
||||
$('select[name="deployment"]', dialog).val(service_template.TEMPLATE.BODY.deployment);
|
||||
$("select[name='shutdown_action_service']", dialog).val(service_template.TEMPLATE.BODY.shutdown_action);
|
||||
|
@ -3773,7 +3773,7 @@ function initialize_create_template_dialog(dialog) {
|
||||
//Process form
|
||||
$('#create_template_form',dialog).on('invalid', function () {
|
||||
notifyError(tr("One or more required fields are missing or malformed."));
|
||||
}).on('valid', function (opt) {
|
||||
}).on('valid', function() {
|
||||
if ($('#create_template_form',dialog).attr("opennebula_action") == "create") {
|
||||
$create_template_dialog = dialog;
|
||||
//wrap it in the "vmtemplate" object
|
||||
|
Loading…
x
Reference in New Issue
Block a user