1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-12-22 08:48:54 +00:00
Commit Graph

436 Commits

Author SHA1 Message Date
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
Marco Beelen
385fa1274a feat: Keeps curl to support healthchecks
Closes #220
Closes #273
2023-04-12 12:14:35 +02:00
Florian Greinacher
972d136665 fix: add more missing libs 2023-04-11 19:26:09 +02:00
Florian Greinacher
329aae7fc6 fix: add missing build dependency for graphviz 2023-04-11 13:46:55 +02:00
Arnaud Roques
ebece93726 Update to version 1.2023.5 2023-04-10 16:26:56 +02:00
Florian Greinacher
8a9825395a fix: use up-to-date graphviz version in tomcat image 2023-03-29 19:36:33 +02:00
Florian Greinacher
df081c20a4 refactor: isolate build 2023-03-29 15:15:04 +02:00
Florian Greinacher
4137d8460e fix: use up-to-date graphviz version 2023-03-29 15:15:04 +02:00
Eric Vantillard
a627da7a1a chore: copy issue templates from plantuml repository 2023-03-28 14:05:19 +02:00
Florian Heinrich
a9bd29a91d Fix workflows deprecated warnings.
- The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
- Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-java@v2, actions/upload-artifact@v2, actions/download-artifact@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2023-03-21 14:25:56 +01:00
Florian Heinrich
638724925e Refactoring relative paths PR#209.
- use html `base` tag containing the context path once instead inside
every single URL/link.
- update and enhance `nginx-contextpath` example
- export javascript code into separated file
- Add TODO note to javascript clipboard check (from PR#250) since
Firefox and Safari do not support the current implementation
2023-03-21 14:14:09 +01:00
Artur Propp
1245b15e01 Add explicit VOLUME instruction for jetty image
Set a mount point for read-only root file system configurations.
Without the explicit mount point definition in the image, we were facing
issues on Amazon ECS, because the directory got mounted with different
ownership (root) and mode (0755).

For reference please see also:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bind-mounts.html#bind-mount-considerations
2023-03-08 17:30:00 +01:00
Florian
99f85c0c9b Use relative paths as far as possible.
Switch from absolute paths `hostpath` to relative paths `contextpath`.
Unfortunately, for the url input javascript is necessary to resolve the
relative url.
Also see Issue #205.
2023-02-24 09:26:48 +01:00
Joel Pearson
4a5e204e16 Adding PDF support #130 2023-02-17 19:43:59 +01:00
Arnaud Roques
8cb5ca0daf Version 1.2023.1 2023-01-29 23:48:19 +01:00
Florian Greinacher
afd8bbcceb feat: support deep base URLs 2023-01-26 10:29:03 +01:00
Arnaud Roques
6d90304fd7 Restore https://github.com/plantuml/plantuml-server/pull/251 2023-01-15 18:19:07 +01:00
Arnaud Roques
f62ba44e7d Restore https://github.com/plantuml/plantuml-server/pull/250 2023-01-15 18:08:07 +01:00
Arnaud Roques
823b506900 Import version 1.2023.0 2023-01-12 20:01:23 +01:00
Arnaud Roques
b458bfad19 Version 1.2022.14 2022-12-07 22:51:38 +01:00
Arnaud Roques
a7a5b91933 Temporary remove tests 2022-12-06 19:20:32 +01:00
Arnaud Roques
20468f5bd9 Temporary remove tests 2022-12-06 19:18:43 +01:00
Arnaud Roques
10dd88714a test 2022-12-06 19:12:57 +01:00
Arnaud Roques
df9c10604a improve tests 2022-12-06 19:06:00 +01:00
Arnaud Roques
0154160c7d Improve tests 2022-12-06 18:52:30 +01:00
Arnaud Roques
4d65def8bb Improve proxy management 2022-12-06 18:42:54 +01:00
Arnaud Roques
efd53664f2 Import version 1.2022.13 2022-11-20 10:37:51 +01:00
Hans
345e996673 fix typo 2022-11-07 13:00:28 +01:00
Hans
dcd4436fcf add openshift permission 2022-11-07 13:00:28 +01:00
Hans
7285ce1cc8 Update Dockerfile.jetty
change user
2022-11-07 13:00:28 +01:00
Hans
a0ed47b51c add openshift permission 2022-11-07 13:00:28 +01:00
Arnaud Roques
052a7ea96f Import version 1.2022.12 2022-11-05 13:05:40 +01:00
Arnaud Roques
b8cb1e2ff0 Version 1.2022.7 2022-08-23 19:20:37 +02:00
Thomas Mons
cf717eff0c Introduced parameter PLANTUML_CONFIG_FILE, that allows to specify a PlantUML config file. 2022-07-29 12:49:22 +02:00
Markus Opolka
820fcca9ac Add simple Kubernetes example 2022-07-21 15:22:50 +02:00