ishanbha closed pull request #11: [AMBARI-24910] Grafana: Fix for Storm Components and Storm Kafka Offse… URL: https://github.com/apache/ambari-metrics/pull/11
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics-grafana/ambari-metrics/datasource.js index c6885da..dd64566 100644 --- a/ambari-metrics-grafana/ambari-metrics/datasource.js +++ b/ambari-metrics-grafana/ambari-metrics/datasource.js @@ -642,8 +642,8 @@ define([ //Templatized Dashboards for Storm Components if (templateSrv.variables[0].query === "topologies" && templateSrv.variables[1] && templateSrv.variables[1].name === "component") { - var selectedTopology = templateSrv._values.topologies; - var selectedComponent = templateSrv._values.component; + var selectedTopology = templateSrv.index.topologies.options[0].value || ""; + var selectedComponent = templateSrv.index.component.options[0] ? templateSrv.index.component.options[0].value : ""; metricsPromises.push(_.map(options.targets, function (target) { target.sTopology = selectedTopology; target.sComponent = selectedComponent; @@ -655,8 +655,8 @@ define([ //Templatized Dashboard for Storm Kafka Offset if (templateSrv.variables[0].query === "topologies" && templateSrv.variables[1] && templateSrv.variables[1].name === "topic") { - var selectedTopology = templateSrv._values.topologies; - var selectedTopic = templateSrv._values.topic; + var selectedTopology = templateSrv.index.topologies.options[0].value || ""; + var selectedTopic = templateSrv.index.topic.options[0] ? templateSrv.index.topic.options[0].value : ""; metricsPromises.push(_.map(options.targets, function (target) { target.sTopology = selectedTopology; target.sTopic = selectedTopic; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services