1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-11-12 15:36:32 +00:00
Commit Graph

470 Commits

Author SHA1 Message Date
Arnaud Roques
2c96caadbb chore: print error 2024-07-07 22:35:07 +02:00
Arnaud Roques
b51cc810b8 chore: version 1.2024.6 2024-07-07 19:32:13 +02:00
Arnaud Roques
da7e041070 chore: version 1.2024.5 2024-05-26 13:08:32 +02:00
Arnaud Roques
2680086893 fix URL 2024-05-14 18:30:09 +02:00
Arnaud Roques
eafc9c442c chore: version 1.2024.4 2024-04-06 17:33:37 +02:00
Arnaud Roques
8c532d4caa chore: version 1.2024.3 2024-02-15 23:07:44 +01:00
Arnaud Roques
bba12d9c3c chore: version 1.2024.2 2024-02-14 19:50:38 +01:00
Arnaud Roques
449e4d8ae4 chore: version 1.2024.1 2024-02-08 23:32:44 +01:00
Arnaud Roques
861b034ebc chore: version 1.2024.0 2024-02-08 21:59:52 +01:00
Tibor Casteleijn
334f039e90 Change image tag from jetty-local to jetty 2024-01-12 10:42:36 +01:00
Arnaud Roques
c127b4c466 chore: version 1.2023.13 2023-12-12 19:44:59 +01:00
Michele Adduci
74eb159a36 Updated Jetty and JRE in Docker, fixed Alpine build 2023-11-20 08:30:50 +01:00
Arnaud Roques
0514103cc1 chore: version 1.2023.12 2023-10-22 00:30:22 +02:00
HeinrichAD
46077bf5b7
Set java.awt.headless to true due to Windows 11 issues (#312)
* set java.awt.headless to true due to Windows 11 issues

* do not force headles mode but us it as default
2023-09-06 21:23:55 +02:00
HeinrichAD
608b58b3e0 add the same support to maps
sendMap should work similar to sendDiagram w.r.t. diagram source selection
2023-07-19 23:08:13 +02:00
HeinrichAD
5859c3b427 support diagrams without startuml, enduml
Add support for diagram without @startuml and @enduml.
2023-07-19 23:08:13 +02:00
Arnaud Roques
af8f7d0c33 v1.2023.10 2023-07-19 18:29:41 +02:00
HeinrichAD
d495c13e6e
Merge pull request #305 from HeinrichAD/empty-commit
Close solved issues after re-evaluation
2023-07-15 22:28:58 +02:00
HeinrichAD
e484f532d4 empty commit 2023-07-15 22:14:08 +02:00
HeinrichAD
f03bb68407 add jetty "host" property
Add the posibility to set the network interface the Jetty server connector binds to as an IP address or a hostname. If null or 0.0.0.0, then its automatically binds to all interfaces.

Currently, the sercer connector uses 0.0.0.0 as fallback and always binds to all interfaces.

References: <https://eclipse.dev/jetty/javadoc/jetty-11/org/eclipse/jetty/server/AbstractNetworkConnector.html#getHost()>
2023-07-11 22:44:51 +02:00
Kálmán Vince
294b2a2418 Add diagram indexing support for all formats 2023-06-20 21:12:14 +02:00
HeinrichAD
45994f81bf remove unused import OptionFlags 2023-06-13 22:57:07 +02:00
HeinrichAD
4202730c11 remove ALLOW_PLANTUML_INCLUDE + update to 1.2023.9
- update Plantuml to v1.2023.9
- PlantUML core removed `OptionFlags.ALLOW_INCLUDE` and uses now the `PLANTUML_SECURITY_PROFILE`
2023-06-13 22:57:07 +02:00
HeinrichAD
09a7ce4973 add security features + java property support
- set `ALLOW_PLANTUML_INCLUDE` only once and decentralized inside the `DiagramResponse` class and call this init method after initializing the server
- set `PLANTUML_SECURITY_PROFILE` to `INTERNET` by default (BREAKING CHANGES)
- add possibility to set PlantUML system properties over a file with `PLANTUML_PROPERTY_FILE`
- adjust documentation
- add "Breaking changes" hint to README
2023-06-13 22:57:07 +02:00
HeinrichAD
5fa6cbc82f catch 400 response for broken diagrams 2023-06-12 22:57:06 +02:00
HeinrichAD
178384370f switch from fop to fop-core package 2023-06-11 20:55:03 +02:00
HeinrichAD
8d7c681ae4 copy pom.parent.xml to docker container 2023-06-09 17:31:19 +02:00
HeinrichAD
98dfd1763a create parent pom to improve the maintanace 2023-06-09 17:31:19 +02:00
Florian
f6fa448ed8 add doc: how to add fonts
Add an example about how to add additional fonts indside the PlantUML docker container.
2023-05-26 10:19:40 +02:00
The-Lum
303976279f doc: fix some minor issues (links, order, shortcut)
- [x] Add shortcut (`Ctrl+,`) for Setting dialog on the doc
- [x] Add `Editor Watcher Timeout` and `Editor Options`
- [x] Rearange level of titles and order of links
2023-05-24 16:32:16 +02:00
The-Lum
be95ece466 doc: fix some minor issues
- [x] fix README link to docs
- [x] rename `Alice and Bob` to `First example: "Alice and Bob"`
- [x] add `Import/Export`link
- [x] add `<kbd>` tag on `Ctrl+S`
2023-05-23 23:46:58 +02:00
Arnaud Roques
4cbefc3dcc Import version 1.2023.8 2023-05-22 18:03:58 +02:00
Florian
155250286f Add dependency tests
- add `testGraphviz`: request `version` as AsciiArt and search for
  "Installation seems OK. File generation OK"
- irgnore `testGraphviz` inside github workflow tests except for the
  docker container tests, since only in the docker container case
  graphviz is available
- add `testMonacoEditorWebJar`: request `loader.js` and check if the
  server answers with status code 200
- add a note inside the pom where the webjar versions are hard coded
  inside the project
2023-05-19 23:12:22 +02:00
Florian
478ef3bce7 front-end code refactoring
Since the front-end received much more code (features) than first expected, the files became much too large. For this reason, the JS and CSS code has now been split by component and thus into several small files. However, since there are now many small files, a JS and CSS bundle tool had to come :D.
2023-05-19 13:55:18 +02:00
Arnaud Roques
080cbaada9 chore: fix typo
https://github.com/plantuml/plantuml-server/issues/290
2023-05-17 19:13:46 +02:00
Arnaud Roques
6c2bae2f8a chore: update to version 1.2023.7 2023-05-15 18:38:27 +02:00
Florian
6ca582fcb7 add import and export diagram
- export diagram
  * add a diagram export dialog where you can choose the file name
    and download type (code, png, pdf, ...)
  * set default download type to code
  * open file save dialog via menu or Ctrl+S (or Meta+S for Mac)
- import diagram
  * similar to [draw.io](https://app.diagrams.net)
  * open a PlantUML diagram image, use metat data to get diagram code
    and load this diagram (Note: meta data is currently only supported
    by PNG and SVG diagram files)
  * support drag&drop
  * add diagram import dialog
- since three are now multiple options/action -> create a little
  editor menu
- add documentation (including gif examples)
2023-05-14 11:22:44 +02:00
Florian
ec7b9f9b1a Add metadata Servlet
- add new servlet to get meta data from PlantUML diagram
- meta data get not only be requested as text but also as json if you set the `Accept`-header to json
- add `metadata` servlet tests
- GET: like the Proxy where you can pass a URL which the servlet will use to fetch the diagram image
- POST: file upload
2023-05-11 21:34:32 +02:00
Florian
09517cca92 add emoji auto completion (suggestion)
- typing `<:` will start the emoji auto complition inside the plantuml editor
- for the sake of simplicity the emoji preview of the completion documentation will fetch the image from the original github repository (not plantuml). The reason is that the images (SVGs) inside plantuml have sometimes removed their svg tag, hence it's difficult to set the correct rendering size.
- expand auto completion (suggestion) documentation by default
- add emoji example GIF and documentation
- set charset to utf-8 for each website
- refactor JSON creation inside UI Helper
2023-05-10 22:10:58 +02:00
Florian
6538be2047 fix: PDF servlet
Since the update of `bastik` the PDF servlet didn't work anymore.

Problems:
- No PDF UnitTest existed
- Pom dependency `org.apache.xmlgraphics.batik-all` change nearly every dependency to `optional` starting with version `1.15`, hence some important dependencies like the SVG converter were missing
- `DiagramResponse.CONTENT_TYPE` had no mime type value for PDF

Changes:
- add PDF UnitTest
- remove `batik-all` dependency and only include the dependencies PlantUML requires for the PDF generation:
  * batik-dom
  * batik-svgrasterizer (includes batik-dom)
  * batik-svggen
  * fop
- remove own `DiagramResponse.CONTENT_TYPE` mapping and use `FileFormat.getMimeType()`
2023-05-09 19:45:21 +02:00
Florian
a6e69b33eb docker: use always latest Graphviz release
This will change the Graphviz behaviour inside the docker container.
Until now it was always a fixed Graphviz version inside the Dockerfile.
With these changes the docker container will always use the latest Graphviz release if the version was not manually set via the docker build argument `GRAPHVIZ_VERSION`.

If not set as build arg fetch latest version of Graphviz based on their release name by default.
An alternative would be to use `tag_name`.

Also, to avoid the overhead of getting all kinds of relase data, GitLabs GraphQL interface could be used.
```bash
curl -s \
  -H "Content-Type:application/json" \
  -d '{"query": "{project(fullPath:\"graphviz/graphviz\"){releases(first:5,sort:RELEASED_AT_DESC){nodes{name}}}}"}' \
  "https://gitlab.com/api/graphql" \
| jq -r '.data.project.releases.nodes[].name' | sort -V -r | head -n 1
```
In GraphQL the alternative to `name` would be `tagName`.
2023-05-09 09:34:27 +02:00
Florian
f0d78a146b fix mobile view
- add viewport to header (otherwise smartphones will render the desktop version)
- set focus to the code editor after loading the page
- fix some android dark mode theme issues by settings clear default for the light theme as well
2023-05-09 09:33:57 +02:00
Florian
5d7c4e1a03 update docker base images and reduce size
There were same base image and naming changes for the jetty and tomcat images plantuml-server uses => plantuml-server uses a pretty old and vulnerable images.

- update base images for jetty and tomcat
- add a alpine version for jetty (not tomcat has no official alpine version)
- add autoremove and clean commands after graphviz installation. This reduces the images by about ~280 MB
2023-05-05 17:33:39 -04:00
Florian
323aad1525 JDK8 problem checkstyle
no JDK8 support starting version 10.0.0
https://checkstyle.org/releasenotes.html#Release_10.0
2023-05-05 17:33:39 -04:00
Florian
e5d11fb89a update all dependencies (maven artifacts)
- PDF dependency was missing in the pom file the JDK8
  * We should think about creating a parent pom - in that case all plantuml dependencies could be in the parent pom and we would only the mantain one pom file.
    (It is also possible to drop the Java 8 support.)
  * Why do we not have any PDF tests?
- add rule to ignore version update hint with `-dev` followed by a dot and date (e.g. `0.37.0-dev.20230308`)
- migration from JUnit4 to JUnit5
2023-05-05 17:33:39 -04:00
Florian
e6566b58bd revert missing tests + small fixes
- revert the 4 missing tests, e.g. proxy test from commit 20468f5
- add virtual host name `test.localhost` to embedded jetty server
  (JUnit Tests) since localhost and IP-Addresses are no longer
  supported by the proxy and use this address inside proxy `src`
- add `test-localhost` support for the docker tests. To support
  this the docker hostname need to be set to test.localhost by:
  `--hostname=test.localhost` (only for the docker tests)
- proxy: add file format support for PDF
- proxy: add error messages on "bad request" response
- proxy: remove dead code
- old proxy: add error messages on "bad request" response
- fix incorrect README link to docs
- add `HTTP_PROXY_READ_TIMEOUT` option -- close #240
2023-05-04 18:30:58 -04:00
Florian
ed49010303 add documentation 2023-05-03 13:23:47 -04:00
Florian
f727c6dd13 frontend 2.0: initial version
- auto refresh function
- light and dark theme
- monaco editor (vscode) with "apex" as syntax highlighting language
  * apex seems to work quite fine (better than no highlighting)
  * future possibility: own plantuml language syntax support
  * future possibility: autocomplete (to much work but maybe partial)
    - implemented example for `!theme ...`
    - implemented example for `<&icon>`
  * future possibility: code validation
    - implemented example for `@start...` and `@end...`:
      * should be the first or last command
      * should be of the some type (e.g. `@startyaml` and @endyaml)
      * should be used exactly once per document/diagram
- editor and preview is splitable into two windows like the
  "Extract window" functionality on
  (plantuml.com)[https://www.plantuml.com/plantuml]
- multi index / multi paging diagram support
- diagram can be displayed/rended as PNG, SVG, ASCII Art or PDF
- Ctrl+s download the PlantUML Code as code file (diagram.puml)
- Ctrl+, opens the settings and Esc closes the settings
2023-05-03 13:23:47 -04:00
Florian
763976abdd add servlet to encode and decode diagrams
.
2023-04-18 23:07:59 +02:00
Arnaud Roques
3ef176edae chore: update to 1.2023.6 2023-04-18 22:46:32 +02:00