Bug #2255

Sunstone template editing in wizzard mode destroys RAW section

Added by Alexey Medvedchikov over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:08/01/2013
Priority:HighDue date:
Assignee:Daniel Molina% Done:

100%

Category:Sunstone
Target version:Release 4.4
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.2

Description

Sunstone template editing in wizzard mode destroys RAW section, and it's very sad due to this: http://dev.opennebula.org/issues/2143

Steps to reproduce:
1. Create template in Advanced mode with simple RAW section
2. Open template for update in wizard mode
3. Change anything
4. Click update
5. Open template for update in advanced mode: there's no RAW section

I created fast'n'dirty patch which adds RAW tab, it's in attachment (sorry for my JS, i use it for the first time today :))

opennebula.diff Magnifier (4.45 KB) Alexey Medvedchikov, 08/01/2013 02:02 PM


Related issues

Related to Bug #2316: sunstone: template dialog strips some fields on update Closed 09/06/2013
Related to Bug #2293: Sunstone template update not working Closed 09/02/2013

Associated revisions

Revision fc32d730
Added by Daniel Molina over 5 years ago

bug #2255: Add RAW section to template creation form

Revision b3c0f6a8
Added by Daniel Molina over 5 years ago

bug #2255: Add RAW tab to views conf

Revision 61558708
Added by Daniel Molina over 5 years ago

bug #2255: Update css

Revision b6c75a34
Added by Daniel Molina over 5 years ago

bug #2255: Hide data_vmx by default

Revision 97b713fd
Added by Daniel Molina over 5 years ago

bug #2255: Add custom tags to template creation form

Revision 438accc6
Added by Daniel Molina over 5 years ago

bug #2255: Add RAW section to template creation form(cherry picked from commit fc32d730158c64bc7e7e429703cd472385d33379)

Revision f4b54395
Added by Daniel Molina over 5 years ago

bug #2255: Add RAW tab to views conf(cherry picked from commit b3c0f6a8525eba1e322025e657bd3a1657ef0802)

Revision 8c9976f1
Added by Daniel Molina over 5 years ago

bug #2255: Update css(cherry picked from commit 61558708ed12ea2000c5a265a3752284794862cf)

Revision 85253d08
Added by Daniel Molina over 5 years ago

bug #2255: Hide data_vmx by default(cherry picked from commit b6c75a34d12a3acf364c812b0026be220b0d49a2)

Revision 7bae7a31
Added by Daniel Molina over 5 years ago

bug #2255: Add custom tags to template creation form(cherry picked from commit 97b713fd7f0f386898f4f3c07010a8d44db531fe)

Revision b501d34f
Added by Daniel Molina over 5 years ago

bug #2255: Escape double quotes provided in an input text in Sunstone template wizard

Revision 3f6716bb
Added by Daniel Molina over 5 years ago

bug #2255: Fix bug when a tag contains double quotes in the user template info panel

Revision 36755204
Added by Daniel Molina over 5 years ago

bug #2255: Fix bug when a tag contains double quotes in the user template info panel
(cherry picked from commit 3f6716bb0308d616f8ef458d9793760c5dd6dcc7)

Revision 88f9d5d7
Added by Daniel Molina over 5 years ago

bug #2255: Escape double quotes provided in an input text in Sunstone template wizard
(cherry picked from commit b501d34fc3ea8145ef83436586f471877d606b63)

History

#2 Updated by Daniel Molina over 5 years ago

  • Status changed from Pending to New
  • Assignee set to Daniel Molina
  • Priority changed from Low to High
  • Target version set to Release 4.4

#3 Updated by Daniel Molina over 5 years ago

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

Thank you for the patch. I have just included it in the repo. I have also included a "custom tags" section in case additional parameters are defined in the vm template.

#4 Updated by Alexey Medvedchikov over 5 years ago

Thank you. Your changeset works fine for me.

#5 Updated by Laurent Grawet over 5 years ago

Hi,

There is a problem with function addslashes( str ) in sunstone/public/js/plugins/templates-tab.js:
it doubles backslashes on each update.

#6 Updated by Laurent Grawet over 5 years ago

About the addslashes(str) problem:

- The regex shouldn't add backslash before single quote char because OpenNebula doesn't need it and htmlDecode() doesn't strip it on read.
- The template update should fail if the field contains a backslash character. There is also the htmlDecode() problem
- Double quotes should be replaced with single quotes.

Then you will have the same behavior as command line tool.

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

  • Status changed from Closed to New

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

  • Resolution deleted (fixed)

#9 Updated by Daniel Molina over 5 years ago

Hi Laurent and Alexey,

I have uploaded a commit that should fix these issues. The commit is already in the master and one-4.4 branches

#10 Updated by Daniel Molina over 5 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF