Git Product home page Git Product logo

plantuml's Introduction

PlantUML Redmine plugin

This plugin will allow adding PlantUML diagrams into Redmine.

Requirements

  • Java
  • PlantUML binary

Installation

  • create a shell script in /usr/bin/plantuml
#!/bin/bash
/usr/bin/java -Djava.io.tmpdir=/var/tmp -Djava.awt.headless=true -jar /PATH_TO_YOUR_PLANTUML_BINARY/plantuml.jar ${@}
  • copy this plugin into the Redmine plugins directory

Usage

  • go to the plugin settings page and add the PlantUML binary path /usr/bin/plantuml
  • PlantUML diagrams can be added as follow:
{{plantuml(png)
  Bob -> Alice : hello
}}
{{plantuml(svg)
  Bob -> Alice : hello
}}
  • you can choose between PNG or SVG images by setting the plantuml macro argument to either png or svg

using !include params

Since all files are written out to the system, there is no safe way to prevent editors from using the !include command inside the code block. Therefore every input will be sanitited before writing out the .pu files for further interpretation. You can overcome this by activating the Setting.plugin_plantuml['allow_includes'] Attention: this is dangerous, since all files will become accessible on the host system.

Known issues

  • PlantUML diagrams are not rendered inside a PDF export, see #1

TODO

  • add image caching

plantuml's People

Contributors

cappumuc avatar hodorii avatar ncreuschling avatar rndmh3ro avatar smeagol74 avatar wate avatar zlorfi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plantuml's Issues

PlantUML plugin PNG format doesn't work

I'm using Redmine 3.4.2, and the latest PlantUML plugin. The PlantUML plugin supports both png and svg format.

However, the png format doesn't work. It shows hex string only. I checked background Redmine log, which shows the generated png file is 0 byte. The svg format works fine.

Finally I got it working by workaround and here is the details, with PlantUML plugin tag v0.5.1.

  1. This script works for svg, but not for png.
    Bob -> Alice : hello
  2. If I removed space between "Alice" and ":", as well as that between ":" and "hello", png works. This makes me thought svg works but png doesn't work. It looks png needs more strict requirement which should not have space in some specific position. I'm not sure anything wrong on my platform to have such issue.
    Bob -> Alice:hello
  3. In plantuml setting, no matter what binary I set, it always works. But if I leave it empty, the plugin doesn't work. I think it checks the binary location, but never use it.
  4. This also works, if no space in "Bob->Alice", while keep spaces in "Alice : hello"
    {{plantuml(png)
    Bob->Alice : hello
    }}

See discussion here,
http://www.redmine.org/boards/2/topics/53840

3.4.2.stable error

Redmine::PluginRequirementError: plantuml plugin requires a Redmine version between 2.6 and 3.3 but current is 3.4.2.stable

Question about markdown

For textile syntax is

{{plantuml(png)
  Bob -> Alice : hello
}}

What should be syntax to use within markdown?

Export uml to html or pdf

I have installed in Redmine 3.1.0 with plantuml on Centos 7
Not working export pdf or html from redmine- wiki.
In redmine->wiki plantuml show works sample:
{{plantuml(png)
Bob -> Alice : hello
}}

But after export in html page source -> example

Plantuml 88358e9331985a8ad4ec566b38dfd68a2875ead47b187542e2bea02c670d50ff

The same link in export pdf file.
Not showing pictures.

Best regards Konstantins.

Does not work anymore on 3.4.2

If I try to view a saved diagram (=saving text in a wiki to see the results), the following error occours:

