Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a migration script for diagrams affected by #11 #18

Closed
oanat opened this issue Feb 1, 2019 · 5 comments
Closed

Create a migration script for diagrams affected by #11 #18

oanat opened this issue Feb 1, 2019 · 5 comments

Comments

@oanat
Copy link

@oanat oanat commented Feb 1, 2019

While the issue #11 will be fixed for the future, we need a migration script for existing versions (e.g. users who would like to benefit of the latest version of the app until #11 is fixed)

@slauriere
Copy link

@slauriere slauriere commented Feb 7, 2019

The migration script I intend to write will update the paths containing the old version name with the new one, for example :

<mxCell id="6" value="" style="shape=image;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;imageAspect=1;aspect=fixed;image=/xwiki-10.8/webjars/wiki%3Adev/draw.io/6.5.7/img/clipart/Gear_128x128.png" parent="1" vertex="1">

will get updated to:

<mxCell id="6" value="" style="shape=image;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;imageAspect=1;aspect=fixed;image=/xwiki-10.8/webjars/wiki%3Adev/draw.io/8.9.9/img/clipart/Gear_128x128.png" parent="1" vertex="1">
slauriere added a commit that referenced this issue Feb 7, 2019
@slauriere
Copy link

@slauriere slauriere commented Feb 7, 2019

I created a script and I submitted it as a pull request #19. I tested it for an upgrade to the 1.6.1 pro version in the main wiki. NB: the script will work only for an upgrade to a pro version for now.

@slauriere
Copy link

@slauriere slauriere commented Feb 7, 2019

PS: the script has to get executed after the upgrade, not before, as it migrates the image paths to the draw.io version that is currently installed.

@slauriere slauriere closed this Feb 7, 2019
@slauriere slauriere reopened this Feb 7, 2019
slauriere added a commit that referenced this issue Feb 19, 2019
- Update text info explaining what the script does.
- Mention the existing bug #11.
- Use clean='false' in the html macro.
- Add CSRF protection.
- Switch from Groovy to Velocity.
- Retrieve the draw.io extension directly.
- Retrieve only the diagrams that need to be migrated.
- Add warning to the application home page in case some migration is needed.
slauriere added a commit that referenced this issue Feb 20, 2019
- Remove programming rights
- Add page containing a common macro
slauriere added a commit that referenced this issue Feb 25, 2019
#18: Create a migration script for diagrams affected by #11
@acotiuga acotiuga added this to the 1.6.2 milestone Feb 26, 2019
@acotiuga acotiuga closed this Feb 26, 2019
@mflorea
Copy link
Collaborator

@mflorea mflorea commented Apr 3, 2019

@slauriere if you access the Diagram home page before requesting a license you see this:

Failed to execute the [include] macro. Cause: [Current user [xwiki:XWiki.Admin] doesn't have view rights on document [Document xwiki:Diagram.MigrationScriptMacros]]. Click on this message for details.

And below:

There is no valid license for Diagram Application (Pro). Please visit the Licenses section.

The user should see only the last message. The include of MigrationScriptMacros should be done only if there is a valid license (inside the else of the IF that shows the above message). We need a new issue for this.

@slauriere
Copy link

@slauriere slauriere commented Apr 11, 2019

Right, I created #34 to follow up on the issue that you raised, Marius.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants