storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/4] storm git commit: [STORM-949] On the topology summary UI page, added Elapsed time since error column.
Date Thu, 20 Aug 2015 12:32:27 GMT
Repository: storm
Updated Branches:
  refs/heads/master 9c9418843 -> cc276087b


[STORM-949] On the topology summary UI page, added Elapsed time since error column.


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

Branch: refs/heads/master
Commit: bfd34a5f46ee36e9237c0d7ea7ae4bed9dc567ee
Parents: c3a9385
Author: Boyang Jerry Peng <jerrypeng@yahoo-inc.com>
Authored: Tue Aug 11 15:16:02 2015 -0500
Committer: Boyang Jerry Peng <jerrypeng@yahoo-inc.com>
Committed: Wed Aug 12 10:40:49 2015 -0500

----------------------------------------------------------------------
 .../templates/topology-page-template.html       | 16 +++++++++++++++-
 storm-core/src/ui/public/topology.html          | 20 +++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/bfd34a5f/storm-core/src/ui/public/templates/topology-page-template.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/templates/topology-page-template.html b/storm-core/src/ui/public/templates/topology-page-template.html
index ddf89b7..54b6805 100644
--- a/storm-core/src/ui/public/templates/topology-page-template.html
+++ b/storm-core/src/ui/public/templates/topology-page-template.html
@@ -226,6 +226,10 @@
         </th>
         <th class="header">Last error
         </th>
+        <th class="header">
+          <span data-toggle="tooltip" data-placement="left" title="Format: Hours:Minutes:Seconds">
+            Time Elapsed Since Error
+        </th>
       </tr>
     </thead>
     <tbody>
@@ -244,6 +248,9 @@
         <td>
           <span id="{{errorLapsedSecs}}" class="errorSpan">{{lastError}}</span>
         </td>
+        <td>
+          <span id="{{errorLapsedSecs}}" class="elapsedErrorTime">{{errorLapsedSecs}}</span>
+        </td>
         {{/spouts}}
     </tbody>
   </table>
@@ -313,6 +320,10 @@
         </th>
         <th class="header">Last error
         </th>
+        <th class="header">
+          <span data-toggle="tooltip" data-placement="left" title="Format: Hours:Minutes:Seconds">
+            Time Elapsed Since Error
+        </th>
     </tr></thead>
     <tbody>
       {{#bolts}}
@@ -333,6 +344,9 @@
         <td>
           <span id="{{errorLapsedSecs}}" class="errorSpan">{{lastError}}</span>
         </td>
+        <td>
+          <span id="{{errorLapsedSecs}}" class="elapsedErrorTime">{{errorLapsedSecs}}</span>
+        </td>
         {{/bolts}}
     </tbody>
 </script>
@@ -345,4 +359,4 @@
     <input {{rebalanceStatus}} onclick="confirmAction('{{encodedId}}', '{{name}}', 'rebalance',
true, {{msgTimeout}})" type="button" value="Rebalance" class="btn btn-default">
     <input {{killStatus}} onclick="confirmAction('{{encodedId}}', '{{name}}', 'kill',
true, 30)" type="button" value="Kill" class="btn btn-default">
   </p>
-</script>
+</script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/storm/blob/bfd34a5f/storm-core/src/ui/public/topology.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/topology.html b/storm-core/src/ui/public/topology.html
index 0a1a05b..c5b30d5 100644
--- a/storm-core/src/ui/public/topology.html
+++ b/storm-core/src/ui/public/topology.html
@@ -181,6 +181,24 @@ $(document).ready(function() {
                 errorCells[i].style.borderBottomColor = "#9d261d";
               }
             }
+            var errorElapsedTime = document.getElementsByClassName("elapsedErrorTime");
+            for (i =0; i < errorElapsedTime.length; i++)
+            {
+                if((errorElapsedTime[i].id))
+                {
+                    var sec_num = parseInt(errorElapsedTime[i].id, 10);
+                    var hours   = Math.floor(sec_num / 3600);
+                    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
+                    var seconds = sec_num - (hours * 3600) - (minutes * 60);
+
+                    if (hours   < 10) {hours   = "0"+hours;}
+                    if (minutes < 10) {minutes = "0"+minutes;}
+                    if (seconds < 10) {seconds = "0"+seconds;}
+                    var time    = hours+':'+minutes+':'+seconds;
+
+                    errorElapsedTime[i].innerHTML = time;
+                }
+            }
             $('#topology-summary [data-toggle="tooltip"]').tooltip();
             $('#topology-stats [data-toggle="tooltip"]').tooltip();
             $('#spout-stats [data-toggle="tooltip"]').tooltip();
@@ -192,4 +210,4 @@ $(document).ready(function() {
     });
  });
 </script>
-</html>
+</html>
\ No newline at end of file


Mime
View raw message