changeset 92:5b97346b44e6

URL where the results are to be stored is read from the environment variable set by daily tester/daily report script.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Wed, 18 Sep 2013 15:26:04 +0200
parents fbdcbf025526
children 3e7000a3900e
files ChangeLog src/org/thermostat/qa/reporter/TestResult.java templates/index.html
diffstat 3 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 18 14:43:52 2013 +0200
+++ b/ChangeLog	Wed Sep 18 15:26:04 2013 +0200
@@ -1,3 +1,10 @@
+2013-09-18  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/thermostat/qa/reporter/TestResult.java:
+	* templates/index.html:
+	URL where the results are to be stored is read from the environment
+	variable set by daily tester/daily report script.
+
 2013-09-18  Jana Fabrikova  <jfabriko@redhat.com>
 	* tepmlates/index.html:
 	added info about web page with the results
--- a/src/org/thermostat/qa/reporter/TestResult.java	Wed Sep 18 14:43:52 2013 +0200
+++ b/src/org/thermostat/qa/reporter/TestResult.java	Wed Sep 18 15:26:04 2013 +0200
@@ -249,6 +249,18 @@
     }
 
     /**
+     * Returns the URL where the results are about to be stored.
+     * This URL is stored in the environment variable RESULTS_URL.
+     * 
+     * @return URL where the results are about to be stored.
+     */
+    public String getResultsURL()
+    {
+        String resultsURL = System.getenv().get("RESULTS_URL");
+        return resultsURL != null ? resultsURL : "not set";
+    }
+
+    /**
      * Read test summary from a log file and fill in all attributes.
      *
      * @param testResultForDate log file content
--- a/templates/index.html	Wed Sep 18 14:43:52 2013 +0200
+++ b/templates/index.html	Wed Sep 18 15:26:04 2013 +0200
@@ -45,8 +45,8 @@
     
     <p>
     Link to more results + javadoc: 
-    <a href="http://torment.usersys.redhat.com/openjdk/thermostat"> 
-    http://torment.usersys.redhat.com/openjdk/thermostat </a>
+    <a href="${RESULTS_URL}">
+    ${RESULTS_URL}</a>
     </p>
 
     <br />