undefined method `+' for nil:NilClass

Environment:
Redmine version 3.4.2.stable

State diagrams do not work

Hello,

I've installed the PlantUML plugin for Redmine and everything looks fine.

But I cannot make any State diagram to work. Examples:

[*] --> State1
State1 --> [*]
State1 : this is a string
State1 : this is another string

State1 -> State2
State2 --> [*]

(yes, I used the start and end tags)

The jar versions I've tested are:

plantuml-8059.jar

plantuml.1.2017.16.jar

This is the way I use it:
/usr/bin/java -Djava.io.tmpdir=/var/tmp -Djava.awt.headless=true -jar /var/www/redmine/plugins/plantuml/bin/20171003-plantuml.1.2017.16.jar ${@}

As I said before, every other diagram works fine, but not State diagrams.

Thanks for your help

FeatureRequest: external PlantUMl Server support

Hello,

I would like to propose the capability to give the plugin an URL to an external PlantUML Server to add the PlantUML feature to redmine.

This would help preventing redundancy in IT infrastructure.

Exception when running shell script

Here is my script file and output when run:

root@si:/usr/bin/plantuml# cat plantuml.sh
#!/bin/bash
/usr/bin/java -Djava.io.tmpdir=/var/tmp -Djava.awt.headless=true -jar /usr/bin/plantuml/plantuml.jar ${@}

root@si:/usr/bin/plantuml# ./plantuml.sh
Exception in thread "main" java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
        at java.awt.Window.<init>(Window.java:535)
        at java.awt.Frame.<init>(Frame.java:420)
        at javax.swing.JFrame.<init>(JFrame.java:218)
        at net.sourceforge.plantuml.swing.MainWindow2.<init>(MainWindow2.java:159)
        at net.sourceforge.plantuml.Run.main(Run.java:134)
root@si:/usr/bin/plantuml#
root@si:/usr/bin/plantuml# java -version
java version "1.7.0_151"
OpenJDK Runtime Environment (IcedTea 2.6.11) (7u151-2.6.11-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.151-b01, mixed mode)
root@si:/usr/bin/plantuml# 

What Redmine shows we try to configure the plugin:

404

Export to PDF

Export to PDF, does not display a picture
It looks like "plantuml_2a6947f ... 03609eaf.svg"

Something wrong with assets on redmine 2.6

I've just installed this plugin on redmine 3.2 just fine (changing 3.1 with 3.2 in init.rb). But when installing on 2.6 something going wrong:

Environment:
  Redmine version                2.6.10.stable
  Ruby version                   2.1.8-p440 (2015-12-16) [x86_64-linux-gnu]
  Rails version                  3.2.22.2
  Environment                    production
  Database adapter               PostgreSQL
Redmine plugins:
  plantuml                       0.3.0
ActionController::RoutingError (No route matches [GET] "/plugin_assets/plantuml/javascripts/plantuml.js"):

I've tried:

rake assets:clean
rake assets:precompile
rake redmine:plugins
rake redmine:plugins:assets
rake redmine:plugins:migrate

Help me please!

redmine 3.2dev error

Redmine::PluginRequirementError: plantuml plugin requires a Redmine version between 2.6 and 3.1 but current is 3.2.0. devel

help:500 Internal Server Error

how to solve this error?

Started GET "/redmine/plantuml/svg/plantuml_88358e9331985a8ad4ec566b38dfd68a2875ead47b187542e2bea02c670d50ff.svg" for 127.0.0.1 at 2015-09-10 11:43:08 +0800
Processing by PlantumlController#convert as
Parameters: {"content_type"=>"svg", "filename"=>"plantuml_88358e9331985a8ad4ec566b38dfd68a2875ead47b187542e2bea02c670d50ff"}
Current user: liupeng (id=3)
Sent file /data/redmine/files/plantuml_88358e9331985a8ad4ec566b38dfd68a2875ead47b187542e2bea02c670d50ff.svg (0.2ms)
Completed 500 Internal Server Error in 5ms

svg and png not work

bug

I tried the following codes, but it not worked for me.

{{plantuml(png)
  Bob -> Alice : hello
}}

I just got a string : Plantuml 9a38d4b478cf8f704fffa67de88d1d183d141daa7354806a934bbdc815db2362

case using context path, image path is invalid

I am using context : http://localhost/redmine

1. configuration sub context

insert to first line in "config/environment.rb"
`RedmineApp::Application.routes.default_scope = "/redmine"'

2. result

/plantuml/png/...

http://0.0.0.0:3000/plantuml/png/plantuml_ad9c6acbbe4968b81647d194931ab53e6a7598870096bc62e3decbcf34ddd2a8.png

3. expected result

/redmine/plantuml/png/...

http://0.0.0.0:3000/redmine/plantuml/png/plantuml_ad9c6acbbe4968b81647d194931ab53e6a7598870096bc62e3decbcf34ddd2a8.png

Installation not working

I've installed Java on the ubuntu redmine server, plug-in installed in correct plug-in dir, /usr/bin/plantuml file created and given execute permissions and redmine rake command ran:

bundle exec rake redmine:plugins:migrate RAILS_ENV=production
Migrating plantuml (PlantUML plugin for Redmine)...
...
...
...

but plug-in not appearing in plug-in list and path in the readme file gives a 404 and in fact there is no *.jar file in the downloaded plug-in dir.

split diagram doesn't work fully

in this case http://plantuml.com/sequence-diagram#Splitting_diagrams
{{plantuml(png)
Alice -> Bob : message 1
Alice -> Bob : message 2

newpage

Alice -> Bob : message 3
Alice -> Bob : message 4

newpage A title for the\nlast page

Alice -> Bob : message 5
Alice -> Bob : message 6

}}

the plugin include the first schema only. the 2 others are generated on disk but not included in the issue

best regards

Installation for Windows

First of all, thanks for the great plugin!

I would like u to make a case differentiation in the "Installation" section of your readme.

Please add the following batch script example:

java -Djava.io.tmpdir=%TEMP% -Djava.awt.headless=true -jar PATH_TO_YOUR_PLANTUML_BINARY/plantuml.jar "%1" "%2" "%3" "%4"

SVGs are rendered as images

Using

{{plantuml(svg)
  Bob -> Alice : hello
}}

results in redmine printing the SVG as image. Therefore, e.g. links in the SVG can not be clicked.

Is there a possibility to incorporate this behaviour?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.