You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/01/20 23:15:39 UTC

[37/46] storm git commit: Merge branch '1472' of https://github.com/zhuoliu/storm into STORM-1472

Merge branch '1472' of https://github.com/zhuoliu/storm into STORM-1472

STORM-1472: Fix the errorTime bug and show the time to be readable


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8ff614f0
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8ff614f0
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8ff614f0

Branch: refs/heads/master
Commit: 8ff614f09d0d71c7a64925fde0d8ef771ea8081a
Parents: 93e0d02
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Wed Jan 20 10:48:19 2016 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Wed Jan 20 11:00:22 2016 -0600

----------------------------------------------------------------------
 storm-core/src/clj/org/apache/storm/ui/core.clj             | 2 +-
 storm-core/src/ui/public/component.html                     | 9 +++++++++
 .../src/ui/public/templates/component-page-template.html    | 4 +++-
 3 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/8ff614f0/storm-core/src/clj/org/apache/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/core.clj b/storm-core/src/clj/org/apache/storm/ui/core.clj
index b309b2c..9bdc0e9 100644
--- a/storm-core/src/clj/org/apache/storm/ui/core.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/core.clj
@@ -646,7 +646,7 @@
                     reverse)]
     {"componentErrors"
      (for [^ErrorInfo e errors]
-       {"time" (* 1000 (long (.get_error_time_secs e)))
+       {"errorTime" (* 1000 (long (.get_error_time_secs e)))
         "errorHost" (.get_host e)
         "errorPort"  (.get_port e)
         "errorWorkerLogLink"  (worker-log-link (.get_host e)

http://git-wip-us.apache.org/repos/asf/storm/blob/8ff614f0/storm-core/src/ui/public/component.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/component.html b/storm-core/src/ui/public/component.html
index 964eacb..06c485c 100644
--- a/storm-core/src/ui/public/component.html
+++ b/storm-core/src/ui/public/component.html
@@ -298,6 +298,15 @@ $(document).ready(function() {
             //time, error
             dtAutoPage("#component-errors-table", {});
 
+            var errorTimeCells = document.getElementsByClassName("errorTimeSpan");
+            for (i = 0; i < errorTimeCells.length; i++)
+            {
+              var timeInMilliseconds = errorTimeCells[i].id;
+              var time = parseInt(timeInMilliseconds);
+              var date = new Date(time);
+              errorTimeCells[i].innerHTML = date.toJSON();
+            }
+
             var errorCells = document.getElementsByClassName("errorSpan");
             for (i =0; i < errorCells.length; i++)
             {

http://git-wip-us.apache.org/repos/asf/storm/blob/8ff614f0/storm-core/src/ui/public/templates/component-page-template.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/templates/component-page-template.html b/storm-core/src/ui/public/templates/component-page-template.html
index e852eeb..79a21cd 100644
--- a/storm-core/src/ui/public/templates/component-page-template.html
+++ b/storm-core/src/ui/public/templates/component-page-template.html
@@ -539,7 +539,9 @@
     <tbody>
       {{#componentErrors}}
       <tr>
-        <td>{{errorTime}}</td>
+        <td>
+          <span id="{{errorTime}}" class="errorTimeSpan">{{errorTime}}</span>
+        </td>
         <td>{{errorHost}}</td>
         <td><a href="{{errorWorkerLogLink}}">{{errorPort}}</a></td>
         <td>