You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/01/12 00:41:09 UTC

svn commit: r1432332 [2/3] - in /incubator/ambari/branches/branch-1.2: ./ ambari-agent/ ambari-agent/src/main/puppet/modules/hdp-mysql/files/ ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/ ambari-agent/src/main/python/ambari_agent/ ambari-ag...

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/alert.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/alert.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/alert.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/alert.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,23 @@
+/**
+ * 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 App = require('app');
+
+App.MainAlertController = Em.ArrayController.extend({
+  name:'mainAlertController'
+})
\ No newline at end of file

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/horizon_chart.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/horizon_chart.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/horizon_chart.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/charts/horizon_chart.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,23 @@
+/**
+ * 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 App = require('app');
+
+App.MainChartsHorizonChartController = Em.Controller.extend({
+  name: 'mainChartsHorizonChartController'
+});
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host.js Fri Jan 11 23:41:06 2013
@@ -18,51 +18,161 @@
 
 var App = require('app');
 var validator = require('utils/validator');
-var componentHelper = require('utils/component');
 
 App.MainHostController = Em.ArrayController.extend({
   name:'mainHostController',
-  content: App.Host.find(),
+  content:[],
   comeWithFilter: false,
+  fullContent:App.Host.find(),
+  clusters:App.Cluster.find(),
 
   isAdmin: function(){
-    return App.router.getUser().admin;
+    return App.db.getUser().admin;
   }.property('App.router.loginController.loginName'),
-
-  /**
-   * Components which will be shown in component filter
-   */
   componentsForFilter:function() {
-    var installedComponents = componentHelper.getInstalledComponents();
-    installedComponents.setEach('checkedForHostFilter', false);
-    return installedComponents;
+    var components = App.Component.find();
+    var ret = new Array();
+    if (!components) {
+      return ret;
+    }
+    components.forEach(function(item) {
+      var o = Ember.Object.create({
+        id: item.get('id'),
+        isMaster: item.get('isMaster'),
+        isSlave: item.get('isSlave'),
+        displayName: item.get('displayName'),
+        componentName: item.get('componentName'),
+        checkedForHostFilter: item.get('checkedForHostFilter')
+      });
+      ret.push(o);
+    });
+    return ret;
   }.property(),
 
+  totalBinding:'fullContent.length',
+  filters:{components:[]},
+  isDisabled:true,
+
+  checkRemoved:function (host_id) {
+    var hosts = this.get('content');
+    var selectedHosts = hosts.filterProperty('id', host_id);
+    this.get('fullContent').removeObjects(selectedHosts);
+  },
+
   masterComponents:function () {
-    return this.get('componentsForFilter').filterProperty('isMaster', true);
+    var components = [];
+    this.get('componentsForFilter').forEach(function (component) {
+      if (component.get('isMaster')) {
+        components.push(component);
+      }
+    });
+    return components;
   }.property('componentsForFilter'),
 
   slaveComponents:function () {
-    return this.get('componentsForFilter').filterProperty('isSlave', true);
+    var components = [];
+    this.get('componentsForFilter').forEach(function (component) {
+      if (component.get('isSlave')) {
+        components.push(component);
+      }
+    });
+    return components;
   }.property('componentsForFilter'),
 
   clientComponents: function() {
-    return this.get('componentsForFilter').filterProperty('isClient', true);
+    var components = [];
+    this.get('componentsForFilter').forEach(function(component) {
+      if (!component.get('isMaster') && !component.get('isSlave')) {
+        components.push(component);
+      }
+    });
+    return components;
   }.property('componentsForFilter'),
 
