You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/03/20 21:44:50 UTC

svn commit: r1459041 [17/18] - in /incubator/ambari/branches/branch-1.2: ./ ambari-agent/ ambari-agent/conf/unix/ ambari-agent/src/main/puppet/modules/hdp-ganglia/files/ ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/ ambari-agent/src/main/...

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/chart/linear_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/chart/linear_time.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/chart/linear_time.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/chart/linear_time.js Wed Mar 20 20:44:43 2013
@@ -142,7 +142,7 @@ App.ChartLinearTimeView = Ember.View.ext
   },
 
   loadData: function() {
-    var validUrl = this.get('url');
+    var validUrl = this.getFormattedUrl();
     if (validUrl) {
       var hash = {};
       hash.url = validUrl;
@@ -303,7 +303,6 @@ App.ChartLinearTimeView = Ember.View.ext
     }
     var seriesData = this.transformToSeries(jsonData);
 
-    if (this.checkSeries(seriesData)) {
       //if graph opened as modal popup
       var popup_path = $("#" + this.id + "-container" + this.get('popupSuffix'));
       var graph_container = $("#" + this.id + "-container");
@@ -318,6 +317,7 @@ App.ChartLinearTimeView = Ember.View.ext
           $(value).children().remove();
         });
       }
+    if (this.checkSeries(seriesData)) {
       // Check container exists (may be not, if we go to another page and wait while graphs loading)
       if (graph_container.length) {
         this.draw(seriesData);
@@ -326,26 +326,49 @@ App.ChartLinearTimeView = Ember.View.ext
     }
     else {
       this.set('isReady', true);
-      this._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noData.message'));
+      //if Axis X time interval is default(60 minutes)
+      if(this.get('timeUnitSeconds') === 3600){
+        this._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noData.message'));
+        this.set('hasData', false);
+      } else {
+        this._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noDataAtTime.message'));
+      }
       this.set('isPopup', false);
-      this.set('hasData', false);
     }
   },
 
   /**
-   * Returns a custom time unit for the graph's X axis. This is needed
-   * as Rickshaw's default time X axis uses UTC time, which can be confusing
-   * for users expecting locale specific time. This value defaults to
-   * App.ChartLinearTimeView.FifteenMinuteTimeUnit.
+   * Returns a custom time unit, that depends on X axis interval length, for the graph's X axis.
+   * This is needed as Rickshaw's default time X axis uses UTC time, which can be confusing
+   * for users expecting locale specific time.
    *
    * If <code>null</code> is returned, Rickshaw's default time unit is used.
    *
    * @type Function
    * @return Rickshaw.Fixtures.Time
-   * @default App.ChartLinearTimeView.FifteenMinuteTimeUnit
    */
-  localeTimeUnit: function(){
-    return App.ChartLinearTimeView.FifteenMinuteTimeUnit;
+  localeTimeUnit: function(timeUnitSeconds){
+    var timeUnit = new Rickshaw.Fixtures.Time();
+    switch (timeUnitSeconds){
+      case 604800:
+        timeUnit = timeUnit.unit('day');
+        break;
+      case 2592000:
+        timeUnit = timeUnit.unit('week');
+        break;
+      case 31104000:
+        timeUnit = timeUnit.unit('month');
+        break;
+      default:
+        timeUnit = {
+          name: timeUnitSeconds / 240 + ' minute',
+          seconds: timeUnitSeconds / 4,
+          formatter: function (d) {
+            return d.toLocaleString().match(/(\d+:\d+):/)[1];
+          }
+        };
+    }
+    return timeUnit;
   },
 
   /**
@@ -369,6 +392,26 @@ App.ChartLinearTimeView = Ember.View.ext
           + "px");
     }
   },
+  /**
+   * temporary fix for incoming data for graph
+   * to shift data time to correct time point
+   */
+  dataShiftFix: function(data){
+    var nowTime = Math.round(new Date().getTime() / 1000);
+    data.forEach(function(series){
+      var l = series.data.length;
+      var shiftDiff = nowTime - series.data[l - 1].x;
+      if(shiftDiff > 3600){
+        for(var i = 0;i < l;i++){
+          series.data[i].x = series.data[i].x + shiftDiff;
+        }
+        series.data.unshift({
+          x: nowTime - this.get('timeUnitSeconds'),
+          y: 0
+        });
+      }
+    }, this);
+  },
 
   draw: function(seriesData) {
     var isPopup = this.get('isPopup');
@@ -378,6 +421,8 @@ App.ChartLinearTimeView = Ember.View.ext
     }
     var palette = new Rickshaw.Color.Palette({ scheme: 'munin'});
 
+    this.dataShiftFix(seriesData);
+
     // var palette = new Rickshaw.Color.Palette({
     //   scheme: this._paletteScheme
     // });
@@ -467,7 +512,7 @@ App.ChartLinearTimeView = Ember.View.ext
 
     xAxis = new Rickshaw.Graph.Axis.Time({
       graph: _graph,
-      timeUnit: this.localeTimeUnit()
+      timeUnit: this.localeTimeUnit(this.get('timeUnitSeconds'))
     });
 
     var orientation = 'right';
@@ -561,7 +606,6 @@ App.ChartLinearTimeView = Ember.View.ext
     else {
       this.set('_graph', _graph);
     }
-    this.set('isPopup', false);
   },
 
 
@@ -586,13 +630,16 @@ App.ChartLinearTimeView = Ember.View.ext
         '{{#if bodyClass}}{{view bodyClass}}',
         '{{else}}',
           '<div class="screensaver no-borders chart-container" {{bindAttr class="view.isReady:hide"}} ></div>',
+          '<div class="time-label" {{bindAttr class="view.isReady::hidden"}}>{{view.currentTimeState.name}}</div>',
+          '{{#if view.isTimePagingEnable}}<div class="arrow-left" {{bindAttr class="view.leftArrowVisible:visibleArrow"}} {{action "switchTimeBack" target="view"}}></div>{{/if}}',
           '<div id="'+this.get('id')+'-container'+this.get('popupSuffix')+'" class="chart-container chart-container'+this.get('popupSuffix')+' hide" {{bindAttr class="view.isReady:show"}} >',
             '<div id="'+this.get('id')+'-yaxis'+this.get('popupSuffix')+'" class="'+this.get('id')+'-yaxis chart-y-axis"></div>',
             '<div id="'+this.get('id')+'-xaxis'+this.get('popupSuffix')+'" class="'+this.get('id')+'-xaxis chart-x-axis"></div>',
             '<div id="'+this.get('id')+'-legend'+this.get('popupSuffix')+'" class="'+this.get('id')+'-legend chart-legend"></div>',
             '<div id="'+this.get('id')+'-chart'+this.get('popupSuffix')+'" class="'+this.get('id')+'-chart chart"></div>',
-            '<div id="'+this.get('id')+'-title'+this.get('popupSuffix')+'" class="'+this.get('id')+'-title chart-title">{{view.title}}</div>'+
+            '<div id="'+this.get('id')+'-title'+this.get('popupSuffix')+'" class="'+this.get('id')+'-title chart-title">{{view.title}}</div>',
           '</div>',
+        '{{#if view.isTimePagingEnable}}<div class="arrow-right" {{bindAttr class="view.rightArrowVisible:visibleArrow"}} {{action "switchTimeForward" "forward" target="view"}}></div>{{/if}}',
         '{{/if}}',
         '</div>',
         '<div class="modal-footer">',
