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 2012/12/09 15:00:38 UTC

svn commit: r1418960 [6/6] - in /incubator/ambari/branches/AMBARI-666/ambari-web/app: ./ assets/data/apps/jobs/ assets/data/dashboard/mapreduce/ assets/data/hosts/ controllers/ controllers/main/admin/ controllers/main/charts/heatmap_metrics/ controller...

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/graph.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/graph.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/graph.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/graph.js Sun Dec  9 14:00:34 2012
@@ -18,11 +18,13 @@
 
 
 module.exports = {
-  drawJobTimeLine:function (json_str, w, h, element, legend_id, timeline_id) {
-    var json = $.parseJSON(json_str);
-    console.log('json', json);
-    if (!json) {
-      return new Error("unable to load data");
+  drawJobTimeLine:function (map, shuffle, reduce, w, h, element, legend_id, timeline_id) {
+    var map = $.parseJSON(map);
+    var shuffle = $.parseJSON(shuffle);
+    var reduce = $.parseJSON(reduce);
+    if (!map || !shuffle || !reduce) {
+      console.warn('drawJobTimeLine');
+      return;
     }
 
     var graph = new Rickshaw.Graph({
@@ -33,17 +35,17 @@ module.exports = {
       stroke:true,
       series:[
         {
-          data:json[0],
+          data:map,
           color:'green',
           name:'maps'
         },
         {
-          data:json[1],
+          data:shuffle,
           color:'lightblue',
           name:'shuffles'
         },
         {
-          data:json[2],
+          data:reduce,
           color:'steelblue',
           name:'reduces'
         }
@@ -97,10 +99,15 @@ module.exports = {
       element:document.getElementById(timeline_id)
     });
   },
-  drawJobTasks:function (json_str, w, h, element, legend_id, timeline_id) {
-    var json = $.parseJSON(json_str);
-    if (!json) {
-      return new Error("unable to load data");
+  drawJobTasks:function (mapNodeLocal, mapRackLocal, mapOffSwitch, reduceOffSwitch, w, h, element, legend_id, timeline_id) {
+    var mapNodeLocal = $.parseJSON(mapNodeLocal);
+    var mapRackLocal = $.parseJSON(mapRackLocal);
+    var mapOffSwitch = $.parseJSON(mapOffSwitch);
+    var reduceOffSwitch = $.parseJSON(reduceOffSwitch);
+    console.log(mapNodeLocal, mapRackLocal, mapOffSwitch, reduceOffSwitch);
+    if (!mapNodeLocal || !mapRackLocal || !mapOffSwitch || !reduceOffSwitch) {
+      console.warn('drawJobTasks');
+      return;
     }
 
     var graph = new Rickshaw.Graph({
@@ -111,22 +118,22 @@ module.exports = {
       stroke:true,
       series:[
         {
-          data:json[0],
+          data:mapNodeLocal,
           color:'green',
           name:'node_local_map'
         },
         {
-          data:json[1],
+          data:mapRackLocal,
           color:'lightblue',
           name:'rack_local_map'
         },
         {
-          data:json[2],
+          data:mapOffSwitch,
           color:'brown',
           name:'off_switch_map'
         },
         {
-          data:json[3],
+          data:reduceOffSwitch,
           color:'red',
           name:'reduce'
         }
@@ -157,20 +164,20 @@ module.exports = {
 
     var xAxis = new Rickshaw.Graph.Axis.Time({
       graph:graph,
-      ticksTreatment:ticksTreatment,
+      ticksTreatment:ticksTreatment
     });
     xAxis.render();
 
     var yAxis = new Rickshaw.Graph.Axis.Y({
       graph:graph,
-      ticksTreatment:ticksTreatment,
+      ticksTreatment:ticksTreatment
     });
     yAxis.render();
 
     var hoverDetail = new Rickshaw.Graph.HoverDetail({
       graph:graph,
       xFormatter:function (x) {
-        return (x - json[4].submitTime) / 1000 + 's'
+        return (x - json.submitTime) + 's'
       },
       yFormatter:function (y) {
         return y / 1000 + 's'
@@ -186,7 +193,6 @@ module.exports = {
       graph:graph,
       element:document.getElementById(timeline_id)
     });
-    annotator.add(1337970759432, 'Lost tasktracker');
     graph.update();
   }
 }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/utils/helper.js Sun Dec  9 14:00:34 2012
@@ -25,7 +25,7 @@ String.prototype.capitalize = function (
 }
 
 Em.CoreObject.reopen({
-  t: function (key, attrs) {
+  t:function (key, attrs) {
     return Em.I18n.t(key, attrs)
   }
 });
@@ -38,6 +38,27 @@ Handlebars.registerHelper('warn', functi
   console.warn(variable);
 });
 
+Handlebars.registerHelper('highlight', function (variable, words) {
+  words = words.split(";");
+
+//  var self = this;
+//  if (highlightTemplate == undefined) {
+  var highlightTemplate = "<b>{0}</b>";
+//  }
+
+  words.forEach(function (word) {
+    var searchRegExp = new RegExp("\\b" + word + "\\b", "gi");
+    variable = variable.replace(searchRegExp, function (found) {
+      return highlightTemplate.format(found);
+    });
+  });
+
+  return new Handlebars.SafeString(variable);
+})
+/**
+ * Replace {i} with argument. where i is number of argument to replace with
+ * @return {String}
+ */
 String.prototype.format = function () {
   var args = arguments;
   return this.replace(/{(\d+)}/g, function (match, number) {
@@ -45,6 +66,22 @@ String.prototype.format = function () {
   });
 };
 
+String.prototype.highlight = function (words, highlightTemplate) {
+  var self = this;
+  if (highlightTemplate == undefined) {
+    var highlightTemplate = "<b>{0}</b>";
+  }
+
+  words.forEach(function (word) {
+    var searchRegExp = new RegExp("\\b" + word + "\\b", "gi");
+    self = self.replace(searchRegExp, function (found) {
+      return highlightTemplate.format(found);
+    });
+  });
+
+  return self;
+};
+
 /**
  * Convert byte size to other metrics.
  * @param {Number} precision  Number to adjust precision of return value. Default is 0.
@@ -120,10 +157,10 @@ App.formatUrl = function (urlTemplate, s
     if (!App.testMode) {
       var toSeconds = Math.round(new Date().getTime() / 1000);
       var allSubstitutes = {
-        toSeconds: toSeconds,
-        fromSeconds: toSeconds - 3600, // 1 hour back
-        stepSeconds: 15, // 15 seconds
-        hostName: App.test_hostname
+        toSeconds:toSeconds,
+        fromSeconds:toSeconds - 3600, // 1 hour back
+        stepSeconds:15, // 15 seconds
+        hostName:App.test_hostname
       };
       jQuery.extend(allSubstitutes, substitutes);
       for (key in allSubstitutes) {
@@ -141,15 +178,15 @@ App.formatUrl = function (urlTemplate, s
  * Certain variables can have JSON in string
  * format, or in JSON format itself.
  */
-App.parseJSON = function(value){
-  if(typeof value == "string"){
+App.parseJSON = function (value) {
+  if (typeof value == "string") {
     return jQuery.parseJSON(value);
   }
   return value;
 };
 
 App.format = {
-  role: function (role) {
+  role:function (role) {
     switch (role) {
       case 'ZOOKEEPER_SERVER':
         return 'ZooKeeper Server';
@@ -255,7 +292,7 @@ App.format = {
    * TIMEDOUT - Host did not respond in time
    * ABORTED - Operation was abandoned
    */
-  taskStatus: function (_taskStatus) {
+  taskStatus:function (_taskStatus) {
     return _taskStatus.replace('_', ' ').toLowerCase();
   }
 };
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main.js Sun Dec  9 14:00:34 2012
@@ -20,32 +20,52 @@
 var App = require('app');
 
 App.MainView = Em.View.extend({
-  templateName: require('templates/main')
+  templateName:require('templates/main')
 });
 
 App.MainBackgroundOperation = Em.View.extend({
-  content: null,
-  classNames: ['background-operations'],
-  classNameBindings: ['isOpen'],
-  isOpen: false,
-  logDetails: null,
-  isOpenShowLog: false,
-  iconClass: function(){
+  content:null,
+  classNames:['background-operations'],
+  classNameBindings:['isOpen'],
+  isOpen:false,
+  iconClass:function () {
     return this.get('isOpen') ? 'icon-minus' : 'icon-plus';
   }.property('isOpen'),
-  openDetails: function(){
+  showOperationLog:function () {
     this.set('isOpen', !this.get('isOpen'))
-  },
-  showOperationLog:function(){
     var operation = this.get('content');
     var self = this;
     if (!this.get('isOpenShowLog') && !this.get('logDetails')) {
-      jQuery.getJSON('data/hosts/background_operations/logs/task' +operation.taskId + '.json',
+
+      jQuery.getJSON('data/hosts/background_operations/logs/task' + operation.taskId + '.json',
         function (data) {
+          var fields = ['stdout', 'stderror'];
+          if (data) {
+            fields.forEach(function (fieldName) {
+              if (data.fieldName) {
+                data.fieldName = data.fieldName.highlight(["fail", "err"]);
+              }
+            });
+          }
+
+          if (App.testMode) {
+            var stdError = "Donec quis error tincidunt dolor. word Proin vel fail dignissim metus. In hac err habitasse platea dictumst. Err Mauris error tortor dui, commodo vitae failure placerat ut, venenatis nec err dolor. failure Lorem ipsum dolor sit amet, fail err consectetur fail adipiscing elit. Error Vivamus vel velit ipsum, id laoreet velit. Nullam vel err augue a tortor mattis semper fail, in nec neque.";
+            stdError = stdError.highlight(["err", "fail"]);
+            data.stderror = stdError;
+          }
+
           self.set('logDetails', data);
         }
       );
     }
-    this.set('isOpenShowLog', !this.get('isOpenShowLog'))
+
+    if (App.testMode) {
+      var stdError = "Donec quis error tincidunt dolor. word Proin vel fail dignissim metus. In hac err habitasse platea dictumst. Err Mauris error tortor dui, commodo vitae failure placerat ut, venenatis nec err dolor. failure Lorem ipsum dolor sit amet, fail err consectetur fail adipiscing elit. Error Vivamus vel velit ipsum, id laoreet velit. Nullam vel err augue a tortor mattis semper fail, in nec neque.";
+      stdError = stdError.highlight(["err", "fail"]);
+      var data = {stderror:stdError};
+      self.set('logDetails', data);
+    }
+
+    this.set('isOpenShowLog', !this.get('isOpenShowLog'));
   }
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/create.js Sun Dec  9 14:00:34 2012
@@ -26,20 +26,20 @@ App.MainAdminUserCreateView = Em.View.ex
     var form = this.get("userForm");
     if(form.isValid()) {
       if(form.getValues().admin === "" || form.getValues().admin == true) {
-        form.getField("roles").set("value","admin");
+        form.getField("roles").set("value","admin,user");
         form.getField("admin").set("value","true");
       } else{
         form.getField("roles").set("value","user");
       }
 
-      parent_controller.sendCommandToServer('users/' + form.getValues().userName, "POST" , {
+      parent_controller.sendCommandToServer('/users/' + form.getValues().userName, "POST" , {
         Users: {
           password: form.getValues().password,
           roles: form.getValues().roles
         }
-      }, function (requestId) {
+      }, function (success) {
 
-        if (!requestId) {
+        if (!success) {
           return;
         }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/admin/user/edit.js Sun Dec  9 14:00:34 2012
@@ -27,7 +27,7 @@ App.MainAdminUserEditView = Em.View.exte
     if(form.isValid()) {
       var Users={};
       if(form.getValues().admin === "" || form.getValues().admin == true) {
-        form.getField("roles").set("value","admin");
+        form.getField("roles").set("value","admin,user");
         form.getField("admin").set("value","true");
       } else{
         form.getField("roles").set("value","user");
@@ -40,11 +40,11 @@ App.MainAdminUserEditView = Em.View.exte
         Users.old_password=form.getValues().old_password;
       }
 
-      parent_controller.sendCommandToServer('users/' + form.getValues().userName, "PUT" , {
+      parent_controller.sendCommandToServer('/users/' + form.getValues().userName, "PUT" , {
        Users:Users
-      }, function (requestId) {
+      }, function (success) {
 
-        if (!requestId) {
+        if (!success) {
           return;
         }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/bar_view.js Sun Dec  9 14:00:34 2012
@@ -63,31 +63,47 @@ App.MainAppsItemBarView = Em.View.extend
 
   }.observes('activeJob'),
 
-  jobTimeLine:false,
-  jobTaskView:false,
+  map:false,
+  shuffle:false,
+  reduce:false,
+
+  mapNodeLocal:false,
+  mapRackLocal:false,
+  mapOffSwitch:false,
+  reduceOffSwitch:false,
+  submitTime:false,
+  finishTime:false,
 
   updateTimeLine:function () {
-    var url = App.testMode ? '/data/apps/jobs/timeline.json' : "urlTBD" + this.get('activeJob').get('jobName');
+    var url = App.testMode ? '/data/apps/jobs/timeline.json' : App.apiPrefix + "/jobhistory/task?jobId=" + this.get('activeJob').get('id') + 
+      "&width=" + this.get('width');
     var mapper = App.jobTimeLineMapper;
     mapper.set('model', this);
     App.HttpClient.get(url, mapper);
   }.observes('getChartData'),
 
   updateTasksView:function () {
-    var url = App.testMode ? '/data/apps/jobs/taskview.json' : "urlTBD" + this.get('activeJob').get('jobName');
+    var url = App.testMode ? '/data/apps/jobs/taskview.json' : App.apiPrefix + "/jobhistory/tasklocality?jobId=" + this.get('activeJob').get('id');
     var mapper = App.jobTasksMapper;
     mapper.set('model', this);
     App.HttpClient.get(url, mapper);
   }.observes('getChartData'),
 
   drawJobTimeline:function () {
-    var timeline = JSON.stringify(this.get('jobTimeLine'));
-    graph.drawJobTimeLine(timeline, this.get('width'), this.get('height'), '#chart', 'legend', 'timeline1');
-  }.observes('jobTimeLine'),
+    var map = JSON.stringify(this.get('map'));
+    var shuffle = JSON.stringify(this.get('shuffle'));
+    var reduce = JSON.stringify(this.get('reduce'));
+    $('#chart, #legend, #timeline1').html('');
+    graph.drawJobTimeLine(map, shuffle, reduce, this.get('width'), this.get('height'), '#chart', 'legend', 'timeline1');
+  }.observes('map', 'shuffle', 'reduce'),
 
   drawJobTasks:function () {
-    var taskview = JSON.stringify(this.get('jobTaskView'));
-    graph.drawJobTasks(taskview, this.get('width'), this.get('height'), '#job_tasks', 'tasks_legend', 'timeline2');
-  }.observes('jobTaskView')
+    var mapNodeLocal = JSON.stringify(this.get('mapNodeLocal'));
+    var mapRackLocal = JSON.stringify(this.get('mapRackLocal'));
+    var mapOffSwitch = JSON.stringify(this.get('mapOffSwitch'));
+    var reduceOffSwitch = JSON.stringify(this.get('reduceOffSwitch'));
+    $('#job_tasks, #tasks_legend, #timeline2').html('');
+    graph.drawJobTasks(mapNodeLocal, mapRackLocal, mapOffSwitch, reduceOffSwitch, this.get('width'), this.get('height'), '#job_tasks', 'tasks_legend', 'timeline2');
+  }.observes('mapNodeLocal', 'mapRackLocal', 'mapOffSwitch', 'reduceOffSwitch')
 
-});
\ No newline at end of file
+});

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/dag_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/dag_view.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/dag_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/apps/item/dag_view.js Sun Dec  9 14:00:34 2012
@@ -98,8 +98,6 @@ App.MainAppsItemDagView = Em.View.extend
     // Redraw table
     innerTable.fnDraw(false);
     innerTable.fnSettings().oFeatures.bFilter = false;
-
-    console.log(innerTable.fnSettings());
     var dagSchema = this.get('controller.content.workflowContext');
     var jobs = this.get('jobs');
     var graph = new DagViewer(false, 'dag_viewer')

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host.js Sun Dec  9 14:00:34 2012
@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+require('utils/data_table');
 
 App.MainHostView = Em.View.extend({
   templateName:require('templates/main/host'),
@@ -28,7 +29,7 @@ App.MainHostView = Em.View.extend({
     return App.router.get('mainHostController.content');
   }.property('App.router.mainHostController.content'),
   componentsIds:[1, 2, 3, 4, 5, 6, 7, 8],
-
+  oTable: null,
   isFilterOpen:false,
 
 //  isApplyDisabled:function () {
@@ -68,6 +69,33 @@ App.MainHostView = Em.View.extend({
   }.observes('slaveComponentsChecked'),
 
   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_ (_TOTAL_ total)",
+        "sInfoEmpty": "0 - _END_ of _TOTAL_ (_TOTAL_ 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"]],
+      "aoColumns":[
+        { "sType":"html" },
+        { "sType":"html" },
+        { "sType":"num-html" },
+        { "sType":"ambari-bandwidth" },
+        { "sType":"string" },
+        { "sType":"string" },
+        { "sType":"string", "bSortable": false  }
+      ]
+    });
+    this.set('oTable', oTable);
     this.set('allComponentsChecked', true); // select all components (checkboxes) on start.
   },
 
@@ -111,7 +139,8 @@ App.MainHostView = Em.View.extend({
     }.property('content.components.@each'),
 
     usageStyle:function () {
-      return "width:" + this.get('content.diskUsage') + "%";
+      //return "width:" + this.get('content.diskUsage') + "%";
+      return "width:" + (25+Math.random()*50) + "%"; // Just for tests purposes
     }.property('content.diskUsage')
 
 //    HostCheckboxView:Em.Checkbox.extend({
@@ -152,5 +181,101 @@ App.MainHostView = Em.View.extend({
     var selectedHostsIds = App.router.get('mainHostController.selectedHostsIds');
     var rack = App.router.get('mainHostController.selectedRack');
     return (selectedHostsIds.length && rack && rack.constructor == 'App.Cluster') ? false : "disabled";
-  }.property('App.router.mainHostController.selectedHostsIds', 'App.router.mainHostController.selectedRack')
+  }.property('App.router.mainHostController.selectedHostsIds', 'App.router.mainHostController.selectedRack'),
+
+  nameFilterView: Em.TextField.extend({
+    classNames:['input-medium'],
+    type:'text',
+    placeholder: 'Any Name',
+    filtering:function(){
+      if (this.get('value') == '') {
+        this.$().closest('th').addClass('notActive');
+      }
+      else {
+        this.$().closest('th').removeClass('notActive');
+      }
+      this.get('parentView').get('applyFilter')(this.get('parentView'), 0, this.get('value'));
+    }.observes('value')
+  }),
+
+  rackFilterView: Em.TextField.extend({
+    classNames:['input-medium'],
+    type:'text',
+    placeholder: 'Any Name',
+    filtering:function(){
+      if (this.get('value') == '') {
+        this.$().closest('th').addClass('notActive');
+      }
+      else {
+        this.$().closest('th').removeClass('notActive');
+      }
+      this.get('parentView').get('applyFilter')(this.get('parentView'), 1, this.get('value'));
+    }.observes('value')
+  }),
+  /**
+   * Filter-field for cpu
+   */
+  cpuFilterView: Em.TextField.extend({
+    classNames:['input-mini'],
+    type:'text',
+    placeholder: 'Any ',
+    elementId:'cpu_filter',
+    filtering:function(){
+      if (this.get('value') == '') {
+        this.$().closest('th').addClass('notActive');
+      }
+      else {
+        this.$().closest('th').removeClass('notActive');
+      }
+      this.get('parentView').get('applyFilter')(this.get('parentView'), 2);
+    }.observes('value')
+  }),
+  /**
+   * Filter-field for RAM
+   */
+  ramFilterView: Em.TextField.extend({
+    classNames:['input-mini'],
+    type:'text',
+    placeholder: 'Any ',
+    elementId: 'ram_filter',
+    filtering:function(){
+      if (this.get('value') == '') {
+        this.$().closest('th').addClass('notActive');
+      }
+      else {
+        this.$().closest('th').removeClass('notActive');
+      }
+      this.get('parentView').get('applyFilter')(this.get('parentView'), 3);
+    }.observes('value')
+  }),
+  /**
+   * Clear selected filter
+   * @param event
+   */
+  clearFilterButtonClick: function(event) {
+    var viewName = event.target.id.replace('view_', '');
+    var elementId = this.get(viewName).get('elementId');
+    if(this.get(viewName).get('tagName') === 'input') {
+      this.get(viewName).set('value', '');
+    }
+    if(this.get(viewName).get('tagName') === 'select') {
+      this.get(viewName).set('value', 'Any');
+      this.get(viewName).change();
+    }
+    if(this.get(viewName).get('multiple')) {
+      this.get(viewName).get('clearFilter')(this.get(viewName));
+    }
+  },
+  /**
+   * apply each filter to dataTable
+   *
+   * @param {parentView}
+   * @param {iColumn} number of column by which filter
+   * @param {value}
+   */
+  applyFilter:function(parentView, iColumn, value) {
+    value = (value) ? value : '';
+    parentView.get('oTable').fnFilter(value, iColumn);
+  }
+
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js?rev=1418960&r1=1418959&r2=1418960&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/controls_view.js Sun Dec  9 14:00:34 2012
@@ -28,7 +28,7 @@ App.ServiceConfigPopoverSupport = Ember.
    * Config object. It will instance of App.ServiceConfigProperty
    */
   serviceConfig: null,
-
+  placeholderBinding: 'serviceConfig.defaultValue',
   isPopoverEnabled: true,
 
   didInsertElement: function () {
@@ -252,6 +252,7 @@ App.ServiceConfigMultipleHostsDisplay = 
     console.log('controller', this.get('controller').name); //should be slaveComponentGroupsController
     if(!this.get('value')){
      // debugger;
+      return true;
     }
     return this.get('value').length === 0;
   }.property('value'),