diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index 7128cfe9430..3f6a1c9e72e 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -222,7 +222,7 @@ topology.enable.message.timeouts: true
topology.debug: false
topology.workers: 1
topology.acker.executors: null
-topology.eventlogger.executors: null
+topology.eventlogger.executors: 0
topology.tasks: null
# maximum amount of time a message has to complete before it's considered failed
topology.message.timeout.secs: 30
diff --git a/storm-core/src/ui/public/component.html b/storm-core/src/ui/public/component.html
index 6d5465f17de..37ee525c92d 100644
--- a/storm-core/src/ui/public/component.html
+++ b/storm-core/src/ui/public/component.html
@@ -192,10 +192,26 @@
$('#ui-user [data-toggle="tooltip"]').tooltip()
});
+ var topologyUrl = "/api/v1/topology/"+topologyId;
+
+ var eventLoggers = (function() {
+ $.ajaxSetup({
+ async: false
+ });
+ var eventLoggers;
+ $.getJSON(topologyUrl, function(response, status, jqXHR) {
+ eventLoggers = response["configuration"]["topology.eventlogger.executors"];
+ });
+ $.ajaxSetup({
+ async: true
+ })
+ return eventLoggers;
+ })();
+
var componentSummary = $("#component-summary");
var componentActions = $("#component-actions");
var buttonJsonData = componentActionJson(response["encodedTopologyId"], response["encodedId"], response["id"],
- response["topologyStatus"], response["debug"], response["samplingPct"]);
+ response["topologyStatus"], eventLoggers, response["debug"], response["samplingPct"]);
var componentStatsDetail = $("#component-stats-detail")
var inputStats = $("#component-input-stats");
var outputStats = $("#component-output-stats");
diff --git a/storm-core/src/ui/public/js/script.js b/storm-core/src/ui/public/js/script.js
index a880205a710..ff3c5255548 100644
--- a/storm-core/src/ui/public/js/script.js
+++ b/storm-core/src/ui/public/js/script.js
@@ -210,7 +210,7 @@ function renderToggleSys(div) {
}
}
-function topologyActionJson(id, encodedId, name, status, msgTimeout, debug, samplingPct) {
+function topologyActionJson(id, encodedId, name, status, msgTimeout, loggersTotal, debug, samplingPct) {
var jsonData = {};
jsonData["id"] = id;
jsonData["encodedId"] = encodedId;
@@ -220,19 +220,21 @@ function topologyActionJson(id, encodedId, name, status, msgTimeout, debug, samp
jsonData["deactivateStatus"] = (status === "ACTIVE") ? "enabled" : "disabled";
jsonData["rebalanceStatus"] = (status === "ACTIVE" || status === "INACTIVE" ) ? "enabled" : "disabled";
jsonData["killStatus"] = (status !== "KILLED") ? "enabled" : "disabled";
- jsonData["startDebugStatus"] = (status === "ACTIVE" && !debug) ? "enabled" : "disabled";
+ jsonData["startDebugStatus"] = (status === "ACTIVE" && loggersTotal!=null && loggersTotal!=0 && !debug) ? "enabled" : "disabled";
jsonData["stopDebugStatus"] = (status === "ACTIVE" && debug) ? "enabled" : "disabled";
+ jsonData["loggersDisabled"] = loggersTotal==null || loggersTotal==0;
jsonData["currentSamplingPct"] = samplingPct;
return jsonData;
}
-function componentActionJson(encodedTopologyId, encodedId, componentName, status, debug, samplingPct) {
+function componentActionJson(encodedTopologyId, encodedId, componentName, status, loggersTotal, debug, samplingPct) {
var jsonData = {};
jsonData["encodedTopologyId"] = encodedTopologyId;
jsonData["encodedId"] = encodedId;
jsonData["componentName"] = componentName;
- jsonData["startDebugStatus"] = (status === "ACTIVE" && !debug) ? "enabled" : "disabled";
+ jsonData["startDebugStatus"] = (status === "ACTIVE" && loggersTotal!=null && loggersTotal!=0 && !debug) ? "enabled" : "disabled";
jsonData["stopDebugStatus"] = (status === "ACTIVE" && debug) ? "enabled" : "disabled";
+ jsonData["loggersDisabled"] = loggersTotal==null || loggersTotal==0;
jsonData["currentSamplingPct"] = samplingPct;
return jsonData;
}
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 3626291309d..472a769bfbf 100644
--- a/storm-core/src/ui/public/templates/component-page-template.html
+++ b/storm-core/src/ui/public/templates/component-page-template.html
@@ -557,7 +557,13 @@ Errors
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 02b3c7693b1..917831a9316 100644
--- a/storm-core/src/ui/public/templates/topology-page-template.html
+++ b/storm-core/src/ui/public/templates/topology-page-template.html
@@ -434,7 +434,13 @@ Topology actions
-
+ {{#loggersDisabled}}
+
+ {{/loggersDisabled}}
+
+ {{#loggersDisabled}}
+
+ {{/loggersDisabled}}
diff --git a/storm-core/src/ui/public/topology.html b/storm-core/src/ui/public/topology.html
index feb81f8f271..061fd918aac 100644
--- a/storm-core/src/ui/public/topology.html
+++ b/storm-core/src/ui/public/topology.html
@@ -285,7 +285,7 @@
var searchForm = $("#search-form")
var formattedConfig = formatConfigData(response["configuration"]);
var buttonJsonData = topologyActionJson(response["id"],response["encodedId"],response["name"],response["status"]
- ,response["msgTimeout"],response["debug"],response["samplingPct"]);
+ ,response["msgTimeout"],response["configuration"]["topology.eventlogger.executors"],response["debug"],response["samplingPct"]);
$.ajax ({url: "/templates/topology-page-template.html", success: function(template) {
toggleChangeLogLevel = function (data) {
renderLogLevelForm (template, data);