You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/16 18:48:00 UTC

[jira] [Commented] (AMBARI-24910) Grafana: Fix for Storm Components and Storm Kafka Offset dashboards

    [ https://issues.apache.org/jira/browse/AMBARI-24910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689852#comment-16689852 ] 

ASF GitHub Bot commented on AMBARI-24910:
-----------------------------------------

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:
users@infra.apache.org


> Grafana: Fix for Storm Components and Storm Kafka Offset dashboards
> -------------------------------------------------------------------
>
>                 Key: AMBARI-24910
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24910
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-metrics
>            Reporter: Ishan Bhatt
>            Assignee: Ishan Bhatt
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>
> These two dashboards error out if no data point is provided.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)