Add Java runtime name & version to About page - fixes #3240 (#3244)

* Visually center links box

* Add the Java runtime info to the About page - fixes #3240

- Add the Java runtime name & version GetVersionCommand
- Add the returned information to the About page
This commit is contained in:
Tom Morris 2020-10-02 03:41:37 -04:00 committed by GitHub
parent 8a5c6478f1
commit af1cf375f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 25 deletions

View File

@ -53,6 +53,15 @@ public class GetVersionCommand extends Command {
public String full_version = RefineServlet.FULL_VERSION;
@JsonProperty("full_name")
public String full_name = RefineServlet.FULLNAME;
@JsonProperty("java_vm_name")
public String java_vm_name = System.getProperty("java.vm.name", "?");
@JsonProperty("java_vm_version")
public String java_vm_version = System.getProperty("java.vm.version", "?");
@JsonProperty("java_runtime_name")
public String java_runtime_name = System.getProperty("java.runtime.name", "?");
@JsonProperty("java_runtime_version")
// public String java_runtime_version = Runtime.getRuntime().version(); // Java 9 or later
public String java_runtime_version = System.getProperty("java.runtime.version", "?");
}
@Override

View File

@ -54,18 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="externals/languages/fi.js"></script>
<script type="text/javascript" src="externals/languages/ru.js"></script>
<script type="text/javascript" src="scripts/index.js"></script>
<script>
$(function() {
if (OpenRefineVersion && OpenRefineVersion.version) {
if (OpenRefineVersion.version != "$VERSION") {
$("#openrefine-version").text($.i18n("core-index/version", OpenRefineVersion.version + " [" + OpenRefineVersion.revision + "]"));
}
else {
$("#openrefine-version").text($.i18n("core-index/version", "[HEAD]"));
}
}
});
</script>
</head>
<body>
<div id="header">
@ -74,7 +63,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div id="body-info">
<h1>About OpenRefine</h1>
<!-- The following two IDs must match those in index.vt/index.js -->
<h2 id="openrefine-version"></h2>
<h3 id="java-runtime-version"></h3>
<p>
OpenRefine is a power tool for working with messy data. Use it to improve data consistency,
@ -135,7 +126,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2>OpenRefine License</h2>
<pre class="license">
Copyright 2010-2012, Google Inc. and contributors
Copyright 2010-2020, Google Inc. and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -134,6 +134,7 @@ $(function() {
OpenRefineVersion = data;
$("#openrefine-version").text($.i18n('core-index/version', OpenRefineVersion.full_version));
$("#java-runtime-version").text(OpenRefineVersion.java_runtime_name + " " + OpenRefineVersion.java_runtime_version);
$.getJSON("https://api.github.com/repos/openrefine/openrefine/releases/latest",
function( data ) {

View File

@ -76,7 +76,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
font-size: 1.3em;
position: absolute;
bottom: 0;
left: 0;
left: -5px;
width: 100%;
text-align: center;
}