@@ -610,13 +657,107 @@ App.ChartLinearTimeView = Ember.View.ext
       onPrimary: function() {
         this.hide();
         self.set('isPopup', false);
-      }
+        self.set('timeUnitSeconds', 3600);
+      },
+      onClose: function(){
+        this.hide();
+        self.set('isPopup', false);
+        self.set('timeUnitSeconds', 3600);
+      },
+      /**
+       * check is time paging feature is enable for graph
+       */
+      isTimePagingEnable: function(){
+        return !self.get('isTimePagingDisable');
+      }.property(),
+      rightArrowVisible: function(){
+        return (this.get('isReady') && (this.get('currentTimeIndex') != 0))? true : false;
+      }.property('isReady', 'currentTimeIndex'),
+      leftArrowVisible: function(){
+        return (this.get('isReady') && (this.get('currentTimeIndex') != 7))? true : false;
+      }.property('isReady', 'currentTimeIndex'),
+      /**
+       * move graph back by time
+       * @param event
+       */
+      switchTimeBack: function(event){
+        var index = this.get('currentTimeIndex');
+        // 7 - number of last time state
+        if(index < 7){
+          this.reloadGraphByTime(++index);
+        }
+      },
+      /**
+       * move graph forward by time
+       * @param event
+       */
+      switchTimeForward: function(event){
+        var index = this.get('currentTimeIndex');
+        if(index > 0){
+          this.reloadGraphByTime(--index);
+        }
+      },
+      /**
+       * reload graph depending on the time
+       * @param index
+       */
+      reloadGraphByTime: function(index){
+        this.set('currentTimeIndex', index);
+        self.set('timeUnitSeconds', this.get('timeStates')[index].seconds);
+        self.loadData();
+      },
+      timeStates: [
+        {name: Em.I18n.t('graphs.timeRange.hour'), seconds: 3600},
+        {name: Em.I18n.t('graphs.timeRange.twoHours'), seconds: 7200},
+        {name: Em.I18n.t('graphs.timeRange.fourHours'), seconds: 14400},
+        {name: Em.I18n.t('graphs.timeRange.twelveHours'), seconds: 43200},
+        {name: Em.I18n.t('graphs.timeRange.day'), seconds: 86400},
+        {name: Em.I18n.t('graphs.timeRange.week'), seconds: 604800},
+        {name: Em.I18n.t('graphs.timeRange.month'), seconds: 2592000},
+        {name: Em.I18n.t('graphs.timeRange.year'), seconds: 31104000}
+      ],
+      currentTimeIndex: 0,
+      currentTimeState: function(){
+        return this.get('timeStates').objectAt(this.get('currentTimeIndex'));
+      }.property('currentTimeIndex')
     });
     Ember.run.next(function() {
       self.loadData();
       self.set('isPopupReady', false);
     });
