incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1431612 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/messages.js ambari-web/app/views/common/chart/linear_time.js
Date Thu, 10 Jan 2013 20:26:48 GMT
Author: yusaku
Date: Thu Jan 10 20:26:48 2013
New Revision: 1431612

URL: http://svn.apache.org/viewvc?rev=1431612&view=rev
Log:
AMBARI-1078. Improve graph message when data is not available. (Srimanth Gunturi via yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1431612&r1=1431611&r2=1431612&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 10 20:26:48 2013
@@ -457,6 +457,9 @@ AMBARI-666 branch (unreleased changes)
   AMBARI-676. Seperate directory for ambari-server. (jitendra)
 
   IMPROVEMENTS
+
+  AMBARI-1078. Improve graph message when data is not available.
+  (Srimanth Gunturi via yusaku)
  
   AMBARI-1146. Exclude hosts and include hosts config parameters need 
   clarification. (yusaku)

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1431612&r1=1431611&r2=1431612&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Thu Jan 10 20:26:48 2013
@@ -28,6 +28,11 @@ Em.I18n.translations = {
   'login.password':'Password',
   'login.loginButton':'Sign in',
   'login.error':'Invalid username/password combination.',
+  
+  'graphs.noData.title': 'No Data',
+  'graphs.noData.message': 'There was no data available. Possible reasons include inaccessible
Ganglia service.',
+  'graphs.error.title': 'Error',
+  'graphs.error.message': 'There was a problem getting data for the chart ({0}: {1})',
 
   'services.nagios.description':'Nagios Monitoring and Alerting system',
   'services.ganglia.description':'Ganglia Metrics Collection system',

Modified: incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js?rev=1431612&r1=1431611&r2=1431612&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/chart/linear_time.js Thu Jan 10 20:26:48
2013
@@ -139,8 +139,14 @@ App.ChartLinearTimeView = Ember.View.ext
           hash.contentType = 'application/json; charset=utf-8';
           hash.context = this;
           hash.success = this._refreshGraph,
-          hash.error = function (xhr, textStatus, errorThrown) {
-            this._showMessage('warn', 'Error', 'There was a problem getting data for the
chart (' + textStatus + ': ' + errorThrown + ')');
+           hash.error = function(xhr, textStatus, errorThrown){
+            this.set('isReady', true);
+            if (xhr.readyState == 4 && xhr.status) {
+              textStatus = xhr.status + " " + textStatus;
+            }
+            this._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus,
errorThrown));
+            this.set('isPopup', false);
+            this.set('hasData', false);
           }
           jQuery.ajax(hash);
         }
@@ -291,7 +297,7 @@ App.ChartLinearTimeView = Ember.View.ext
         }
         else {
           this.set('isReady', true);
-          this._showMessage('info', 'No Data', 'There was no data available.');
+          this._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noData.message'));
           this.set('isPopup', false);
           this.set('hasData', false);
         }



Mime
View raw message