From 64fec90adceff4b9e3ab814f82335901e98000e7 Mon Sep 17 00:00:00 2001 From: shelld0h Date: Sat, 21 Jun 2014 18:08:42 +0800 Subject: [PATCH 1/4] The exception time display as default timezone. The exception time display as default timezone. --- storm-core/src/clj/backtype/storm/ui/helpers.clj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj index c2de7c76f7b..5dae48e1563 100644 --- a/storm-core/src/clj/backtype/storm/ui/helpers.clj +++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj @@ -19,6 +19,7 @@ (:use [clojure [string :only [join]]]) (:use [backtype.storm.util :only [uuid defnk url-encode]]) (:use [clj-time coerce format]) + (:import [org.joda.time DateTimeZone DateTime]) (:import [backtype.storm.generated ExecutorInfo ExecutorSummary]) (:require [compojure.route :as route] [compojure.handler :as handler])) @@ -123,9 +124,13 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers: [(apply sort-table id args)]) ))) +(defn from-long-dtz + [#^Long millis #^DateTimeZone dtz] + (DateTime. millis dtz)) + (defn date-str [secs] - (let [dt (from-long (* 1000 (long secs)))] - (unparse (:rfc822 formatters) dt) + (let [dt (from-long-dtz (* 1000 (long secs)) (DateTimeZone/getDefault))] + (unparse (formatter "EEE, dd MMM yyyy HH:mm:ss Z" (.getZone dt)) dt) )) (defn url-format [fmt & args] From c0aeadb7e16f3b60489a1e2294caaa768f64f594 Mon Sep 17 00:00:00 2001 From: shelld0h Date: Tue, 24 Jun 2014 17:49:00 +0800 Subject: [PATCH 2/4] [STORM-369] topology summary displays an worng Move to the end of taskstotal --- storm-core/src/ui/public/templates/index-page-template.html | 2 +- storm-core/src/ui/public/templates/topology-page-template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storm-core/src/ui/public/templates/index-page-template.html b/storm-core/src/ui/public/templates/index-page-template.html index 589d9e34143..45906e54ce8 100644 --- a/storm-core/src/ui/public/templates/index-page-template.html +++ b/storm-core/src/ui/public/templates/index-page-template.html @@ -40,9 +40,9 @@ {{id}} {{status}} {{uptime}} - {{tasksTotal}} {{workersTotal}} {{executorsTotal}} + {{tasksTotal}} {{/topologies}} 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 af5e16f0b22..d8d3c0576d9 100644 --- a/storm-core/src/ui/public/templates/topology-page-template.html +++ b/storm-core/src/ui/public/templates/topology-page-template.html @@ -23,9 +23,9 @@ {{id}} {{status}} {{uptime}} - {{tasksTotal}} {{workersTotal}} {{executorsTotal}} + {{tasksTotal}} From 9722a3eb41801b0f7c4be524381fa90d1df936a9 Mon Sep 17 00:00:00 2001 From: shelld0h Date: Tue, 24 Jun 2014 17:54:02 +0800 Subject: [PATCH 3/4] Revert "[STORM-369] topology summary displays an worng" This reverts commit c0aeadb7e16f3b60489a1e2294caaa768f64f594. --- storm-core/src/ui/public/templates/index-page-template.html | 2 +- storm-core/src/ui/public/templates/topology-page-template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storm-core/src/ui/public/templates/index-page-template.html b/storm-core/src/ui/public/templates/index-page-template.html index 45906e54ce8..589d9e34143 100644 --- a/storm-core/src/ui/public/templates/index-page-template.html +++ b/storm-core/src/ui/public/templates/index-page-template.html @@ -40,9 +40,9 @@ {{id}} {{status}} {{uptime}} + {{tasksTotal}} {{workersTotal}} {{executorsTotal}} - {{tasksTotal}} {{/topologies}} 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 d8d3c0576d9..af5e16f0b22 100644 --- a/storm-core/src/ui/public/templates/topology-page-template.html +++ b/storm-core/src/ui/public/templates/topology-page-template.html @@ -23,9 +23,9 @@ {{id}} {{status}} {{uptime}} + {{tasksTotal}} {{workersTotal}} {{executorsTotal}} - {{tasksTotal}} From 2328815c7bcf40d2fe743ab39029e5d647c93dff Mon Sep 17 00:00:00 2001 From: shelld0h Date: Tue, 24 Jun 2014 17:56:25 +0800 Subject: [PATCH 4/4] Revert "[STORM-369] topology summary displays an worng" This reverts commit c0aeadb7e16f3b60489a1e2294caaa768f64f594. --- storm-core/src/clj/backtype/storm/ui/helpers.clj | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/storm-core/src/clj/backtype/storm/ui/helpers.clj b/storm-core/src/clj/backtype/storm/ui/helpers.clj index 5dae48e1563..c2de7c76f7b 100644 --- a/storm-core/src/clj/backtype/storm/ui/helpers.clj +++ b/storm-core/src/clj/backtype/storm/ui/helpers.clj @@ -19,7 +19,6 @@ (:use [clojure [string :only [join]]]) (:use [backtype.storm.util :only [uuid defnk url-encode]]) (:use [clj-time coerce format]) - (:import [org.joda.time DateTimeZone DateTime]) (:import [backtype.storm.generated ExecutorInfo ExecutorSummary]) (:require [compojure.route :as route] [compojure.handler :as handler])) @@ -124,13 +123,9 @@ $(\"table#%s\").each(function(i) { $(this).tablesorter({ sortList: %s, headers: [(apply sort-table id args)]) ))) -(defn from-long-dtz - [#^Long millis #^DateTimeZone dtz] - (DateTime. millis dtz)) - (defn date-str [secs] - (let [dt (from-long-dtz (* 1000 (long secs)) (DateTimeZone/getDefault))] - (unparse (formatter "EEE, dd MMM yyyy HH:mm:ss Z" (.getZone dt)) dt) + (let [dt (from-long (* 1000 (long secs)))] + (unparse (:rfc822 formatters) dt) )) (defn url-format [fmt & args]