[jira] [Commented] (AMBARI-24884) AMS Grafana query editor panel does not work in upgraded version.

2018-11-14 Thread Hudson (JIRA)


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

Hudson commented on AMBARI-24884:
-

SUCCESS: Integrated in Jenkins build Ambari-Metrics-master-Commit #13 (See 
[https://builds.apache.org/job/Ambari-Metrics-master-Commit/13/])
[AMBARI-24884] Grafana New dashboard edit errors. (ishanbhatt.1989: 
[https://gitbox.apache.org/repos/asf?p=ambari-metrics.git&a=commit&h=63eb69fa8166e93a142629205d88bb4f5f35cca8])
* (edit) ambari-metrics-grafana/ambari-metrics/query_ctrl.js
* (edit) ambari-metrics-grafana/ambari-metrics/query_ctrl.ts


> AMS Grafana query editor panel does not work in upgraded version.
> -
>
> Key: AMBARI-24884
> URL: https://issues.apache.org/jira/browse/AMBARI-24884
> 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
>
>
> Following issues are encountered
>  - Dropdown list not appearing.
>  - Metrics not automatically refreshed
>  - Error on collapsing a metric.



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


[jira] [Commented] (AMBARI-24884) AMS Grafana query editor panel does not work in upgraded version.

2018-11-14 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AMBARI-24884:
-

ishanbha closed pull request #9: [AMBARI-24884] AMS Grafana query editor panel 
does not work in upgraded version.
URL: https://github.com/apache/ambari-metrics/pull/9
 
 
   

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/query_ctrl.js 
b/ambari-metrics-grafana/ambari-metrics/query_ctrl.js
index 5b5c4a9..b466167 100644
--- a/ambari-metrics-grafana/ambari-metrics/query_ctrl.js
+++ b/ambari-metrics-grafana/ambari-metrics/query_ctrl.js
@@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || (function () {
 })();
 exports.__esModule = true;
 ///
-var angular_1 = require("angular");
+require("angular");
 var lodash_1 = require("lodash");
 var sdk_1 = require("app/plugins/sdk");
 var AmbariMetricsQueryCtrl = /** @class */ (function (_super) {
@@ -39,75 +39,6 @@ var AmbariMetricsQueryCtrl = /** @class */ (function 
(_super) {
 /** @ngInject **/
 function AmbariMetricsQueryCtrl($scope, $injector) {
 var _this = _super.call(this, $scope, $injector) || this;
-_this.targetBlur = function () {
-this.target.errors = this.validateTarget(this.target);
-// this does not work so good
-if (!lodash_1["default"].isEqual(this.oldTarget, this.target) && 
lodash_1["default"].isEmpty(this.target.errors)) {
-this.oldTarget = angular_1["default"].copy(this.target);
-this.get_data();
-}
-};
-_this.getTextValues = function (metricFindResult) {
-return lodash_1["default"].map(metricFindResult, function (value) 
{ return value.text; });
-};
-_this.suggestApps = function (query, callback) {
-this.datasource.suggestApps(query)
-.then(this.getTextValues)
-.then(callback);
-};
-_this.suggestClusters = function (query, callback) {
-this.datasource.suggestClusters(this.target.app)
-.then(this.getTextValues)
-.then(callback);
-};
-_this.suggestHosts = function (query, callback) {
-this.datasource.suggestHosts(this.target.app, this.target.cluster)
-.then(this.getTextValues)
-.then(callback);
-};
-_this.suggestMetrics = function (query, callback) {
-this.datasource.suggestMetrics(query, this.target.app)
-.then(this.getTextValues)
-.then(callback);
-};
-_this.suggestTagKeys = function (query, callback) {
-this.datasource.metricFindQuery('tag_names(' + this.target.metric 
+ ')')
-.then(this.getTextValues)
-.then(callback);
-};
-_this.suggestTagValues = function (query, callback) {
-this.datasource.metricFindQuery('tag_values(' + this.target.metric 
+ ',' + this.target.currentTagKey + ')')
-.then(this.getTextValues)
-.then(callback);
-};
-_this.addTag = function () {
-if (!this.addTagMode) {
-this.addTagMode = true;
-return;
-}
-if (!this.target.tags) {
-this.target.tags = {};
-}
-this.target.errors = this.validateTarget(this.target);
-if (!this.target.errors.tags) {
-this.target.tags[this.target.currentTagKey] = 
this.target.currentTagValue;
-this.target.currentTagKey = '';
-this.target.currentTagValue = '';
-this.targetBlur();
-}
-this.addTagMode = false;
-};
-_this.removeTag = function (key) {
-delete this.target.tags[key];
-this.targetBlur();
-};
-_this.validateTarget = function (target) {
-var errs = {};
-if (target.tags && lodash_1["default"].has(target.tags, 
target.currentTagKey)) {
-errs.tags = "Duplicate tag key '" + target.currentTagKey + 
"'.";
-}
-return errs;
-};
 _this.errors = _this.validateTarget(_this.target);
 _this.aggregators = ['none', 'avg', 'sum', 'min', 'max'];
 _this.precisions = ['default', 'seconds', 'minutes', 'hours', 'days'];
@@ -131,7 +62,7 @@ var AmbariMetricsQueryCtrl = /** @class */ (function 
(_super) {
 this.target.seriesAggregator = "none";
 }
 };
-_this.$watch('target.app', function

[jira] [Commented] (AMBARI-24884) AMS Grafana query editor panel does not work in upgraded version.

2018-11-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AMBARI-24884:
-

asfgit commented on issue #9: [AMBARI-24884] AMS Grafana query editor panel 
does not work in upgraded version.
URL: https://github.com/apache/ambari-metrics/pull/9#issuecomment-438121830
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-Metrics-Github-PR-Builder/21/
   Test PASSed.
   


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


> AMS Grafana query editor panel does not work in upgraded version.
> -
>
> Key: AMBARI-24884
> URL: https://issues.apache.org/jira/browse/AMBARI-24884
> 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
>
>
> Following issues are encountered
>  - Dropdown list not appearing.
>  - Metrics not automatically refreshed
>  - Error on collapsing a metric.



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


[jira] [Commented] (AMBARI-24884) AMS Grafana query editor panel does not work in upgraded version.

2018-11-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AMBARI-24884:
-

asfgit commented on issue #9: [AMBARI-24884] AMS Grafana query editor panel 
does not work in upgraded version.
URL: https://github.com/apache/ambari-metrics/pull/9#issuecomment-438119746
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-Metrics-Github-PR-Builder/20/
   Test PASSed.
   


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


> AMS Grafana query editor panel does not work in upgraded version.
> -
>
> Key: AMBARI-24884
> URL: https://issues.apache.org/jira/browse/AMBARI-24884
> 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
>
>
> Following issues are encountered
>  - Dropdown list not appearing.
>  - Metrics not automatically refreshed
>  - Error on collapsing a metric.



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