-  /**
-   * Filter hosts by componentName of <code>component</code>
-   * @param component App.HostComponent
-   */
-  filterByComponent:function (component) {
-    var id = component.get('componentName');
+  backgroundOperationsCount:function () {
+    return 5;
+  }.property(),
+
+  checkedComponentsIds:function () {
+    var checked = [];
+    this.get('componentsForFilter').forEach(function (comp) {
+      if (comp.get('checkedForHostFilter'))
+        checked.push(comp.get('id'));
+    });
+
+    return checked;
+  },
 
+  filterByComponent:function (component) {
+    var id = component.get('id');
+    /*this.get('componentsForFilter').setEach('isChecked', false);
+    component.set('isChecked', true);*/
     this.get('componentsForFilter').setEach('checkedForHostFilter', false);
     this.get('componentsForFilter').filterProperty('id', id).setEach('checkedForHostFilter', true);
-
+    //component.set('checkedForHostFilter', true);
+    this.set('filters.components', [component.get('id')]);
+    console.log(this.get('filters.components').objectAt(0));
     this.set('comeWithFilter', true);
   },
 
+
+  applyHostFilters:function (items) {
+
+    var field = 'hostName'; // make this function universal
+    var value = this.get('hostFilter' + field);
+
+    var itemsToDelete = [];
+    if (value) {
+      items.forEach(function (host, index) {
+        if (host) {
+          var fieldValue = host.get(field);
+          if (fieldValue) {
+            if (fieldValue.indexOf(value) == -1) {
+              itemsToDelete.push(host);
+            }
+          }
+        }
+      });
+    }
+
+    if (itemsToDelete.length) {
+      itemsToDelete.forEach(function (hostToDelete) {
+        var index = items.indexOf(hostToDelete);
+        items.removeAt(index);
+      })
+    }
+
+    return items;
+  },
+
+  changeContent:function () {
+    var items = [];
+    var filters = this.get('filters.components');
+    this.get('fullContent').forEach(function (item) {
+      if (filters.length) {
+        var inFilters = false;
+        item.get('components').forEach(function (component) {
+          if (filters.indexOf(component.get('id')) != -1) {
+            inFilters = true;
+          }
+        });
+
+
+        if (inFilters) {
+          items.push(item);
+        }
+      }
+      else {
+        items.push(item);
+      }
+    });
+
+    items = this.applyHostFilters(items);
+    this.set('total', items.length);
+
+    this.replace(0, this.get('length'), items);
+  }.observes('total'),
+
   decommissionButtonPopup:function () {
     var self = this;
     App.ModalPopup.show({
@@ -102,12 +212,6 @@ App.MainHostController = Em.ArrayControl
       console.log('Removing:  ' + _hostInfo.hostName);
     });
     this.get('fullContent').removeObjects(selectedHosts);
-  },
-
-  checkRemoved:function (host_id) {
-    var hosts = this.get('content');
-    var selectedHosts = hosts.filterProperty('id', host_id);
-    this.get('fullContent').removeObjects(selectedHosts);
   }
 
 });
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/add_controller.js Fri Jan 11 23:41:06 2013
@@ -156,7 +156,7 @@ App.AddHostController = App.WizardContro
     var masterComponentHosts = App.db.getMasterComponentHosts();
     if (!masterComponentHosts) {
       masterComponentHosts = [];
-      App.HostComponent.find().filterProperty('isMaster', true).forEach(function (item) {
+      App.Component.find().filterProperty('isMaster', true).forEach(function (item) {
         masterComponentHosts.push({
           component: item.get('componentName'),
           hostName: item.get('host.hostName'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/host/details.js Fri Jan 11 23:41:06 2013
@@ -74,7 +74,7 @@ App.MainHostDetailsController = Em.Contr
     });
   },
 
-  startComponent: function (event) {
+  startComponent: function(event){
     var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
@@ -96,10 +96,10 @@ App.MainHostDetailsController = Em.Contr
 
           console.log('Send request for STARTING successfully');
 
-          if (App.testMode) {
-            component.set('workStatus', App.HostComponentStatus.starting);
+          if(App.testMode){
+            component.set('workStatus', App.Component.Status.starting);
             setTimeout(function(){
-              component.set('workStatus', App.HostComponentStatus.started);
+              component.set('workStatus', App.Component.Status.started);
             },10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -126,7 +126,7 @@ App.MainHostDetailsController = Em.Contr
       }
     });
   },
-  stopComponent: function (event) {
+  stopComponent: function(event){
     var self = this;
     App.ModalPopup.show({
       header: Em.I18n.t('hosts.host.start.popup.header'),
@@ -147,12 +147,14 @@ App.MainHostDetailsController = Em.Contr
 
           console.log('Send request for STOPPING successfully');
 
-          if (App.testMode) {
-            component.set('workStatus', App.HostComponentStatus.stopping);
+
+
+          if(App.testMode){
+            component.set('workStatus', App.Component.Status.stopping);
             setTimeout(function(){
-              component.set('workStatus', App.HostComponentStatus.stopped);
+              component.set('workStatus', App.Component.Status.stopped);
             },10000);
-          } else {
+          } else{
             App.router.get('clusterController').loadUpdatedStatus();
             App.router.get('backgroundOperationsController.eventsArray').push({
               "when" : function(controller){
@@ -322,7 +324,7 @@ App.MainHostDetailsController = Em.Contr
    * var components = this.get('content.components');
    * components.forEach(function (cInstance) { var cName =
    * cInstance.get('componentName'); if (slaveComponents.contains(cName)) { if
-   * (cInstance.get('workStatus') === App.HostComponentStatus.stopped &&
+   * (cInstance.get('workStatus') === App.Component.Status.stopped &&
    * !cInstance.get('decommissioned')) { workingComponents.push(cName); } } else {
    * masterComponents.push(cName); } }); // debugger; if
    * (workingComponents.length || masterComponents.length) {

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/rack.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/rack.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/rack.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/rack.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,23 @@
+/**
+ * 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 App = require('app');
+
+App.MainRackController = Em.ArrayController.extend({
+  name:'mainRackController'
+})
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/add_controller.js Fri Jan 11 23:41:06 2013
@@ -161,7 +161,7 @@ App.AddServiceController = App.WizardCon
   saveMasterComponentHosts: function (stepController) {
     var obj = stepController.get('selectedServicesMasters');
     var masterComponentHosts = [];
-    var installedComponents = App.HostComponent.find();
+    var installedComponents = App.Component.find();
 
     obj.forEach(function (_component) {
         masterComponentHosts.push({
@@ -187,7 +187,7 @@ App.AddServiceController = App.WizardCon
     var masterComponentHosts = App.db.getMasterComponentHosts();
     if(!masterComponentHosts){
       masterComponentHosts = [];
-      App.HostComponent.find().filterProperty('isMaster', true).forEach(function(item){
+      App.Component.find().filterProperty('isMaster', true).forEach(function(item){
         masterComponentHosts.push({
           component: item.get('componentName'),
           hostName: item.get('host.hostName'),

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/configs.js Fri Jan 11 23:41:06 2013
@@ -430,7 +430,7 @@ App.MainServiceInfoConfigsController = E
     var message;
     var value;
     var flag;
-    if ((this.get('content.serviceName') !== 'HDFS' && this.get('content.isStopped') === true) || (this.get('content.serviceName') === 'HDFS') && this.get('content.isStopped') === true && App.Service.find('MAPREDUCE').get('isStopped')) {
+    if (this.get('content.isStopped') === true) {
       var result = this.saveServiceConfigProperties();
       flag = result.flag;
       if (flag === true) {
@@ -443,13 +443,8 @@ App.MainServiceInfoConfigsController = E
       }
 
     } else {
-      if (this.get('content.serviceName') !== 'HDFS') {
-        header = 'Stop Service';
-        message = 'Stop the service and wait till it stops completely. Thereafter you can apply configuration changes';
-      } else {
-        header = 'Stop Services';
-        message = 'Stop HDFS and MapReduce. Wait till both of them stops completely. Thereafter you can apply configuration changes';
-      }
+      header = 'Stop Service';
+      message = 'Stop the service and wait till it stops completely. Thereafter you can apply configuration changes';
     }
     App.ModalPopup.show({
       header: header,
@@ -539,11 +534,7 @@ App.MainServiceInfoConfigsController = E
     */
     result.flag = result.flag && this.createConfigurations();
     if (result.flag === true) {
-      if (this.get('content.serviceName') !== 'HDFS') {
-        result.flag = this.applyCreatedConfToService(this.get('content.serviceName'));
-      } else {
-        result.flag = this.applyCreatedConfToService(this.get('content.serviceName')) && this.applyCreatedConfToService('MAPREDUCE');
-      }
+      result.flag = this.applyCreatedConfToService('new');
     } else {
       result.message = 'Faliure in applying service configuration';
     }
@@ -833,11 +824,11 @@ App.MainServiceInfoConfigsController = E
     return {"type": siteName, "tag": tagName, "properties": siteProperties};
   },
 
-  applyCreatedConfToService: function (serviceName) {
+  applyCreatedConfToService: function (configStatus) {
     var result;
     var clusterName = App.router.getClusterName();
-    var url = App.apiPrefix + '/clusters/' + clusterName + '/services/' + serviceName;
-    var data = this.getConfigForService(serviceName);
+    var url = App.apiPrefix + '/clusters/' + clusterName + '/services/' + this.get('content.serviceName');
+    var data = this.getConfigForService(configStatus);
     var realData = data;
     $.ajax({
       type: 'PUT',
@@ -867,17 +858,22 @@ App.MainServiceInfoConfigsController = E
     return result;
   },
 
-  getConfigForService: function (serviceName) {
+  getConfigForService: function (config) {
     var data = {config: {}};
     this.get('serviceConfigTags').forEach(function (_serviceTag) {
-      if (_serviceTag.siteName === 'core-site') {
-        if (this.get('content.serviceName') === 'HDFS') {
-          data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+      if (config === 'new') {
+        if (_serviceTag.siteName === 'core-site') {
+          if (this.get('content.serviceName') === 'HDFS') {
+            data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+          } else {
+            data.config[_serviceTag.siteName] = _serviceTag.tagName;
+          }
         } else {
-          data.config[_serviceTag.siteName] = _serviceTag.tagName;
+          data.config[_serviceTag.siteName] = _serviceTag.newTagName;
         }
-      } else if (this.get('content.serviceName') === serviceName) {
-        data.config[_serviceTag.siteName] = _serviceTag.newTagName;
+      }
+      else if (config = 'previous') {
+        data.config[_serviceTag.siteName] = _serviceTag.tagName;
       }
     }, this);
     return data;
@@ -987,27 +983,27 @@ App.MainServiceInfoConfigsController = E
     switch (serviceName) {
       case 'HDFS':
         var sNameNodeHost = serviceConfigs.findProperty('name', 'snamenode_host');
-        sNameNodeHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'SECONDARY_NAMENODE').get('host.hostName');
+        sNameNodeHost.defaultValue = this.get('content.components').findProperty('componentName', 'SECONDARY_NAMENODE').get('host.hostName');
         globalConfigs.push(sNameNodeHost);
         break;
       case 'MAPREDUCE':
         var jobTrackerHost = serviceConfigs.findProperty('name', 'jobtracker_host');
-        jobTrackerHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'JOBTRACKER').get('host.hostName');
+        jobTrackerHost.defaultValue = this.get('content.components').findProperty('componentName', 'JOBTRACKER').get('host.hostName');
         globalConfigs.push(jobTrackerHost);
         break;
       case 'HIVE':
         var hiveMetastoreHost = serviceConfigs.findProperty('name', 'hivemetastore_host');
-        hiveMetastoreHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'HIVE_SERVER').get('host.hostName');
+        hiveMetastoreHost.defaultValue = this.get('content.components').findProperty('componentName', 'HIVE_SERVER').get('host.hostName');
         globalConfigs.push(hiveMetastoreHost);
         break;
       case 'OOZIE':
         var oozieServerHost = serviceConfigs.findProperty('name', 'oozieserver_host');
-        oozieServerHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
+        oozieServerHost.defaultValue = this.get('content.components').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
         globalConfigs.push(oozieServerHost);
         break;
       case 'HBASE':
         var hbaseMasterHost = serviceConfigs.findProperty('name', 'hbasemaster_host');
-        hbaseMasterHost.defaultValue = this.get('content.hostComponents').findProperty('componentName', 'HBASE_MASTER').get('host.hostName');
+        hbaseMasterHost.defaultValue = this.get('content.components').findProperty('componentName', 'HBASE_MASTER').get('host.hostName');
         globalConfigs.push(hbaseMasterHost);
         break;
     }

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/metrics.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/metrics.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/metrics.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/info/metrics.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,24 @@
+/**
+ * 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 App = require('app');
+
+App.MainServiceInfoMetricsController = Em.Controller.extend({
+  name: 'mainServiceInfoMetricsController',
+  content: 'Metrics'
+})
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/main/service/item.js Fri Jan 11 23:41:06 2013
@@ -76,6 +76,7 @@ App.MainServiceItemController = Em.Contr
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function () {
+        self.get('content.components').setEach('workStatus', App.Component.Status.starting);
         self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT", {
           ServiceInfo: {
             state: 'STARTED'
@@ -88,11 +89,9 @@ App.MainServiceItemController = Em.Contr
           console.log('Send request for STARTING successfully');
 
           if (App.testMode) {
-            self.set('content.workStatus', App.Service.Health.starting);
-            self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.starting);
+            self.content.set('workStatus', App.Service.Health.starting);
             setTimeout(function () {
-              self.set('content.workStatus', App.Service.Health.live);
-              self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.started);
+              self.content.set('workStatus', App.Service.Health.live);
             }, 10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -135,6 +134,7 @@ App.MainServiceItemController = Em.Contr
       primary: 'Yes',
       secondary: 'No',
       onPrimary: function() {
+        self.get('content.components').setEach('workStatus', App.Component.Status.stopping);
         self.sendCommandToServer('/services/' + self.get('content.serviceName').toUpperCase(), "PUT",{
           ServiceInfo:{
             state: 'INSTALLED'
@@ -145,11 +145,9 @@ App.MainServiceItemController = Em.Contr
           }
           console.log('Send request for STOPPING successfully');
           if (App.testMode) {
-            self.set('content.workStatus', App.Service.Health.stopping);
-            self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.stopping);
+            self.content.set('workStatus', App.Service.Health.stopping);
             setTimeout(function () {
-              self.set('content.workStatus', App.Service.Health.dead);
-              self.get('content.hostComponents').setEach('workStatus', App.HostComponentStatus.stopped);
+              self.content.set('workStatus', App.Service.Health.dead);
             }, 10000);
           } else {
             App.router.get('clusterController').loadUpdatedStatusDelayed(500);
@@ -239,9 +237,6 @@ App.MainServiceItemController = Em.Contr
     });
   },
   doAction: function (event) {
-    if ($(event.target).hasClass('disabled') || $(event.target.parentElement).hasClass('disabled')) {
-      return;
-    }
     var methodName = event.context;
     switch (methodName) {
       case 'runRebalancer':

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard.js Fri Jan 11 23:41:06 2013
@@ -21,10 +21,9 @@ var App = require('app');
 
 App.WizardController = Em.Controller.extend({
 
-  isStepDisabled: null,
+  isStepDisabled: [],
 
   init: function () {
-    this.set('isStepDisabled', []);
     this.clusters = App.Cluster.find();
     this.isStepDisabled.pushObject(Ember.Object.create({
       step: 1,

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step10_controller.js Fri Jan 11 23:41:06 2013
@@ -19,10 +19,11 @@
 var App = require('app');
 
 App.WizardStep10Controller = Em.Controller.extend({
+  name: 'wizardStep10Controller',
   clusterInfo: [],
 
   isNagiosRestartRequired: function() {
-    return this.get('content.controllerName') !== 'installerController' && App.db.getSlaveComponentHosts().findProperty('componentName', 'HBASE_REGIONSERVER').hosts.length;
+    return App.db.getSelectedServiceNames().contains('NAGIOS') && this.get('content.controllerName') !== 'installerController';
   }.property(),
 
   clearStep: function () {

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step3_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step3_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step3_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step3_controller.js Fri Jan 11 23:41:06 2013
@@ -287,25 +287,6 @@ App.WizardStep3Controller = Em.Controlle
           }
           console.log("TRACE: In success function for the GET bootstrap call");
           var keepPolling = self.parseHostInfo(data.hostsStatus);
-
-          // Single host : if the only hostname is invalid (data.status == 'ERROR')
-          // Multiple hosts : if one or more hostnames are invalid
-          // following check will mark the bootStatus as 'FAILED' for the invalid hostname
-          if (data.status == 'ERROR' || data.hostsStatus.length != self.get('bootHosts').length) {
-
-            var hosts = self.get('bootHosts');
-
-            for (var i = 0; i < hosts.length; i++) {
-
-              var isValidHost = data.hostsStatus.someProperty('hostName', hosts[i].get('name'));
-
-              if (!isValidHost) {
-                hosts[i].set('bootStatus', 'FAILED');
-                hosts[i].set('bootLog', 'Registration with the server failed.');
-              }
-            }
-          }
-
           if (data.hostsStatus.someProperty('status', 'DONE') || data.hostsStatus.someProperty('status', 'FAILED')) {
             // kicking off registration polls after at least one host has succeeded
             self.startRegistration();

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step5_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step5_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step5_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step5_controller.js Fri Jan 11 23:41:06 2013
@@ -161,7 +161,7 @@ App.WizardStep5Controller = Em.Controlle
           componentObj.component_name = _componentInfo.component_name;
           componentObj.display_name = _componentInfo.display_name;
           componentObj.selectedHost = savedComponent ? savedComponent.hostName : this.selectHost(_componentInfo.component_name);   // call the method that plays selectNode algorithm or fetches from server
-          componentObj.isInstalled = savedComponent ? savedComponent.isInstalled : App.HostComponent.find().someProperty('componentName', _componentInfo.component_name);
+          componentObj.isInstalled = savedComponent ? savedComponent.isInstalled : App.Component.find().someProperty('componentName', _componentInfo.component_name);
           componentObj.serviceId = services[index];
           componentObj.availableHosts = [];
           componentObj.isHiveCoHost = ['HIVE_METASTORE', 'WEBHCAT_SERVER'].contains(_componentInfo.component_name);

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step9_controller.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/controllers/wizard/step9_controller.js Fri Jan 11 23:41:06 2013
@@ -120,9 +120,9 @@ App.WizardStep9Controller = Em.Controlle
     var hosts = new Ember.Set();
     for (var index in hostInfo) {
       var obj = Em.Object.create(hostInfo[index]);
-      obj.message = (obj.message) ? obj.message : 'Waiting';
+      obj.message = '';
       obj.progress = 0;
-      obj.status = (obj.status) ? obj.status : 'info';
+      obj.status = 'info';
       obj.tasks = [];
       obj.logTasks = [];
       hosts.add(obj);

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/data/config_properties.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/data/config_properties.js Fri Jan 11 23:41:06 2013
@@ -1294,7 +1294,7 @@ module.exports =
       "displayName": "MapReduce Capacity Scheduler",
       "description": "The scheduler to use for scheduling of MapReduce jobs",
       "defaultValue": "org.apache.hadoop.mapred.CapacityTaskScheduler",
-      //"displayType": "directory",
+      "displayType": "directory",
       "isVisible": true,
       "serviceName": "MAPREDUCE"
     },

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/hosts_mapper.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/hosts_mapper.js Fri Jan 11 23:41:06 2013
@@ -15,8 +15,6 @@
  * the License.
  */
 
-var App = require('app');
-
 App.hostsMapper = App.QuickDataMapper.create({
   model: App.Host,
   tmp_result:[],
@@ -25,6 +23,11 @@ App.hostsMapper = App.QuickDataMapper.cr
     host_name: 'Hosts.host_name',
     public_host_name: 'Hosts.public_host_name',
     cluster_id: 'Hosts.cluster_name',// 1
+    components_key: 'host_components',
+    components_type: 'array',
+    components: {
+      item: 'HostRoles.component_name'
+    },
     rack: 'Hosts.rack_info',
     host_components_key: 'host_components',
     host_components_type: 'array',

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/server_data_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/server_data_mapper.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/server_data_mapper.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/server_data_mapper.js Fri Jan 11 23:41:06 2013
@@ -108,18 +108,5 @@ App.QuickDataMapper = App.ServerDataMapp
       pathArr.splice(0, 1);
     }
     return current;
-  },
-
-  calculateState: function (json) {
-    var stateEqual = (json.desired_status != json.work_status);
-    if (stateEqual) {
-      if (json.desired_status == 'STARTED' && json.work_status == 'INSTALLED') {
-        json.work_status = 'STARTING';
-      } else if (json.desired_status == 'INSTALLED' && json.work_status == 'STARTED') {
-        json.work_status = 'STOPPING';
-      }
-    }
-
-    return json;
   }
 });

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/service_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/service_mapper.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/service_mapper.js Fri Jan 11 23:41:06 2013
@@ -14,8 +14,6 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-
-var App = require('app');
 var stringUtils = require('utils/string_utils');
 
 App.servicesMapper = App.QuickDataMapper.create({
@@ -51,6 +49,11 @@ App.servicesMapper = App.QuickDataMapper
     work_status: 'ServiceInfo.state',
     $service_audit: [ 1, 2, 3 ],
     $alerts: [ 1, 2, 3 ],
+    components_key: 'components',
+    components_type: 'array',
+    components: {
+      item: 'ServiceComponentInfo.component_name'
+    },
     host_components: 'host_components'
   },
   hdfsConfig: {
@@ -112,14 +115,28 @@ App.servicesMapper = App.QuickDataMapper
     heap_memory_max: 'masterComponent.ServiceComponentInfo.HeapMemoryMax'
   },
 
+  model2: App.Component,
+  config2: {
+    id: 'ServiceComponentInfo.component_name',
+    component_name: 'ServiceComponentInfo.component_name',
+    service_id: 'ServiceComponentInfo.service_name',
+    // TODO - PROBLEM:
+    // below statements are a problem for multiple 
+    // host_component components. Because it randomly
+    // picks one of the hosts. Especially the host details
+    // page must be careful because, it will randomly
+    // pick a host.
+    work_status: 'host_components[0].HostRoles.state',
+    host_id: 'host_components[0].HostRoles.host_name'
+  },
+
   model3: App.HostComponent,
   config3: {
     id: 'id',
     work_status: 'HostRoles.state',
-    desired_status: 'HostRoles.desired_state',
     component_name: 'HostRoles.component_name',
     host_id: 'HostRoles.host_name',
-    $service_id: 'none' /* will be set outside of parse function */
+    service_id: 'component[0].ServiceComponentInfo.service_name'
   },
 
   map: function (json) {
@@ -177,21 +194,42 @@ App.servicesMapper = App.QuickDataMapper
       result = this.sortByOrder(this.get('servicesSortOrder'), result);
       App.store.loadMany(this.get('model'), result);
 
+      // Service components
+      result = [];
+      json.items.forEach(function(item){
+        item.components.forEach(function(component){
+          result.push(this.parseIt(component, this.config2));
+        }, this)
+      }, this);
+      var newComponents = [];
+      result.forEach(function(componentJson){
+        var component = App.Component.find(componentJson.id);
+        if (component && component.get('isLoaded')) { // UPDATE
+          if (componentJson.work_status) {
+            component.set('workStatus', componentJson.work_status);
+          }
+          if (componentJson.host_id) {
+            component.set('host', App.Host.find(componentJson.host_id));
+          }
+        } else {
+          newComponents.push(componentJson);
+        }
+      });
+      if (newComponents.length > 0) {
+        App.store.loadMany(this.get('model2'), newComponents);
+      }
+
       // Host components
       result = [];
       json.items.forEach(function(item){
         item.components.forEach(function(component){
-          var service = component.ServiceComponentInfo.service_name;
           component.host_components.forEach(function(host_component){
-            var comp = this.parseIt(host_component, this.config3);
-            comp.service_id = service;
-            result.push(comp);
+            result.push(this.parseIt(host_component, this.config3));
           }, this)
         }, this)
       }, this);
       var newHostComponents = [];
       result.forEach(function(hcJson){
-        hcJson = this.calculateState(hcJson);
         hcJson.id = hcJson.component_name + '_' + hcJson.host_id;
         var component = App.HostComponent.find(hcJson.id);
         if (component && component.get('isLoaded')) { // UPDATE
@@ -210,7 +248,7 @@ App.servicesMapper = App.QuickDataMapper
         } else {
           newHostComponents.push(hcJson);
         }
-      }, this);
+      });
       if (newHostComponents.length > 0) {
         App.store.loadMany(this.get('model3'), newHostComponents);
       }

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/status_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/status_mapper.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/status_mapper.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/mappers/status_mapper.js Fri Jan 11 23:41:06 2013
@@ -29,8 +29,7 @@ App.statusMapper = App.QuickDataMapper.c
 
   config3:{
     id:'id',
-    work_status:'HostRoles.state',
-    desired_status: 'HostRoles.desired_state'
+    work_status:'HostRoles.state'
   },
 
   map:function (json) {
@@ -62,6 +61,22 @@ App.statusMapper = App.QuickDataMapper.c
       result = [];
       json.items.forEach(function (item) {
         item.components.forEach(function (component) {
+          result.push(this.parseIt(component, this.config2));
+        }, this)
+      }, this);
+
+      //console.log(result)
+      var components = App.Component.find();
+      result.forEach(function(item){
+        var component = components.findProperty('id', item.id);
+        if(component){
+          component.set('workStatus', item.work_status);
+        }
+      })
+
+      result = [];
+      json.items.forEach(function (item) {
+        item.components.forEach(function (component) {
           component.host_components.forEach(function (host_component) {
             result.push(this.parseIt(host_component, this.config3));
           }, this)
@@ -73,10 +88,9 @@ App.statusMapper = App.QuickDataMapper.c
       result.forEach(function(item){
         var hostComponent = hostComponents.findProperty('id', item.id);
         if(hostComponent){
-          item = this.calculateState(item);
           hostComponent.set('workStatus', item.work_status);
         }
-      }, this)
+      })
     }
   }
 });

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/messages.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/messages.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/messages.js Fri Jan 11 23:41:06 2013
@@ -79,11 +79,11 @@ Em.I18n.translations = {
   'installer.step2.hostName.error.notRequired':'Host Names will be ignored if not using SSH to automatically configure hosts',
   'installer.step2.hostName.error.invalid':'Invalid Host Name(s)',
   'installer.step2.hostName.pattern.header':'Host name pattern expressions',
-  'installer.step2.sshKey':'Host Registration Information',
+  'installer.step2.sshKey':'Host Connectivity Information',
   'installer.step2.sshKey.error.required':'SSH Private Key is required',
   'installer.step2.passphrase.error.match':'Passphrases do not match',
   'installer.step2.manualInstall.label':'Do not use SSH to automatically configure hosts ',
-  'installer.step2.manualInstall.info':'By not using SSH to connect to the target hosts, you must manually install the ' +
+  'installer.step2.manualInstall.info':'By not using SSH to connect to the target hosts, you must manually install and start the ' +
     'Ambari Agent on each host in order for the wizard to perform the necessary configurations and software installs.',
   'installer.step2.advancedOption':'Advanced Options',
   'installer.step2.repoConf':'Software Repository Configuration File Path',
@@ -92,22 +92,22 @@ Em.I18n.translations = {
   'installer.step2.localRepo.label_instead':'instead of downloading software packages from the Internet',
   'installer.step2.localRepo.error.required':'Local repository file path is required',
   'installer.step2.localRepo.tooltip.title':'Local Software Repository',
-  'installer.step2.localRepo.tooltip.content': 'The cluster install requires access to the Internet to fetch software ' +
+  'installer.step2.localRepo.tooltip.content': 'The install process requires access to the Internet to fetch software ' +
     'from a remote repository. In some cases, adequate bandwidth is not available and you want to prevent downloading ' +
     'packages from the remote repository over and over again. Other times, Internet access is not available from the ' +
     'hosts in your cluster. In these situations, you must set up a version of the repository that your machines can ' +
     'access locally and this is called a <b>Local Software Repository</b>',
   'installer.step2.javaHome.label' : 'Path to 64-bit JDK',
+  'installer.step2.javaHome.label2' : 'on all hosts',
   'installer.step2.javaHome.tooltip.title' : 'JAVA_HOME',
   'installer.step2.javaHome.tooltip.content' : 'Path to 64-bit JAVA_HOME. /usr/jdk/jdk1.6.0_31 is the default used by Ambari. You can override this to a specific path that contains the JDK. <br/> Note: the path must be valid on <b>ALL</b> hosts in your cluster.',
   'installer.step2.useSsh.provide' : 'Provide your',
   'installer.step2.useSsh.provide_id_rsa' : '(id_rsa for root) and use SSH to automatically register hosts',
   'installer.step2.useSsh.tooltip.title':'SSH Private Key',
   'installer.step2.useSsh.tooltip.content':'The <b>SSH Private Key File</b> is used for the root access to the target hosts in your cluster.',
-  'installer.step2.manualInstall.perform':'Perform',
-  'installer.step2.manualInstall.perform_on_hosts':'on hosts and do not use SSH',
-  'installer.step2.manualInstall.tooltip.title':'manual registration',
-  'installer.step2.manualInstall.tooltip.content':'Manually registering the Ambari Agent on each host eliminates the need for SSH and should be performed prior to continuing cluster installation.',
+  'installer.step2.manualInstall.tooltip.title':'Not Using SSH (Manual Install)',
+  'installer.step2.manualInstall.tooltip.content':'If you do not wish Ambari to automatically configure the target hosts via SSH,' +
+    ' you have the option of configuring them yourself.  This involves installing and starting Ambari Agent on each of your target hosts.',
   'installer.step2.manualInstall.popup.header':'Before You Proceed',
   'installer.step2.manualInstall.popup.body':'You must install Ambari Agents on each host you want to manage before you proceed.',
 
@@ -272,8 +272,6 @@ Em.I18n.translations = {
   'services.service.actions.run.smoke':'Run Smoke Test',
   'services.service.actions.maintenance':'Maintenance',
   'services.service.summary.unknown':'unknown',
-  'services.service.summary.notRunning':'Not Running',
-  'services.service.summary.notAvailable':'n/a',
 
   'services.add.header':'Add Service Wizard',
 
@@ -289,6 +287,7 @@ Em.I18n.translations = {
   'hosts.cant.do.popup.masterList.body':'You cannot delete this host because it is hosting following master services: {0}.',
   'hosts.cant.do.popup.workingList.body':'You cannot delete this host because following slave services are not fully stopped or decommissioned: {0}.',
   'hosts.add.header':'Add Host Wizard',
+  'hosts.add.step2.warning':'Hosts are already part of the cluster and will be ignored',
   'hosts.assignRack':'Assign Rack',
 
   'charts.horizon.chart.showText':'show',
@@ -392,8 +391,6 @@ Em.I18n.translations = {
 
   'apps.filters.customRunDate':'Run Date custom filter',
   'apps.dagCharts.popup':'DAG/Charts',
-  'apps.isRunning.popup.title':'Is running',
-  'apps.isRunning.popup.content':'Job is running now',
 
   'nagios.alerts.unavailable':'Alerts Unavailable'
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/models.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models.js Fri Jan 11 23:41:06 2013
@@ -26,8 +26,10 @@ require('models/cluster_states');
 require('models/hosts');
 require('models/quick_links');
 require('models/service');
+require('models/component');
 require('models/service_config');
 require('models/service_audit');
+require('models/service_metrics');
 require('models/service/hdfs');
 require('models/service/mapreduce');
 require('models/service/hbase');

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/models/component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/component.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/component.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/component.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,103 @@
+/**
+ * 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 App = require('app');
+
+App.Component = DS.Model.extend({
+
+  componentName: DS.attr('string'),
+
+  displayName: function () {
+    return App.format.role(this.get('componentName'));
+  }.property('componentName'),
+
+  service: DS.belongsTo('App.Service'),
+  //service_id: DS.attr('string'),
+
+  host: DS.belongsTo('App.Host'),
+  //host_id: DS.attr('string'),
+
+  workStatus: DS.attr('string'),
+
+  isMaster: function () {
+    switch (this.get('componentName')) {
+      case 'NAMENODE':
+      case 'SECONDARY_NAMENODE':
+      case 'SNAMENODE':
+      case 'JOBTRACKER':
+      case 'ZOOKEEPER_SERVER':
+      case 'HIVE_SERVER':
+      case 'HIVE_METASTORE':
+      case 'MYSQL_SERVER':
+      case 'HBASE_MASTER':
+      case 'NAGIOS_SERVER':
+      case 'GANGLIA_SERVER':
+      case 'OOZIE_SERVER':
+      case 'WEBHCAT_SERVER':
+        return true;
+      default:
+        return false;
+    }
+    return this.get('componentName');
+  }.property('componentName'),
+  isSlave: function(){
+    switch (this.get('componentName')) {
+      case 'DATANODE':
+      case 'TASKTRACKER':
+      case 'HBASE_REGIONSERVER':
+      case 'GANGLIA_MONITOR':
+        return true;
+      default:
+        return false;
+    }
+    return this.get('componentName');
+  }.property('componentName')
+});
+
+App.Component.Status = {
+  started: "STARTED",
+  starting: "STARTING",
+  stopped: "INSTALLED",
+  stopping: "STOPPING",
+  stop_failed: "STOP_FAILED",
+  start_failed: "START_FAILED",
+  install_failed: "INSTALL_FAILED",
+
+  getKeyName:function(value){
+    switch(value){
+      case this.started:
+        return 'started';
+      case this.starting:
+        return 'starting';
+      case this.stopped:
+        return 'installed';
+      case this.stopping:
+        return 'stopping';
+      case this.stop_failed:
+        return 'stop_failed';
+      case this.start_failed:
+        return 'start_failed';
+      case this.install_failed:
+         return 'install_failed';
+    }
+    return 'none';
+  }
+}
+
+App.Component.FIXTURES = [];
+

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/models/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/host.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/host.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/host.js Fri Jan 11 23:41:06 2013
@@ -34,6 +34,7 @@ App.Host = DS.Model.extend({
   hostName: DS.attr('string'),
   publicHostName: DS.attr('string'),
   cluster: DS.belongsTo('App.Cluster'),
+  components: DS.hasMany('App.Component'),
   hostComponents: DS.hasMany('App.HostComponent'),
   cpu: DS.attr('string'),
   memory: DS.attr('string'),
@@ -128,8 +129,8 @@ App.Host = DS.Model.extend({
     if (!this.get('isLoaded') || this.get('isSaving')) {
     } else {
       var status;
-      var masterComponents = this.get('hostComponents').filterProperty('isMaster', true);
-      var masterComponentsRunning = masterComponents.everyProperty('workStatus', App.HostComponentStatus.started);
+      var masterComponents = this.get('components').filterProperty('isMaster', true);
+      var masterComponentsRunning = masterComponents.everyProperty('workStatus', App.Component.Status.started);
       if (this.get('isNotHeartBeating')) {
         status = 'DEAD-YELLOW';
       } else if (masterComponentsRunning) {
@@ -144,7 +145,7 @@ App.Host = DS.Model.extend({
       }
     }
     return 'health-status-' + healthStatus;
-  }.property('healthStatus', 'hostComponents.@each.workStatus')
+  }.property('healthStatus', 'components.@each.workStatus')
 });
 
 App.Host.FIXTURES = [];
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/models/host_component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/host_component.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/host_component.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/host_component.js Fri Jan 11 23:41:06 2013
@@ -83,18 +83,15 @@ App.HostComponent = DS.Model.extend({
     }
     return decommissioning;
   }.property('componentName', 'host.hostName', 'App.router.mainServiceController.hdfsService.decommissionDataNodes.@each.hostName')
-});
+})
 
-App.HostComponent.FIXTURES = [];
-
-App.HostComponentStatus = {
+App.HostComponent.Status = {
   started: "STARTED",
   starting: "STARTING",
   stopped: "INSTALLED",
   stopping: "STOPPING",
   stop_failed: "STOP_FAILED",
   start_failed: "START_FAILED",
-  install_failed: "INSTALL_FAILED",
 
   getKeyName:function(value){
     switch(value){
@@ -110,10 +107,10 @@ App.HostComponentStatus = {
         return 'stop_failed';
       case this.start_failed:
         return 'start_failed';
-      case this.install_failed:
-        return 'install_failed';
     }
     return 'none';
   }
 }
 
+App.HostComponent.FIXTURES = [];
+

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/service.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/service.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/service.js Fri Jan 11 23:41:06 2013
@@ -27,6 +27,7 @@ App.Service = DS.Model.extend({
   workStatus: DS.attr('string'),
   alerts: DS.hasMany('App.Alert'),
   quickLinks: DS.hasMany('App.QuickLinks'),
+  components: DS.hasMany('App.Component'),
   hostComponents: DS.hasMany('App.HostComponent'),
   isStartDisabled: function () {
     return !(this.get('healthStatus') == 'red');
@@ -37,33 +38,33 @@ App.Service = DS.Model.extend({
   }.property('healthStatus'),
 
   healthStatus: function () {
-    var components = this.get('hostComponents').filterProperty('isMaster', true);
-    if (components.everyProperty('workStatus', App.HostComponentStatus.started)) {
+    var components = this.get('components').filterProperty('isMaster', true);
+    if (components.everyProperty('workStatus', App.Component.Status.started)) {
       return 'green';
-    } else if (components.someProperty('workStatus', App.HostComponentStatus.starting)) {
+    } else if (components.someProperty('workStatus', App.Component.Status.starting)) {
       return 'green-blinking';
-    } else if (components.someProperty('workStatus', App.HostComponentStatus.stopped)) {
+    } else if (components.someProperty('workStatus', App.Component.Status.stopped)) {
       return 'red';
     } else {
       return 'red-blinking';
     }
-  }.property('hostComponents.@each.workStatus'),
+  }.property('components.@each.workStatus'),
 
   isStopped: function () {
-    var components = this.get('hostComponents');
+    var components = this.get('components');
     var flag = true;
     components.forEach(function (_component) {
-      if (_component.get('workStatus') !== App.HostComponentStatus.stopped && _component.get('workStatus') !== App.HostComponentStatus.install_failed) {
+      if (_component.get('workStatus') !== App.Component.Status.stopped && _component.get('workStatus') !== App.Component.Status.install_failed) {
         flag = false;
       }
     }, this);
     return flag;
-  }.property('hostComponents.@each.workStatus'),
+  }.property('components.@each.workStatus'),
 
   isStarted: function () {
-    var components = this.get('hostComponents').filterProperty('isMaster', true);
-    return components.everyProperty('workStatus', App.HostComponentStatus.started);
-  }.property('hostComponents.@each.workStatus'),
+    var components = this.get('components').filterProperty('isMaster', true);
+    return components.everyProperty('workStatus', App.Component.Status.started);
+  }.property('components.@each.workStatus'),
   isMaintained: function () {
     var maintainedServices = [
       "HDFS",

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_config.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_config.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_config.js Fri Jan 11 23:41:06 2013
@@ -337,12 +337,10 @@ App.ServiceConfigProperty = Ember.Object
 
     var isError = false;
 
-    if (typeof value === 'string' && value.trim().length === 0) {
-      if (this.get('isRequired')) {
+    if (this.get('isRequired')) {
+      if (typeof value === 'string' && value.trim().length === 0) {
         this.set('errorMessage', 'This is required');
         isError = true;
-      } else {
-        return;
       }
     }
 
@@ -363,16 +361,6 @@ App.ServiceConfigProperty = Ember.Object
         case 'checkbox':
           break;
         case 'directories':
-          if (!validator.isValidDir(value)) {
-            this.set('errorMessage', 'Must be a slash at the start');
-            isError = true;
-          }
-          break;
-        case 'directory':
-          if (!validator.isValidDir(value)) {
-            this.set('errorMessage', 'Must be a slash at the start');
-            isError = true;
-          }
           break;
         case 'custom':
           break;

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_metrics.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_metrics.js?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_metrics.js (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/models/service_metrics.js Fri Jan 11 23:41:06 2013
@@ -0,0 +1,20 @@
+/**
+ * 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 App = require('app');
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/routes/installer.js?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/routes/installer.js Fri Jan 11 23:41:06 2013
@@ -48,15 +48,11 @@ module.exports = Em.Route.extend({
                   break;
                 case 'CLUSTER_INSTALLING_3' :
                 case 'SERVICE_STARTING_3' :
-                  if(!installerController.get('isStep9')){
-                    installerController.setCurrentStep('9');
-                  }
+                  installerController.setCurrentStep('9');
                   App.db.data = currentClusterStatus.localdb;
                   break;
                 case 'CLUSTER_INSTALLED_4' :
-                  if(!installerController.get('isStep10')){
-                    installerController.setCurrentStep('10');
-                  }
+                  installerController.setCurrentStep('10');
                   App.db.data = currentClusterStatus.localdb;
                   break;
                 case 'CLUSTER_STARTED_5' :

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/styles/application.less?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/styles/application.less Fri Jan 11 23:41:06 2013
@@ -286,15 +286,6 @@ h1 {
     .java-home {
       margin-bottom: 10px
     }
-    .ssh-key-input {
-      padding-left: 18px;
-    }
-    .ssh-key-input-indentation {
-      margin-bottom: 5px;
-    }
-    input[type="radio"]:focus {
-      outline: none;
-    }
   }
   #confirm-hosts {
     #host-filter {
@@ -689,9 +680,9 @@ a:focus {
     }
 
     .task-detail-ico-wrap{
-      font-size: 14px;
+      font-size: 24px;
       float:right;
-      margin-top:-20px;
+      margin-top:-26px;
 
       div{
         cursor: pointer;
@@ -720,7 +711,6 @@ a:focus {
     background-position: 6px 5px;
     background-repeat: no-repeat;
     list-style: none;
-    float:left;
     min-height: 20px;
     min-width: 20px;
     margin-left: 0;
@@ -1072,7 +1062,6 @@ a:focus {
       background-position: 6px 5px;
       background-repeat: no-repeat;
       list-style: none;
-      float: left;
       height: 20px;
       width: 20px;
       margin-left: 0;
@@ -2332,14 +2321,3 @@ ul.inline li {
 i.icon-asterisks {
   color: #FF4B4B;
 }
-
-.rickshaw_legend {
-  .action {
-    opacity: 1;
-    color: #ffffff;
-  }
-  .action:hover {
-    opacity: 0.8;
-    text-decoration: none;
-  }
-}
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/styles/apps.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/styles/apps.less?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/styles/apps.less (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/styles/apps.less Fri Jan 11 23:41:06 2013
@@ -251,13 +251,8 @@
 /*Big modal window*/
 .big-modal {
   .modal {
-    top: -999px;
-    left: -999px;
-    .modal-body {
-      max-height: none;
-    }
     width: 1150px;
-    margin: 0;
+    margin: -350px 0 0 -575px;
   }
 
   .clear {
@@ -384,12 +379,10 @@
 
 @media all and (max-width: 1024px) {
   .big-modal {
-    #graph1 {
-      width: 300px;
+    .modal {
+      width: 980px;
+      margin: -290px 0 0 -495px;
     }
-    #graph2 {
-      width: 400px;
-  }
   }
 }
 

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main.hbs Fri Jan 11 23:41:06 2013
@@ -23,7 +23,7 @@
       <a class="brand" href="#" {{bindAttr title="clusterName"}}>
         {{clusterDisplayName}}
 
-        {{#view Em.View tagName="" controllerBinding="App.router.backgroundOperationsController"}}
+        {{#view App.EmptyView controllerBinding="App.router.backgroundOperationsController"}}
           {{#if allOperationsCount}}
             <span class="label operations-count" {{action "showPopup" target="controller"}}>{{allOperationsCount}}</span>
           {{/if}}

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/admin/security.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/admin/security.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/admin/security.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/admin/security.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,25 @@
+{{!
+* 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.
+}}
+
+<h5>{{t admin.security.title}}<i class="icon-question-sign"></i></h5>
+<div>
+  <button class="btn">
+    <i class="icon-lock"></i>
+    {{t admin.security.button.enable}}
+  </button>
+</div>
\ No newline at end of file

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/apps/list_row.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/apps/list_row.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/apps/list_row.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/apps/list_row.hbs Fri Jan 11 23:41:06 2013
@@ -25,12 +25,4 @@
 <td>{{unbound run.inputFormatted}}</td>
 <td>{{unbound run.outputFormatted}}</td>
 <td>{{unbound run.duration}}</td>
-{{#if run.isRunning}}
-<td rel="popover" {{translateAttr title="apps.isRunning.popup.title" data-content="apps.isRunning.popup.content"}}>
-    <span title="{{unbound run.lastUpdateTimeFormatted}}">{{unbound run.lastUpdateTimeFormattedShort}}</span>
-    <b class='red'>*</b></td>
-{{else}}
-<td>
-    <span title="{{unbound run.lastUpdateTimeFormatted}}">{{unbound run.lastUpdateTimeFormattedShort}}</span>
-</td>
-{{/if}}
+<td ><span title="{{unbound run.lastUpdateTimeFormatted}}">{{unbound run.lastUpdateTimeFormattedShort}}</span>&nbsp;{{#if run.isRunning}}<b class='red'>*</b>{{/if}}</td>
\ No newline at end of file

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,21 @@
+{{!
+* 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.
+}}
+
+{{#each node in view.hosts}}
+  {{view App.MainChartsHorizonChartView hostBinding="node"}}
+{{/each}}

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon/chart.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon/chart.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon/chart.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/charts/horizon/chart.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,34 @@
+{{!
+* 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.
+}}
+
+<div class="row">
+  <div {{bindAttr class="view.healthStatusClass"}}></div>
+  <div class="span10 hostName">{{view.host.hostName}}</div>
+  <div class="span1">
+    <a href="#"{{action toggleChart target="view"}}>{{view.showChartText}}</a>
+  </div>
+</div>
+
+<div {{bindAttr class="view.chartClass"}}>
+  <div class="attributes">
+    {{#each metric in view.usedMetrics}}
+      <p>{{metric}}</p>
+    {{/each}}
+  </div>
+  <div {{bindAttr id="view.chartContainerId"}}></div>
+</div>

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hbase.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hbase.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hbase.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hbase.hbs Fri Jan 11 23:41:06 2013
@@ -54,7 +54,7 @@
       <!-- Version -->
       <tr>
         <td>{{t dashboard.services.hbase.version}}</td>
-        <td>{{view.version}} {{view.service.revision}}</td>
+        <td>{{view.service.version}} {{view.service.revision}}</td>
       </tr>
       <!-- HBaseMaster Web UI -->
       <tr>

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hdfs.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hdfs.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hdfs.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/hdfs.hbs Fri Jan 11 23:41:06 2013
@@ -62,7 +62,7 @@
       <!-- Version -->
       <tr>
         <td>{{t dashboard.services.hdfs.version}}</td>
-        <td>{{view.version}}</td>
+        <td>{{view.service.version}}</td>
       </tr>
       <!-- NameNode Web UI -->
       <tr>
@@ -97,21 +97,21 @@
       <!-- Blocks Total -->
       <tr>
         <td>{{t services.service.summary.blocksTotal}}</td>
-        <td>{{view.dfsTotalBlocks}}</td>
+        <td>{{view.service.dfsTotalBlocks}}</td>
       </tr>
       <!-- Block Errors -->
       <tr>
         <td>{{t services.service.summary.blockErrors}}</td>
         <td>
-          {{view.dfsCorruptBlocks}} corrupt /
-          {{view.dfsMissingBlocks}} missing /
-          {{view.dfsUnderReplicatedBlocks}} under replicated
+          {{view.service.dfsCorruptBlocks}} corrupt /
+          {{view.service.dfsMissingBlocks}} missing /
+          {{view.service.dfsUnderReplicatedBlocks}} under replicated
         </td>
       </tr>
       <!-- Total Files And Directories -->
       <tr>
         <td>{{t dashboard.services.hdfs.totalFilesAndDirs}}</td>
-        <td>{{view.dfsTotalFiles}}</td>
+        <td>{{view.service.dfsTotalFiles}}</td>
       </tr>
       <!-- Upgrade Status -->
       <tr>
@@ -141,9 +141,7 @@
     </table>
   </div>
 <div class="dashboard-mini-chart span2">
-  <div {{bindAttr title="view.capacity"}}>
-    {{view view.Chart serviceBinding="view.service"}}
-  </div>
+  {{view view.Chart serviceBinding="view.service"}}
   <div class="chartLabel">{{t dashboard.services.hdfs.chart.label}}</div>
   {{#if view.service.quickLinks.length}}
     {{#view App.QuickViewLinks contentBinding="view.service"}}

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs Fri Jan 11 23:41:06 2013
@@ -54,7 +54,7 @@
       <!-- Version -->
       <tr>
         <td>{{t dashboard.services.hdfs.version}}</td>
-        <td>{{view.version}}</td>
+        <td>{{view.service.version}}</td>
       </tr>
       <!-- JobTracker Web UI -->
       <tr>

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/host/audit.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/host/audit.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/host/audit.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/host/audit.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,20 @@
+{{!
+* 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.
+}}
+
+<h5>Audit</h5>
+

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/metrics.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/metrics.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/metrics.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/metrics.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,20 @@
+{{!
+* 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.
+}}
+
+<h5>Metrics</h5>
+{{outlet}}

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary.hbs Fri Jan 11 23:41:06 2013
@@ -47,7 +47,7 @@
       {{#unless view.serviceStatus.mapreduce}}
       {{#unless view.serviceStatus.hbase}}
       {{#unless view.serviceStatus.ganglia}}
-      {{#each component in controller.content.hostComponents}}
+      {{#each component in controller.content.components}}
         <tr>
           {{#if component.isMaster}}
             <td class="summary-label">{{component.displayName}}</td>

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/ganglia.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/ganglia.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/ganglia.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/ganglia.hbs Fri Jan 11 23:41:06 2013
@@ -15,7 +15,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-{{#each component in controller.content.hostComponents}}
+{{#each component in controller.content.components}}
   {{#if component.isMaster}}
     <tr>
         <td class="summary-label">{{component.displayName}}</td>

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/oozie.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/oozie.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/oozie.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/info/summary/oozie.hbs Fri Jan 11 23:41:06 2013
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-{{#each component in controller.content.hostComponents}}
+{{#each component in controller.content.components}}
   {{#if component.isMaster}}
     <tr>
         <td class="summary-label">Server</td>

Modified: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/item.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/item.hbs?rev=1432332&r1=1432331&r2=1432332&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/item.hbs (original)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/service/item.hbs Fri Jan 11 23:41:06 2013
@@ -28,7 +28,7 @@
     <ul class="dropdown-menu">
       <!-- dropdown menu links -->
       {{#each option in view.maintenance}}
-      <li {{bindAttr class="controller.content.isStopDisabled:disabled"}}>
+      <li>
         <a {{action "doAction" option.action target="controller" href=true}}>{{option.label}}</a>
       </li>
       {{/each}}

Added: incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/test.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/test.hbs?rev=1432332&view=auto
==============================================================================
--- incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/test.hbs (added)
+++ incubator/ambari/branches/branch-1.2/ambari-web/app/templates/main/test.hbs Fri Jan 11 23:41:06 2013
@@ -0,0 +1,47 @@
+{{!
+* 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.
+}}
+
+SERVICES
+
+<div>
+  <table style="padding:10px;">
+    <thead>
+    <tr>
+      <th>Service name</th>
+      <th>Component name</th>
+      <th>Component Status</th>
+      <th>Host name</th>
+    </tr>
+    </thead>
+    <tbody>
+    {{#each view.services }}
+    <tr colspan=4>
+      <td style="padding:10px;">{{displayName}}</td>
+    </tr>
+    {{#each components}}
+      <tr>
+        <td></td>
+        <td style="padding:10px;">{{componentName}}</td>
+        <td style="padding:10px;">{{state}}</td>
+        <td style="padding:10px;">{{host_name}}</td>
+      </tr>
+    {{/each}}
+    {{/each}}
+    </tbody>
+  </table>
+</div>