-  }
+  },
+  /**
+   * return formatted URL that depends on timeUnit
+   * on host metrics depends on host name
+   * on MapReduce metrics depends on  jobTracker Node
+   * @return {String}
+   */
+  getFormattedUrl:function(){
+    var toSeconds = Math.round(new Date().getTime() / 1000);
+    var hostName = (this.get('content')) ? this.get('content.hostName') : "";
+    var nameNodeName = (App.HDFSService.find().objectAt(0)) ?
+      App.HDFSService.find().objectAt(0).get('nameNode').get('hostName') :
+      "";
+    var jobTrackerNode = (App.MapReduceService.find().objectAt(0))
+      ? App.MapReduceService.find().objectAt(0).get('jobTracker').get('hostName')
+      : "";
+    var timeUnit = this.get('timeUnitSeconds');
+
+    return App.formatUrl(
+      this.get('urlPrefix') + this.get('sourceUrl'),
+      {
+        toSeconds: toSeconds,
+        fromSeconds: toSeconds - timeUnit,
+        stepSeconds: 15,
+        hostName: hostName,
+        nameNodeName: nameNodeName,
+        jobTrackerNode: jobTrackerNode
+      },
+      this.get('mockUrl')
+    );
+  },
+  //60 minute interval on X axis.
+  timeUnitSeconds: 3600
 });
 
 /**
@@ -694,17 +835,4 @@ App.ChartLinearTimeView.TimeElapsedForma
     }
   }
   return value;
-};
-
-/**
- * A time unit which can be used for showing 15 minute intervals on X axis.
- * 
- * @type Rickshaw.Fixtures.Time
- */
-App.ChartLinearTimeView.FifteenMinuteTimeUnit = {
-  name: '15 minute',
-  seconds: 60 * 15,
-  formatter: function (d) {
-    return d.toLocaleString().match(/(\d+:\d+):/)[1];
-  }
 };
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/filter_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/filter_view.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/filter_view.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/filter_view.js Wed Mar 20 20:44:43 2013
@@ -245,5 +245,138 @@ module.exports = {
     config.emptyValue = 'Any';
 
     return wrapperView.extend(config);
+  },
+  /**
+   * returns the filter function, which depends on the type of property
+   * @param type
+   * @param isGlobal check is search global
+   * @return {Function}
+   */
+  getFilterByType: function(type, isGlobal){
+    switch (type){
+      case 'ambari-bandwidth':
+        return function(rowValue, rangeExp){
+          var compareChar = isNaN(rangeExp.charAt(0)) ? rangeExp.charAt(0) : false;
+          var compareScale = rangeExp.charAt(rangeExp.length - 1);
+          var compareValue = compareChar ? parseFloat(rangeExp.substr(1, rangeExp.length)) : parseFloat(rangeExp.substr(0, rangeExp.length));
+          var match = false;
+          if (rangeExp.length == 1 && compareChar !== false) {
+            // User types only '=' or '>' or '<', so don't filter column values
+            match = true;
+            return match;
+          }
+          switch (compareScale) {
+            case 'g':
+              compareValue *= 1073741824;
+              break;
+            case 'm':
+              compareValue *= 1048576;
+              break;
+            case 'k':
+              compareValue *= 1024;
+              break;
+            default:
+              //default value in GB
+              compareValue *= 1073741824;
+          }
+          rowValue = (jQuery(rowValue).text()) ? jQuery(rowValue).text() : rowValue;
+
+          var convertedRowValue;
+          if (rowValue === '<1KB') {
+            convertedRowValue = 1;
+          } else {
+            var rowValueScale = rowValue.substr(rowValue.length - 2, 2);
+            switch (rowValueScale) {
+              case 'KB':
+                convertedRowValue = parseFloat(rowValue)*1024;
+                break;
+              case 'MB':
+                convertedRowValue = parseFloat(rowValue)*1048576;
+                break;
+              case 'GB':
+                convertedRowValue = parseFloat(rowValue)*1073741824;
+                break;
+            }
+          }
+
+          switch (compareChar) {
+            case '<':
+              if (compareValue > convertedRowValue) match = true;
+              break;
+            case '>':
+              if (compareValue < convertedRowValue) match = true;
+              break;
+            case false:
+            case '=':
+              if (compareValue == convertedRowValue) match = true;
+              break;
+          }
+          return match;
+        }
+        break;
+      case 'number':
+        return function(rowValue, rangeExp){
+          var compareChar = rangeExp.charAt(0);
+          var compareValue;
+          var match = false;
+          if (rangeExp.length == 1) {
+            if (isNaN(parseInt(compareChar))) {
+              // User types only '=' or '>' or '<', so don't filter column values
+              match = true;
+              return match;
+            }
+            else {
+              compareValue = parseFloat(parseFloat(rangeExp).toFixed(2));
+            }
+          }
+          else {
+            if (isNaN(parseInt(compareChar))) {
+              compareValue = parseFloat(parseFloat(rangeExp.substr(1, rangeExp.length)).toFixed(2));
+            }
+            else {
+              compareValue = parseFloat(parseFloat(rangeExp.substr(0, rangeExp.length)).toFixed(2));
+            }
+          }
+          rowValue = parseFloat((jQuery(rowValue).text()) ? jQuery(rowValue).text() : rowValue);
+          match = false;
+          switch (compareChar) {
+            case '<':
+              if (compareValue > rowValue) match = true;
+              break;
+            case '>':
+              if (compareValue < rowValue) match = true;
+              break;
+            case '=':
+              if (compareValue == rowValue) match = true;
+              break;
+            default:
+              if (rangeExp == rowValue) match = true;
+          }
+          return match;
+        }
+        break;
+      case 'multiple':
+        return function(origin, compareValue){
+          var options = compareValue.split(',');
+          var rowValue = origin.mapProperty('componentName').join(" ");
+          var str = new RegExp(compareValue, "i");
+          for (var i = 0; i < options.length; i++) {
+            if(!isGlobal) {
+              str = new RegExp('(\\W|^)' + options[i] + '(\\W|$)');
+            }
+            if (rowValue.search(str) !== -1) {
+              return true;
+            }
+          }
+          return false;
+        }
+        break;
+      case 'string':
+      default:
+        return function(origin, compareValue){
+          var regex = new RegExp(compareValue,"i");
+          return regex.test(origin);
+        }
+    }
   }
 };
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/modal_popup.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/modal_popup.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/modal_popup.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/modal_popup.js Wed Mar 20 20:44:43 2013
@@ -80,7 +80,7 @@ App.ModalPopup = Ember.View.extend({
     if(this.autoHeight){
       this._super();
       var block = this.$().find('#modal > .modal-body').first();
-      block.css('max-height', $(window).height()- block.offset().top - 300); // fix popup height
+      block.css('max-height', $(window).height() - block.offset().top - 300 + $(window).scrollTop()); // fix popup height
     }
   },
 

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/sort_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/sort_view.js?rev=1459041&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/sort_view.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/common/sort_view.js Wed Mar 20 20:44:43 2013
@@ -0,0 +1,125 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var misc = require('utils/misc');
+
+/**
+ * Wrapper View for all sort components. Layout template and common actions are located inside of it.
+ * Logic specific for sort fields
+ * located in inner view - <code>fieldView</code>.
+ *
+ * @type {*}
+ */
+var wrapperView = Em.View.extend({
+  tagName: 'tr',
+  /**
+   * sort content by property
+   * @param property
+   * @param order: true - DESC, false - ASC
+   */
+  sort: function(property, order){
+    var content = this.get('content').toArray();
+    var sortFunc = this.getSortFunc(property, order);
+    this.resetSort();
+    content.sort(sortFunc);
+    this.set('content', content);
+  },
+  /**
+   * reset all sorts fields
+   */
+  resetSort: function(){
+    this.get('childViews').setEach('status', 'sorting');
+  },
+  /**
+   * determines sort function depending on the type of sort field
+   * @param property
+   * @param order
+   * @return {*}
+   */
+  getSortFunc: function(property, order){
+    var func;
+    switch (property.get('type')){
+      case 'ip':
+        func = function (a, b) {
+          var a = misc.ipToInt(a.get(property.get('name')));
+          var b = misc.ipToInt(b.get(property.get('name')));
+          if(order){
+            return b - a;
+          } else {
+            return a - b;
+          }
+        };
+        break;
+      default:
+        func = function(a,b){
+          if(order){
+            if (a.get(property.get('name')) > b.get(property.get('name')))
+              return -1;
+            if (a.get(property.get('name')) < b.get(property.get('name')))
+              return 1;
+            return 0;
+          } else {
+            if (a.get(property.get('name')) < b.get(property.get('name')))
+              return -1;
+            if (a.get(property.get('name')) > b.get(property.get('name')))
+              return 1;
+            return 0;
+          }
+        }
+    }
+    return func;
+  }
+});
+/**
+ * particular view that contain sort field properties:
+ * name - name of property in content table
+ * type(optional) - specific type to sort
+ * displayName - label to display
+ * @type {*}
+ */
+var fieldView = Em.View.extend({
+  template:Em.Handlebars.compile('{{view.displayName}}'),
+  classNameBindings: ['status'],
+  tagName: 'th',
+  name: null,
+  displayName: null,
+  status: 'sorting',
+  type: null,
+  /**
+   * callback that run sorting and define order of sorting
+   * @param event
+   */
+  click: function(event){
+    if(this.get('status') === 'sorting_desc'){
+      this.get('parentView').sort(this, false);
+      this.set('status', 'sorting_asc');
+    } else {
+      this.get('parentView').sort(this, true);
+      this.set('status', 'sorting_desc');
+    }
+  }
+});
+
+/**
+ * Result object, which will be accessible outside
+ * @type {Object}
+ */
+module.exports = {
+  wrapperView: wrapperView,
+  fieldView: fieldView
+};
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps/item/dag_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps/item/dag_view.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps/item/dag_view.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps/item/dag_view.js Wed Mar 20 20:44:43 2013
@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+var sort = require('views/common/sort_view');
 
 App.MainAppsItemDagView = Em.View.extend({
   templateName: require('templates/main/apps/item/dag'),
@@ -54,6 +55,10 @@ App.MainAppsItemDagView = Em.View.extend
 
   loaded : false,
 
+  hasManyJobs: function(){
+    return (this.get('content') && this.get('content').length > 1);
+  }.property('content'),
+
   onLoad:function (){
     if(!this.get('controller.content.loadAllJobs') || this.get('loaded')){
       return;
@@ -97,43 +102,44 @@ App.MainAppsItemDagView = Em.View.extend
   },
 
   draw: function(){
-
-    var innerTable = this.$('#innerTable').dataTable({
-      "sDom": 'rt<"page-bar"lip><"clear">',
-      "oLanguage": {
-        "sSearch": "<i class='icon-question-sign'>&nbsp;Search</i>",
-        "sLengthMenu": "Show: _MENU_",
-        "sInfo": "_START_ - _END_ of _TOTAL_",
-        "oPaginate":{
-          "sPrevious": "<i class='icon-arrow-left'></i>",
-          "sNext": "<i class='icon-arrow-right'></i>"
-        }
-      },
-      "iDisplayLength": 5,
-      "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]],
-      "aaSorting": [],
-      "aoColumns":[
-        null,
-        null,
-        null,
-        null,
-        null,
-        { "sType":"ambari-bandwidth" },
-        { "sType":"ambari-bandwidth" },
-        null
-      ]
-    });
-
-    // Hard reset filter settings
-    innerTable.fnSettings().aiDisplay = innerTable.fnSettings().aiDisplayMaster.slice();
-    // Redraw table
-    innerTable.fnDraw(false);
-    innerTable.fnSettings().oFeatures.bFilter = false;
     var dagSchema = this.get('controller.content.workflowContext');
     var jobs = this.get('jobs');
     this.resizeModal();
     var graph = new DagViewer('dag_viewer')
         .setData(dagSchema, jobs)
         .drawDag(this.$().width(), 300, 20);
-  }
+  },
+  sortView: sort.wrapperView,
+  nameSort: sort.fieldView.extend({
+    name:'workflow_entity_name',
+    displayName: Em.I18n.t('apps.item.dag.job')
+  }),
+  idSort: sort.fieldView.extend({
+    name:'id',
+    displayName: Em.I18n.t('apps.item.dag.jobId')
+  }),
+  statusSort: sort.fieldView.extend({
+    name:'status',
+    displayName: Em.I18n.t('apps.item.dag.status')
+  }),
+  mapsSort: sort.fieldView.extend({
+    name:'maps',
+    displayName: Em.I18n.t('apps.item.dag.maps')
+  }),
+  reducesSort: sort.fieldView.extend({
+    name:'reduces',
+    displayName: Em.I18n.t('apps.item.dag.reduces')
+  }),
+  inputSort: sort.fieldView.extend({
+    name:'input',
+    displayName: Em.I18n.t('apps.item.dag.input')
+  }),
+  outputSort: sort.fieldView.extend({
+    name:'output',
+    displayName: Em.I18n.t('apps.item.dag.output')
+  }),
+  durationSort: sort.fieldView.extend({
+    name:'elapsed_time',
+    displayName: Em.I18n.t('apps.item.dag.duration')
+  })
 });

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps_view.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps_view.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/apps_view.js Wed Mar 20 20:44:43 2013
@@ -21,7 +21,9 @@ var filters = require('views/common/filt
 
 App.MainAppsView = Em.View.extend({
   templateName: require('templates/main/apps'),
-
+  paginationInfo: function() {
+    return this.t('apps.filters.paginationInfo').format(this.get('controller.paginationObject.startIndex'), this.get('controller.paginationObject.endIndex'), this.get('controller.paginationObject.iTotalDisplayRecords'));
+  }.property('controller.paginationObject.startIndex', 'controller.paginationObject.endIndex', 'controller.paginationObject.iTotalDisplayRecords'),
   //Pagination left/right buttons css class
   paginationLeft: Ember.View.extend({
     tagName: 'a',
@@ -120,8 +122,8 @@ App.MainAppsView = Em.View.extend({
         this.setControllerObj(this.content.index, "DESC");
         this.set("class", "sorting_desc");
       } else if (this.class == "sorting_desc") {
-        this.setControllerObj("", "");
-        this.set("class", "sorting");
+        this.setControllerObj(this.content.index, "ASC");
+        this.set("class", "sorting_asc");
       }
     },
     resetSortClass: function () {
@@ -284,23 +286,6 @@ App.MainAppsView = Em.View.extend({
   }.observes("controller.filterObject.viewType"),
 
   /**
-   * reset all filters in table
-   *
-   */
-  clearFilters: function (event) {
-    this.set("controller.filterObject.sSearch_0","");
-    this.set("controller.filterObject.sSearch_1","");
-    this.set("controller.filterObject.sSearch_2","");
-    this.set("controller.filterObject.sSearch_3","");
-    this.set("controller.filterObject.runType","Any");
-    this.set("controller.filterObject.jobs","");
-    this.set("controller.filterObject.input","");
-    this.set("controller.filterObject.output","");
-    this.set("controller.filterObject.duration","");
-    this.set("controller.filterObject.runDate","Any");
-  },
-
-  /**
    * This Container View is used to render static table row(appTableRow) and additional dynamic content
    */
   containerRow: Em.ContainerView.extend({
@@ -338,6 +323,17 @@ App.MainAppsView = Em.View.extend({
     templateName: require('templates/main/apps/list_row'),
     classNames: ['app-table-row'],
     tagName: "tr",
+    onLoad: function() {
+      var run = this.get('parentView.run');
+      if (run.index) {
+        var strip = (run.index % 2) ? 'odd' : 'even';
+        this.$().addClass(strip);
+      }
+    }.observes('parentView.run'),
+
+    didInsertElement: function() {
+      this.onLoad();
+    },
     mouseEnter: function (event, view) {
       $(event.currentTarget).addClass("hover")
     },

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard.js Wed Mar 20 20:44:43 2013
@@ -96,7 +96,7 @@ App.MainDashboardView = Em.View.extend({
           var allAlerts = App.router.get('clusterController.alerts');
           var serviceId = this.get('service.serviceName');
           if (serviceId) {
-            return allAlerts.filterProperty('serviceType', serviceId).filterProperty('isOk', false);
+            return allAlerts.filterProperty('serviceType', serviceId).filterProperty('isOk', false).filterProperty('ignoredForServices', false);
           }
           return 0;
         }.property('App.router.clusterController.alerts'),
@@ -105,6 +105,10 @@ App.MainDashboardView = Em.View.extend({
           return this.get('warnAlerts').length;
         }.property('warnAlerts'),
 
+        warnAlertsMessage: function() {
+          return Em.I18n.t('services.alerts.head').format(this.get('warnAlertsCount'));
+        }.property('warnAlertsCount'),
+
         nagiosUrl: function () {
           return App.router.get('clusterController.nagiosUrl');
         }.property('App.router.clusterController.nagiosUrl'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/cpu.js Wed Mar 20 20:44:43 2013
@@ -28,17 +28,12 @@ var App = require('app');
  */
 App.ChartClusterMetricsCPU = App.ChartLinearTimeView.extend({
   id: "cluster-metrics-cpu",
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "?fields=metrics/cpu[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/cluster_metrics/cpu_1hr.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "?fields=metrics/cpu[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/cluster_metrics/cpu_1hr.json",
 
-  title: "CPU Usage",
+  title: Em.I18n.t('dashboard.clusterMetrics.cpu'),
   yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
-  
+  isTimePagingDisable: true,
   transformToSeries: function (jsonData) {
     var seriesArray = [];
     if (jsonData && jsonData.metrics && jsonData.metrics.cpu) {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/load.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/load.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/load.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/load.js Wed Mar 20 20:44:43 2013
@@ -29,16 +29,11 @@ var App = require('app');
  */
 App.ChartClusterMetricsLoad = App.ChartLinearTimeView.extend({
   id: "cluster-metrics-load",
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "?fields=metrics/load[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/cluster_metrics/load_1hr.json"
-    );
-  }.property('clusterName').volatile(),
-
+  sourceUrl: "?fields=metrics/load[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/cluster_metrics/load_1hr.json",
+  isTimePagingDisable: true,
   renderer: 'line',
-  title: "Cluster Load",
+  title: Em.I18n.t('dashboard.clusterMetrics.load'),
   
   transformToSeries: function(jsonData){
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/memory.js Wed Mar 20 20:44:43 2013
@@ -28,15 +28,10 @@ var App = require('app');
  */
 App.ChartClusterMetricsMemory = App.ChartLinearTimeView.extend({
   id: "cluster-metrics-memory",
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "?fields=metrics/memory[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/cluster_metrics/memory_1hr.json"
-    );
-  }.property('clusterName').volatile(),
-
-  title: "Memory Usage",
+  sourceUrl: "?fields=metrics/memory[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/cluster_metrics/memory_1hr.json",
+  isTimePagingDisable: true,
+  title: Em.I18n.t('dashboard.clusterMetrics.memory'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
   transformToSeries: function (jsonData) {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/network.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/network.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/network.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/cluster_metrics/network.js Wed Mar 20 20:44:43 2013
@@ -29,15 +29,10 @@ var App = require('app');
  */
 App.ChartClusterMetricsNetwork = App.ChartLinearTimeView.extend({
   id: "cluster-metrics-network",
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "?fields=metrics/network[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/cluster_metrics/network_1hr.json"
-    );
-  }.property('clusterName').volatile(),
-
-  title: "Network Usage",
+  sourceUrl: "?fields=metrics/network[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/cluster_metrics/network_1hr.json",
+  isTimePagingDisable: true,
+  title: Em.I18n.t('dashboard.clusterMetrics.network'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service.js Wed Mar 20 20:44:43 2013
@@ -92,7 +92,7 @@ App.MainDashboardServiceView = Em.View.e
 
   criticalAlertsCount: function () {
     var alerts = App.router.get('clusterController.alerts');
-    return alerts.filterProperty('serviceType', this.get('service.id')).filterProperty('isOk', false).length;
+    return alerts.filterProperty('serviceType', this.get('service.id')).filterProperty('isOk', false).filterProperty('ignoredForServices', false).length;
   }.property('App.router.clusterController.alerts'),
 
   isCollapsed: false,

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/hdfs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/hdfs.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/hdfs.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/hdfs.js Wed Mar 20 20:44:43 2013
@@ -55,6 +55,10 @@ App.MainDashboardServiceHdfsView = App.M
     return this.formatUnavailable(this.get('service.dfsUnderReplicatedBlocks'));
   }.property('service.dfsUnderReplicatedBlocks'),
 
+  blockErrorsMessage: function() {
+    return Em.I18n.t('dashboard.services.hdfs.blockErrors').format(this.get('dfsCorruptBlocks'), this.get('dfsMissingBlocks'), this.get('dfsUnderReplicatedBlocks'));
+  }.property('dfsCorruptBlocks','dfsMissingBlocks','dfsUnderReplicatedBlocks'),
+
   nodeUptime: function () {
     var uptime = this.get('service').get('nameNodeStartTime');
     if (uptime && uptime > 0){

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/mapreduce.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/mapreduce.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/mapreduce.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/dashboard/service/mapreduce.js Wed Mar 20 20:44:43 2013
@@ -65,7 +65,7 @@ App.MainDashboardServiceMapreduceView = 
     var totalCount = svc.get('taskTrackers').get('length');
     var template = this.t('dashboard.services.mapreduce.trackersSummary');
     return template.format(liveCount, totalCount);
-  }.property('service.aliveTrackers', 'service.taskTrackers'),
+  }.property('service.aliveTrackers.length', 'service.taskTrackers.length'),
 
   trackersHeapSummary: function () {
     var heapUsed = this.get('service').get('jobTrackerHeapUsed') || 0;

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host.js Wed Mar 20 20:44:43 2013
@@ -17,89 +17,136 @@
  */
 
 var App = require('app');
-require('utils/data_table');
 var filters = require('views/common/filter_view');
+var sort = require('views/common/sort_view');
 var date = require('utils/date');
 
 App.MainHostView = Em.View.extend({
   templateName:require('templates/main/host'),
-  controller:function () {
-    return App.router.get('mainHostController');
-  }.property(),
   content:function () {
     return App.router.get('mainHostController.content');
   }.property('App.router.mainHostController.content'),
   oTable: null,
 
   didInsertElement:function () {
-    var oTable = $('#hosts-table').dataTable({
-      "sDom": '<"search-bar"f><"clear">rt<"page-bar"lip><"clear">',
-      "oLanguage": {
-        "sSearch": "Search:",
-        "sLengthMenu": "Show: _MENU_",
-        "sInfo": "_START_ - _END_ of _TOTAL_",
-        "sInfoEmpty": "0 - _END_ of _TOTAL_",
-        "sInfoFiltered": "",
-        "oPaginate":{
-          "sPrevious": "<i class='icon-arrow-left'></i>",
-          "sNext": "<i class='icon-arrow-right'></i>"
-        }
-      },
-      "bSortCellsTop": true,
-      "iDisplayLength": 10,
-      "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
-      "oSearch": {"bSmart":false},
-      "bAutoWidth": false,
-      "aoColumns":[
-        { "bSortable": false },
-        { "sType":"html" },
-        { "sType":"html" },
-        { "sType":"num-html" },
-        { "sType":"ambari-bandwidth" },
-        { "sType":"html" },
-        { "sType":"num-html" },
-        { "sType":"html", "bSortable": false  },
-        { "bVisible": false }, // hidden column for raw public host name value
-        { "bVisible": false } // hidden column for raw components list
-      ],
-      "aaSorting": [[ 1, "asc" ]]
-    });
-    this.set('oTable', oTable);
-    this.set('allComponentsChecked', true); // select all components (checkboxes) on start.
+    this.filter();
+    if (this.get('controller.comeWithAlertsFilter')) {
+      this.set('controller.comeWithAlertsFilter', false);
+      this.set('controller.filteredByAlerts', true);
+    } else {
+      this.set('controller.filteredByAlerts', false);
+    }
   },
 
-  HostView:Em.View.extend({
-    content:null,
+  /**
+   * return pagination information displayed on the hosts page
+   */
+  paginationInfo: function () {
+    return this.t('apps.filters.paginationInfo').format(this.get('startIndex'), this.get('endIndex'), this.get('filteredContent.length'));
+  }.property('displayLength', 'filteredContent.length', 'startIndex', 'endIndex'),
+
+  paginationLeft: Ember.View.extend({
+    tagName: 'a',
+    template: Ember.Handlebars.compile('<i class="icon-arrow-left"></i>'),
+    classNameBindings: ['class'],
+    class: function () {
+      if (this.get("parentView.startIndex") > 1) {
+       return "paginate_previous";
+      }
+      return "paginate_disabled_previous";
+    }.property("parentView.startIndex", 'filteredContent.length'),
 
-    healthToolTip: function(){
-      var hostComponents = this.get('content.hostComponents').filter(function(item){
-        if(item.get('workStatus') !== App.HostComponentStatus.started){
-          return true;
-        }
-      });
-      var output = '';
-      switch (this.get('content.healthClass')){
-        case 'health-status-DEAD':
-          hostComponents = hostComponents.filterProperty('isMaster', true);
-          output = Em.I18n.t('hosts.host.healthStatus.mastersDown');
-          hostComponents.forEach(function(hc, index){
-            output += (index == (hostComponents.length-1)) ? hc.get('displayName') : (hc.get('displayName')+", ");
-          }, this);
-          break;
-        case 'health-status-DEAD-YELLOW':
-          output = Em.I18n.t('hosts.host.healthStatus.heartBeatNotReceived');
-          break;
-        case 'health-status-DEAD-ORANGE':
-          hostComponents = hostComponents.filterProperty('isSlave', true);
-          output = Em.I18n.t('hosts.host.healthStatus.slavesDown');
-          hostComponents.forEach(function(hc, index){
-            output += (index == (hostComponents.length-1)) ? hc.get('displayName') : (hc.get('displayName')+", ");
-          }, this);
-          break;
+    click: function () {
+      this.get('parentView').previousPage();
+    }
+  }),
+
+  paginationRight: Ember.View.extend({
+    tagName: 'a',
+    template: Ember.Handlebars.compile('<i class="icon-arrow-right"></i>'),
+    classNameBindings: ['class'],
+    class: function () {
+      if ((this.get("parentView.endIndex")) < this.get("parentView.filteredContent.length")) {
+       return "paginate_next";
       }
-      return output;
-    }.property('content.healthClass'),
+      return "paginate_disabled_next";
+    }.property("parentView.endIndex", 'filteredContent.length'),
+
+    click: function () {
+      this.get('parentView').nextPage();
+    }
+  }),
+
+  hostPerPageSelectView: Em.Select.extend({
+    content: ['10', '25', '50']
+  }),
+
+  // start index for displayed content on the hosts page
+  startIndex: 1,
+
+  // calculate end index for displayed content on the hosts page
+  endIndex: function () {
+    return Math.min(this.get('filteredContent.length'), this.get('startIndex') + parseInt(this.get('displayLength')) - 1);
+  }.property('startIndex', 'displayLength', 'filteredContent.length'),
+
+  /**
+   * onclick handler for previous page button on the hosts page
+   */
+  previousPage: function () {
+    var result = this.get('startIndex') - parseInt(this.get('displayLength'));
+    if (result  < 2) {
+      result = 1;
+    }
+    this.set('startIndex', result);
+  },
+
+  /**
+   * onclick handler for next page button on the hosts page
+   */
+  nextPage: function () {
+    var result = this.get('startIndex') + parseInt(this.get('displayLength'));
+    if (result - 1 < this.get('filteredContent.length')) {
+      this.set('startIndex', result);
+    }
+  },
+
+  // the number of hosts to show on every page of the hosts page view
+  displayLength: null,
 
+  // calculates default value for startIndex property after applying filter or changing displayLength
+  updatePaging: function () {
+      this.set('startIndex', Math.min(1, this.get('filteredContent.length')));
+  }.observes('displayLength', 'filteredContent.length'),
+
+  sortView: sort.wrapperView,
+  nameSort: sort.fieldView.extend({
+    name:'publicHostName',
+    displayName: Em.I18n.t('common.name')
+  }),
+  ipSort: sort.fieldView.extend({
+    name:'ip',
+    displayName: Em.I18n.t('common.ipAddress'),
+    type: 'ip'
+  }),
+  cpuSort: sort.fieldView.extend({
+    name:'cpu',
+    displayName: Em.I18n.t('common.cpu')
+  }),
+  memorySort: sort.fieldView.extend({
+    name:'memory',
+    displayName: Em.I18n.t('common.ram')
+  }),
+  diskUsageSort: sort.fieldView.extend({
+    name:'diskUsage',
+    displayName: Em.I18n.t('common.diskUsage')
+  }),
+  loadAvgSort: sort.fieldView.extend({
+    name:'loadAvg',
+    displayName: Em.I18n.t('common.loadAvg')
+  }),
+  HostView:Em.View.extend({
+    content:null,
+    tagName: 'tr',
     shortLabels: function() {
       var labels = this.get('content.hostComponents').getEach('displayName');
       var shortLabels = '';
@@ -136,7 +183,7 @@ App.MainHostView = Em.View.extend({
    */
   nameFilterView: filters.createTextView({
     onChangeValue: function(){
-      this.get('parentView').updateFilter(8, this.get('value'));
+      this.get('parentView').updateFilter(1, this.get('value'), 'string');
     }
   }),
 
@@ -146,7 +193,7 @@ App.MainHostView = Em.View.extend({
    */
   ipFilterView: filters.createTextView({
     onChangeValue: function(){
-      this.get('parentView').updateFilter(2, this.get('value'));
+      this.get('parentView').updateFilter(2, this.get('value'), 'string');
     }
   }),
 
@@ -158,7 +205,7 @@ App.MainHostView = Em.View.extend({
     fieldType: 'input-mini',
     fieldId: 'cpu_filter',
     onChangeValue: function(){
-      this.get('parentView').updateFilter(3);
+      this.get('parentView').updateFilter(3, this.get('value'), 'number');
     }
   }),
 
@@ -170,7 +217,7 @@ App.MainHostView = Em.View.extend({
     fieldType: 'input-mini',
     fieldId: 'load_avg_filter',
     onChangeValue: function(){
-      this.get('parentView').updateFilter(5);
+      this.get('parentView').updateFilter(5, this.get('value'), 'number');
     }
   }),
 
@@ -182,7 +229,7 @@ App.MainHostView = Em.View.extend({
     fieldType: 'input-mini',
     fieldId: 'ram_filter',
     onChangeValue: function(){
-      this.get('parentView').updateFilter(4);
+      this.get('parentView').updateFilter(4, this.get('value'), 'ambari-bandwidth');
     }
   }),
 
@@ -254,13 +301,13 @@ App.MainHostView = Em.View.extend({
         var chosenComponents = [];
 
         this.get('masterComponents').filterProperty('checkedForHostFilter', true).forEach(function(item){
-          chosenComponents.push(item.get('displayName'));
+          chosenComponents.push(item.get('id'));
         });
         this.get('slaveComponents').filterProperty('checkedForHostFilter', true).forEach(function(item){
-          chosenComponents.push(item.get('displayName'));
+          chosenComponents.push(item.get('id'));
         });
         this.get('clientComponents').filterProperty('checkedForHostFilter', true).forEach(function(item){
-          chosenComponents.push(item.get('displayName'));
+          chosenComponents.push(item.get('id'));
         });
         this.set('value', chosenComponents.toString());
       },
@@ -275,24 +322,119 @@ App.MainHostView = Em.View.extend({
       }
 
     }),
-    fieldId: 'components_filter',
     onChangeValue: function(){
-      this.get('parentView').updateFilter(9);
+      this.get('parentView').updateFilter(6, this.get('value'), 'multiple');
     }
   }),
 
-  startIndex : function(){
-    return Math.random();
-  }.property(),
+  /**
+   * Filter hosts by hosts with at least one alert
+   */
+  filterByAlerts:function() {
+    if (this.get('controller.filteredByAlerts')) {
+      this.updateFilter(7, '>0', 'number')
+    } else {
+      this.updateFilter(7, '', 'number')
+    }
+  }.observes('controller.filteredByAlerts'),
 
   /**
-   * Apply each filter to dataTable
+   * Apply each filter to host
    *
    * @param iColumn number of column by which filter
    * @param value
    */
-  updateFilter: function(iColumn, value){
-    this.get('oTable').fnFilter(value || '', iColumn);
-  }
+  updateFilter: function(iColumn, value, type){
+    var filterCondition = this.get('filterConditions').findProperty('iColumn', iColumn);
+    if(filterCondition) {
+      filterCondition.value = value;
+    } else {
+      filterCondition = {
+        iColumn: iColumn,
+        value: value,
+        type: type
+      }
+      this.get('filterConditions').push(filterCondition);
+    }
+    this.filter();
+  },
+  /**
+   * associations between host property and column index
+   */
+  colPropAssoc: function(){
+    var associations = [];
+    associations[1] = 'publicHostName';
+    associations[2] = 'ip';
+    associations[3] = 'cpu';
+    associations[4] = 'memoryFormatted';
+    associations[5] = 'loadAvg';
+    associations[6] = 'hostComponents';
+    associations[7] = 'criticalAlertsCount';
+    return associations;
+  }.property(),
+  globalSearchValue:null,
+  /**
+   * filter table by all fields
+   */
+  globalFilter: function(){
+    var content = this.get('content');
+    var searchValue = this.get('globalSearchValue');
+    var result;
+    if(searchValue){
+      result = content.filter(function(host){
+        var match = false;
+        this.get('colPropAssoc').forEach(function(item){
+          var filterFunc = filters.getFilterByType('string', false);
+          if(item === 'hostComponents'){
+            filterFunc = filters.getFilterByType('multiple', true);
+          }
+          if(!match){
+            match = filterFunc(host.get(item), searchValue);
+          }
+        });
+        return match;
+      }, this);
+      this.set('filteredContent', result);
+    } else {
+      this.filter();
+    }
+  }.observes('globalSearchValue', 'content'),
+  /**
+   * contain filter conditions for each column
+   */
+  filterConditions: [],
+  filteredContent: [],
 
+  // contain content to show on the current page of hosts page view
+  pageContent: function () {
+    return this.get('filteredContent').slice(this.get('startIndex') - 1, this.get('endIndex'));
+  }.property('filteredContent.length', 'startIndex', 'endIndex'),
+
+  /**
+   * filter table by filterConditions
+   */
+  filter: function(){
+    var content = this.get('content');
+    var filterConditions = this.get('filterConditions').filterProperty('value');
+    var result;
+    var self = this;
+    var assoc = this.get('colPropAssoc');
+    if(!this.get('globalSearchValue')){
+      if(filterConditions.length){
+        result = content.filter(function(host){
+          var match = true;
+          filterConditions.forEach(function(condition){
+            var filterFunc = filters.getFilterByType(condition.type, false);
+            if(match){
+              match = filterFunc(host.get(assoc[condition.iColumn]), condition.value);
+            }
+          });
+          return match;
+        });
+        this.set('filteredContent', result);
+      } else {
+        this.set('filteredContent', content.toArray());
+      }
+    }
+  }.observes('content')
 });

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/details.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/details.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/details.js Wed Mar 20 20:44:43 2013
@@ -27,36 +27,7 @@ App.MainHostDetailsView = Em.View.extend
   }.property('App.router.mainHostDetailsController.content'),
 
   maintenance: function(){
-    var options = [{action: 'deleteHost', 'label': 'Delete Host'}];
+    var options = [{action: 'deleteHost', 'label': this.t('hosts.host.details.deleteHost')}];
     return options;
-  }.property('controller.content'),
-
-  healthToolTip: function(){
-    var hostComponents = this.get('content.hostComponents').filter(function(item){
-      if(item.get('workStatus') !== App.HostComponentStatus.started){
-        return true;
-      }
-    });
-    var output = '';
-    switch (this.get('content.healthClass')){
-      case 'health-status-DEAD':
-        hostComponents = hostComponents.filterProperty('isMaster', true);
-        output = Em.I18n.t('hosts.host.healthStatus.mastersDown');
-        hostComponents.forEach(function(hc, index){
-          output += (index == (hostComponents.length-1)) ? hc.get('displayName') : (hc.get('displayName')+", ");
-        }, this);
-        break;
-      case 'health-status-DEAD-YELLOW':
-        output = Em.I18n.t('hosts.host.healthStatus.heartBeatNotReceived');
-        break;
-      case 'health-status-DEAD-ORANGE':
-        hostComponents = hostComponents.filterProperty('isSlave', true);
-        output = Em.I18n.t('hosts.host.healthStatus.slavesDown');
-        hostComponents.forEach(function(hc, index){
-          output += (index == (hostComponents.length-1)) ? hc.get('displayName') : (hc.get('displayName')+", ");
-        }, this);
-        break;
-    }
-    return output;
-  }.property('content.healthClass')
+  }.property('controller.content')
 });

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/cpu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/cpu.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/cpu.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/cpu.js Wed Mar 20 20:44:43 2013
@@ -28,19 +28,11 @@ var App = require('app');
  */
 App.ChartHostMetricsCPU = App.ChartLinearTimeView.extend({
   id: "host-metrics-cpu",
-  title: "CPU Usage",
+  title: Em.I18n.t('hosts.host.metrics.cpu'),
   yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
 
-
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_wio[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_nice[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_aidle[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_system[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_idle[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/cpu.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_wio[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_nice[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_aidle[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_system[{fromSeconds},{toSeconds},{stepSeconds}],metrics/cpu/cpu_idle[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/cpu.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/disk.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/disk.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/disk.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/disk.js Wed Mar 20 20:44:43 2013
@@ -28,18 +28,11 @@ var App = require('app');
  */
 App.ChartHostMetricsDisk = App.ChartLinearTimeView.extend({
   id: "host-metrics-disk",
-  title: "Disk Usage",
+  title: Em.I18n.t('hosts.host.metrics.disk'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/disk.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/disk/disk_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/disk/disk_free[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/disk.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/load.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/load.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/load.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/load.js Wed Mar 20 20:44:43 2013
@@ -28,17 +28,10 @@ var App = require('app');
  */
 App.ChartHostMetricsLoad = App.ChartLinearTimeView.extend({
   id: "host-metrics-load",
-  title: "Load",
+  title: Em.I18n.t('hosts.host.metrics.load'),
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/load/load_fifteen[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_one[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_five[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/load.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/load/load_fifteen[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_one[{fromSeconds},{toSeconds},{stepSeconds}],metrics/load/load_five[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/load.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/memory.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/memory.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/memory.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/memory.js Wed Mar 20 20:44:43 2013
@@ -28,19 +28,11 @@ var App = require('app');
  */
 App.ChartHostMetricsMemory = App.ChartLinearTimeView.extend({
   id: "host-metrics-memory",
-  title: "Memory Usage",
+  title: Em.I18n.t('hosts.host.metrics.memory'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/memory/swap_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_shared[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_cached[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_buffers[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        clusterName: this.get('clusterName'),
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/memory.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/memory/swap_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_shared[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_free[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_cached[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/mem_buffers[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/memory.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/network.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/network.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/network.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/network.js Wed Mar 20 20:44:43 2013
@@ -28,18 +28,11 @@ var App = require('app');
  */
 App.ChartHostMetricsNetwork = App.ChartLinearTimeView.extend({
   id: "host-metrics-network",
-  title: "Network Usage",
+  title: Em.I18n.t('hosts.host.metrics.network'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/network/bytes_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/bytes_out[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_out[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/network.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/network/bytes_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/bytes_out[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_in[{fromSeconds},{toSeconds},{stepSeconds}],metrics/network/pkts_out[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/network.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/processes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/processes.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/processes.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/host/metrics/processes.js Wed Mar 20 20:44:43 2013
@@ -28,17 +28,10 @@ var App = require('app');
  */
 App.ChartHostMetricsProcesses = App.ChartLinearTimeView.extend({
   id: "host-metrics-processes",
-  title: "Processes",
+  title: Em.I18n.t('hosts.host.metrics.processes'),
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}?fields=metrics/process/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/process/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: this.get('content').get('hostName')
-      },
-      "/data/hosts/metrics/processes.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{hostName}?fields=metrics/process/proc_total[{fromSeconds},{toSeconds},{stepSeconds}],metrics/process/proc_run[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/hosts/metrics/processes.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/menu.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/menu.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/menu.js Wed Mar 20 20:44:43 2013
@@ -27,14 +27,14 @@ App.MainMenuView = Em.CollectionView.ext
   classNames:['nav'],
   content:function(){
     var result = [
-      { label:'Dashboard', routing:'dashboard', active:'active'},
-      { label:'Heatmaps', routing:'charts'},
-      { label:'Services', routing:'services'},
-      { label:'Hosts', routing:'hosts'},
-      { label:'Jobs', routing:'apps'}
+      { label:Em.I18n.t('menu.item.dashboard'), routing:'dashboard', active:'active'},
+      { label:Em.I18n.t('menu.item.heatmaps'), routing:'charts'},
+      { label:Em.I18n.t('menu.item.services'), routing:'services'},
+      { label:Em.I18n.t('menu.item.hosts'), routing:'hosts'},
+      { label:Em.I18n.t('menu.item.jobs'), routing:'apps'}
 
     ];
-      if(App.db.getUser().admin) result.push({ label:'Admin', routing:'admin'});
+      if(App.db.getUser().admin) result.push({ label:Em.I18n.t('menu.item.admin'), routing:'admin'});
     return result;
   }.property(),
     /**
@@ -67,18 +67,10 @@ App.MainMenuView = Em.CollectionView.ext
     active:'',
 
     alertsCount:function () {
-      if (this.get('content').routing == 'dashboard') {
-        return App.router.get('mainDashboardController.alertsCount');
+      if (this.get('content').routing == 'hosts') {
+        return App.router.get('mainHostController.alerts').length;
       }
-    }.property(),
-
-//    hostDetailsOperationsCount:function () {
-//      if (this.get('content').routing == 'hosts') {
-//        if (App.router.currentState.parentState.name == 'hostDetails') {
-//          return App.router.get('mainHostDetailsController.hostOperationsCount');
-//        }
-//      }
-//    }.property('App.router.currentState.parentState.name', 'App.router.mainHostDetailsController.hostOperationsCount'),
+    }.property('App.router.mainHostController.alerts.length'),
 
     templateName: require('templates/main/menu_item')
   })

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/menu.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/menu.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/menu.js Wed Mar 20 20:44:43 2013
@@ -23,10 +23,10 @@ App.MainServiceInfoMenuView = Em.Collect
   classNames: ["nav", "nav-tabs"],
   content:function(){
     var menuItems = [
-      { label:'Summary', routing:'summary', active:"active"}
+      { label: Em.I18n.t('services.service.info.menu.summary'), routing:'summary', active:"active"}
       //{ label:'Audit', routing:'audit'}
     ];
-    if(this.get('configTab')) menuItems.push({ label:'Configs', routing:'configs'});
+    if(this.get('configTab')) menuItems.push({ label: Em.I18n.t('services.service.info.menu.configs'), routing:'configs'});
     return menuItems;
   }.property(),
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/cluster_requests.js Wed Mar 20 20:44:43 2013
@@ -28,15 +28,9 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_ClusterRequests = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-cluster-requests",
-  title: "Cluster Requests",
-
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/cluster_requests.json"
-    );
-  }.property('clusterName').volatile(),
+  title: Em.I18n.t('services.service.info.metrics.hbase.clusterRequests'),
+  sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/cluster_requests.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_size.js Wed Mar 20 20:44:43 2013
@@ -28,16 +28,11 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_HlogSplitSize = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-hlog-split-size",
-  title: "HLog Split Size",
+  title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitSize'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
 
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitSize_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/hlog_split_size.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitSize_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/hlog_split_size.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/hlog_split_time.js Wed Mar 20 20:44:43 2013
@@ -28,16 +28,11 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_HlogSplitTime = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-hlog-split-time",
-  title: "HLog Split Time",
+  title: Em.I18n.t('services.service.info.metrics.hbase.hlogSplitTime'),
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/hlog_split_time.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/splitTime_avg_time[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/hlog_split_time.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_queuesize.js Wed Mar 20 20:44:43 2013
@@ -28,15 +28,10 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_RegionServerQueueSize = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-regionserver-queuesize",
-  title: "RegionServer Queue Size",
+  title: Em.I18n.t('services.service.info.metrics.hbase.regionServerQueueSize'),
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/flushQueueSize[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/compactionQueueSize[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/regionserver_queuesize.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/flushQueueSize[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/compactionQueueSize[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/regionserver_queuesize.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_regions.js Wed Mar 20 20:44:43 2013
@@ -28,15 +28,10 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_RegionServerRegions = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-regionserver-regions",
-  title: "RegionServer Regions",
+  title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRegions'),
 
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/regions[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/regionserver_regions.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/regions[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/regionserver_regions.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hbase/regionserver_rw_requests.js Wed Mar 20 20:44:43 2013
@@ -28,15 +28,10 @@ var App = require('app');
  */
 App.ChartServiceMetricsHBASE_RegionServerReadWriteRequests = App.ChartLinearTimeView.extend({
   id: "service-metrics-hbase-regionserver-rw-requests",
-  title: "RegionServer Requests",
+  title: Em.I18n.t('services.service.info.metrics.hbase.regionServerRequests'),
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/readRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/writeRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hbase/regionserver_rw_requests.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HBASE/components/HBASE_REGIONSERVER?fields=metrics/hbase/regionserver/readRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}],metrics/hbase/regionserver/writeRequestsCount[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hbase/regionserver_rw_requests.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/block_status.js Wed Mar 20 20:44:43 2013
@@ -28,19 +28,10 @@ var App = require('app');
  */
 App.ChartServiceMetricsHDFS_BlockStatus = App.ChartLinearTimeView.extend({
   id: "service-metrics-hdfs-block-status",
-  title: "Block Status",
+  title: Em.I18n.t('services.service.info.metrics.hdfs.blockStatus'),
   renderer: 'line',
-  url: function () {
-    var hdfsService = App.HDFSService.find().objectAt(0);
-    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: nameNodeHostName
-      },
-      "/data/services/metrics/hdfs/block_status.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/FSNamesystem/PendingReplicationBlocks[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/FSNamesystem/UnderReplicatedBlocks[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl:"/data/services/metrics/hdfs/block_status.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/file_operations.js Wed Mar 20 20:44:43 2013
@@ -28,19 +28,10 @@ var App = require('app');
  */
 App.ChartServiceMetricsHDFS_FileOperations = App.ChartLinearTimeView.extend({
   id: "service-metrics-hdfs-file-operations",
-  title: "File Operations",
+  title: Em.I18n.t('services.service.info.metrics.hdfs.fileOperations'),
   renderer: 'line',
-  url: function () {
-    var hdfsService = App.HDFSService.find().objectAt(0);
-    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}/host_components/NAMENODE?fields=metrics/dfs/namenode/FileInfoOps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/namenode/CreateFileOps[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: nameNodeHostName
-      },
-      "/data/services/metrics/hdfs/file_operations.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/dfs/namenode/FileInfoOps[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/namenode/CreateFileOps[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hdfs/file_operations.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/gc.js Wed Mar 20 20:44:43 2013
@@ -28,20 +28,11 @@ var App = require('app');
  */
 App.ChartServiceMetricsHDFS_GC = App.ChartLinearTimeView.extend({
   id: "service-metrics-hdfs-gc",
-  title: "Garbage Collection",
+  title: Em.I18n.t('services.service.info.metrics.hdfs.gc'),
   yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
 
-  url: function () {
-    var hdfsService = App.HDFSService.find().objectAt(0);
-    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}/host_components/NAMENODE?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: nameNodeHostName
-      },
-      "/data/services/metrics/hdfs/gc.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hdfs/gc.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/io.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/io.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/io.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/io.js Wed Mar 20 20:44:43 2013
@@ -28,16 +28,11 @@ var App = require('app');
  */
 App.ChartServiceMetricsHDFS_IO = App.ChartLinearTimeView.extend({
   id: "service-metrics-hdfs-io",
-  title: "HDFS I/O",
+  title: Em.I18n.t('services.service.info.metrics.hdfs.io'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
-  url: function () {
-    return App.formatUrl(
-      this.get('urlPrefix') + "/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/bytes_written[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/datanode/bytes_read[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {},
-      "/data/services/metrics/hdfs/io.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl: "/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/bytes_written[{fromSeconds},{toSeconds},{stepSeconds}],metrics/dfs/datanode/bytes_read[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hdfs/io.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js?rev=1459041&r1=1459040&r2=1459041&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/views/main/service/info/metrics/hdfs/jvm_heap.js Wed Mar 20 20:44:43 2013
@@ -28,20 +28,11 @@ var App = require('app');
  */
 App.ChartServiceMetricsHDFS_JVMHeap = App.ChartLinearTimeView.extend({
   id: "service-metrics-hdfs-jvm-heap",
-  title: "JVM Memory Status",
+  title: Em.I18n.t('services.service.info.metrics.hdfs.jvmHeap'),
   yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
   renderer: 'line',
-  url: function () {
-    var hdfsService = App.HDFSService.find().objectAt(0);
-    var nameNodeHostName = hdfsService.get('nameNode').get('hostName');
-    return App.formatUrl(
-      this.get('urlPrefix') + "/hosts/{hostName}/host_components/NAMENODE?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
-      {
-        hostName: nameNodeHostName
-      },
-      "/data/services/metrics/hdfs/jvm_heap.json"
-    );
-  }.property('clusterName').volatile(),
+  sourceUrl:"/hosts/{nameNodeName}/host_components/NAMENODE?fields=metrics/jvm/memNonHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memNonHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}],metrics/jvm/memHeapCommittedM[{fromSeconds},{toSeconds},{stepSeconds}]",
+  mockUrl: "/data/services/metrics/hdfs/jvm_heap.json",
 
   transformToSeries: function (jsonData) {
     var seriesArray = [];