New PlantUML.jar
Display Version in the header Add links "View as SVG", "View as ASCII Art"
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<p>PlantUML Server @timestamp@
|
<p>PlantUML Server @timestamp@ / version <%= net.sourceforge.plantuml.version.Version.version() %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -6,11 +6,15 @@ String host = "http://" + request.getServerName() + ":" + request.getServerPort(
|
|||||||
String encoded = "";
|
String encoded = "";
|
||||||
String umltext = "";
|
String umltext = "";
|
||||||
String imgurl = "";
|
String imgurl = "";
|
||||||
|
String svgurl = "";
|
||||||
|
String txturl = "";
|
||||||
Object encodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.encoded");
|
Object encodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.encoded");
|
||||||
if (encodedAttribute != null) {
|
if (encodedAttribute != null) {
|
||||||
encoded = encodedAttribute.toString();
|
encoded = encodedAttribute.toString();
|
||||||
if (!encoded.isEmpty()) {
|
if (!encoded.isEmpty()) {
|
||||||
imgurl = host + contextRoot + "/img/" + encoded;
|
imgurl = host + contextRoot + "/img/" + encoded;
|
||||||
|
svgurl = host + contextRoot + "/svg/" + encoded;
|
||||||
|
txturl = host + contextRoot + "/txt/" + encoded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object decodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.decoded");
|
Object decodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.decoded");
|
||||||
@@ -57,10 +61,8 @@ if (decodedAttribute != null) {
|
|||||||
</form>
|
</form>
|
||||||
<% if ( !imgurl.isEmpty()) { %>
|
<% if ( !imgurl.isEmpty()) { %>
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>You can use the following URL:
|
<a href="<%=svgurl%>"/>View as SVG</a>
|
||||||
<br/>
|
<a href="<%=txturl%>"/>View as ASCII Art</a>
|
||||||
<a href="<%=imgurl %>"><code><img src="<%=imgurl %>" /></code></a>
|
|
||||||
</p>
|
|
||||||
<p id="diagram">
|
<p id="diagram">
|
||||||
<img src="<%=imgurl %>" alt="PlantUML diagram"/>
|
<img src="<%=imgurl %>" alt="PlantUML diagram"/>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user