1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-08 03:10:52 +00:00

New PlantUML.jar

Display Version in the header
Add links "View as SVG", "View as ASCII Art"
This commit is contained in:
Arnaud Roques 2011-04-21 19:52:50 +02:00
parent e71536f634
commit 85afd8196e
3 changed files with 8 additions and 5 deletions

Binary file not shown.

View File

@ -1,4 +1,5 @@
<div id="footer">
<p>PlantUML Server @timestamp@
<p>PlantUML Server @timestamp@ / version <%= net.sourceforge.plantuml.version.Version.version() %>
</p>
</div>

View File

@ -6,11 +6,15 @@ String host = "http://" + request.getServerName() + ":" + request.getServerPort(
String encoded = "";
String umltext = "";
String imgurl = "";
String svgurl = "";
String txturl = "";
Object encodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.encoded");
if (encodedAttribute != null) {
encoded = encodedAttribute.toString();
if (!encoded.isEmpty()) {
imgurl = host + contextRoot + "/img/" + encoded;
svgurl = host + contextRoot + "/svg/" + encoded;
txturl = host + contextRoot + "/txt/" + encoded;
}
}
Object decodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.decoded");
@ -57,10 +61,8 @@ if (decodedAttribute != null) {
</form>
<% if ( !imgurl.isEmpty()) { %>
<hr/>
<p>You can use the following URL:
<br/>
<a href="<%=imgurl %>"><code>&lt;img src="<%=imgurl %>" /&gt;</code></a>
</p>
<a href="<%=svgurl%>"/>View as SVG</a>&nbsp;
<a href="<%=txturl%>"/>View as ASCII Art</a>
<p id="diagram">
<img src="<%=imgurl %>" alt="PlantUML diagram"/>
</p>