Bug #3687

.provision_custom_attributes_selector does not go away even if the selected template has no custom attributes

Added by Rachel Chen over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:03/17/2015
Priority:NormalDue date:
Assignee:Daniel Molina% Done:

100%

Category:Sunstone
Target version:Release 4.12.1
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.12

Description

If template A has custom attributes, after select A, it shows custom attributes in cloud view. But then if I select B, which has no custom attributes, the form stays there.

/usr/lib/one/sunstone/public/js/plugins/provision-tab.js

Changing:

        if (template_json.VMTEMPLATE.TEMPLATE.USER_INPUTS) {
          generate_custom_attrs(
            $(".provision_custom_attributes_selector", create_vm_context),
            template_json.VMTEMPLATE.TEMPLATE.USER_INPUTS);
        }

To:

        if (template_json.VMTEMPLATE.TEMPLATE.USER_INPUTS) {
          generate_custom_attrs(
            $(".provision_custom_attributes_selector", create_vm_context),
            template_json.VMTEMPLATE.TEMPLATE.USER_INPUTS);
        }else{
                $(".provision_custom_attributes_selector").html('');
        }

Fix the problem.

Associated revisions

Revision 36bc389e
Added by Daniel Molina over 5 years ago

bug #3687: Reset custom attrs container

Revision 2ab0d118
Added by Daniel Molina over 5 years ago

bug #3687: Reset custom attrs container

(cherry picked from commit 36bc389e96571e51dbccd615055cfdad00e33d93)

History

#1 Updated by Ruben S. Montero over 5 years ago

  • Category set to Sunstone
  • Assignee set to Daniel Molina
  • Target version set to Release 4.12.1

#2 Updated by Daniel Molina over 5 years ago

  • Status changed from Pending to Closed
  • % Done changed from 0 to 100
  • Resolution set to fixed

Fixed, thank you for your feedback

Also available in: Atom PDF