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:
parent
e71536f634
commit
85afd8196e
Binary file not shown.
|
@ -1,4 +1,5 @@
|
|||
|
||||
<div id="footer">
|
||||
<p>PlantUML Server @timestamp@
|
||||
<p>PlantUML Server @timestamp@ / version <%= net.sourceforge.plantuml.version.Version.version() %>
|
||||
</p>
|
||||
</div>
|
|
@ -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><img src="<%=imgurl %>" /></code></a>
|
||||
</p>
|
||||
<a href="<%=svgurl%>"/>View as SVG</a>
|
||||
<a href="<%=txturl%>"/>View as ASCII Art</a>
|
||||
<p id="diagram">
|
||||
<img src="<%=imgurl %>" alt="PlantUML diagram"/>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue
Block a user