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:40:26 UTC

svn commit: r1418980 [1/2] - in /incubator/ambari/branches/AMBARI-666/ambari-web/app: assets/data/wizard/stack/hdp/version/ controllers/global/ controllers/main/ controllers/main/service/ controllers/wizard/ mappers/ routes/ styles/ templates/main/serv...

Author: yusaku
Date: Sun Dec  9 14:40:20 2012
New Revision: 1418980

URL: http://svn.apache.org/viewvc?rev=1418980&view=rev
Log:
AMBARI-1059. Refactor cluster management. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/1.2.0.json
Modified:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/update_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/add_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/service_mapper.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_service_routes.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/configs.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/menu_item.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step7.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/wizard/step7_view.js

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/1.2.0.json
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/1.2.0.json?rev=1418980&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/1.2.0.json (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/data/wizard/stack/hdp/version/1.2.0.json Sun Dec  9 14:40:20 2012
@@ -0,0 +1,352 @@
+{
+  "name" : "HDP",
+  "version" : "1.2.0",
+  "repositories" : [ {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-1.2.0/repos/centos6",
+    "osType" : "centos6",
+    "repoId" : "HDP-1.2.0",
+    "repoName" : "HDP",
+    "mirrorsList" : null
+  }, {
+    "baseUrl" : null,
+    "osType" : "centos6",
+    "repoId" : "HDP-epel",
+    "repoName" : "HDP-epel",
+    "mirrorsList" : "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
+  }, {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-1.2.0/repos/centos5",
+    "osType" : "centos5",
+    "repoId" : "HDP-1.2.0",
+    "repoName" : "HDP",
+    "mirrorsList" : null
+  }, {
+    "baseUrl" : null,
+    "osType" : "centos5",
+    "repoId" : "HDP-epel",
+    "repoName" : "HDP-epel",
+    "mirrorsList" : "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
+  }, {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-1.2.0/repos/centos6",
+    "osType" : "redhat6",
+    "repoId" : "HDP-1.2.0",
+    "repoName" : "HDP",
+    "mirrorsList" : null
+  }, {
+    "baseUrl" : null,
+    "osType" : "redhat6",
+    "repoId" : "HDP-epel",
+    "repoName" : "HDP-epel",
+    "mirrorsList" : "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch"
+  }, {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-1.2.0/repos/centos5",
+    "osType" : "redhat5",
+    "repoId" : "HDP-1.2.0",
+    "repoName" : "HDP",
+    "mirrorsList" : null
+  }, {
+    "baseUrl" : null,
+    "osType" : "redhat5",
+    "repoId" : "HDP-epel",
+    "repoName" : "HDP-epel",
+    "mirrorsList" : "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch"
+  }, {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-1.2.0/repos/suse11",
+    "osType" : "suse11",
+    "repoId" : "HDP-1.2.0",
+    "repoName" : "HDP",
+    "mirrorsList" : null
+  }, {
+    "baseUrl" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.15/repos/suse11",
+    "osType" : "suse11",
+    "repoId" : "HDP-UTILS-1.1.0.15",
+    "repoName" : "HDP-UTILS",
+    "mirrorsList" : null
+  } ],
+  "services" : [ {
+    "name" : "TEMPLETON",
+    "version" : "0.1.4.1-1",
+    "user" : "root",
+    "comment" : "This is comment for TEMPLETON service",
+    "components" : [ {
+      "name" : "TEMPLETON_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "TEMPLETON_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "TEMPLETON_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "SQOOP",
+    "version" : "1.4.2.1-1",
+    "user" : "root",
+    "comment" : "Tool for transferring bulk data between Apache Hadoop and structured data stores such as relational databases",
+    "components" : [ {
+      "name" : "SQOOP",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : true,
+    "clientComponent" : {
+      "name" : "SQOOP",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "NAGIOS",
+    "version" : "1.0",
+    "user" : "root",
+    "comment" : "Nagios Monitoring and Alerting system",
+    "components" : [ {
+      "name" : "NAGIOS_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "NAGIOS_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }
+  }, {
+    "name" : "HDFS",
+    "version" : "1.1.0.1-1",
+    "user" : "root",
+    "comment" : "Apache Hadoop Distributed File System",
+    "components" : [ {
+      "name" : "NAMENODE",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "DATANODE",
+      "category" : "SLAVE",
+      "client" : false,
+      "master" : false
+    }, {
+      "name" : "SECONDARY_NAMENODE",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "HDFS_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "HDFS_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "PIG",
+    "version" : "0.10.0.1-1",
+    "user" : "root",
+    "comment" : "Scripting platform for analyzing large datasets",
+    "components" : [ {
+      "name" : "PIG",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : true,
+    "clientComponent" : {
+      "name" : "PIG",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "HBASE",
+    "version" : "0.94.2.1-1",
+    "user" : "mapred",
+    "comment" : "Non-relational distributed database and centralized service for configuration management & synchronization",
+    "components" : [ {
+      "name" : "HBASE_MASTER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "HBASE_REGIONSERVER",
+      "category" : "SLAVE",
+      "client" : false,
+      "master" : false
+    }, {
+      "name" : "HBASE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "HBASE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "ZOOKEEPER",
+    "version" : "3.4.5.1-1",
+    "user" : "root",
+    "comment" : "This is comment for ZOOKEEPER service",
+    "components" : [ {
+      "name" : "ZOOKEEPER_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "ZOOKEEPER_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "ZOOKEEPER_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "GANGLIA",
+    "version" : "1.0",
+    "user" : "root",
+    "comment" : "Ganglia Metrics Collection system",
+    "components" : [ {
+      "name" : "GANGLIA_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "GANGLIA_MONITOR",
+      "category" : "SLAVE",
+      "client" : false,
+      "master" : false
+    }, {
+      "name" : "MONITOR_WEBSERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "GANGLIA_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }
+  }, {
+    "name" : "HCATALOG",
+    "version" : "0.4.0.1-1",
+    "user" : "root",
+    "comment" : "This is comment for HCATALOG service",
+    "components" : [ {
+      "name" : "HCAT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : true,
+    "clientComponent" : {
+      "name" : "HCAT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "HIVE",
+    "version" : "0.9.0.1-1",
+    "user" : "root",
+    "comment" : "Data warehouse system for ad-hoc queries & analysis of large datasets and table & storage management service",
+    "components" : [ {
+      "name" : "HIVE_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "MYSQL_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "HIVE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "HIVE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "OOZIE",
+    "version" : "3.2.0.1-1",
+    "user" : "root",
+    "comment" : "System for workflow coordination and execution of Apache Hadoop jobs",
+    "components" : [ {
+      "name" : "OOZIE_SERVER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "OOZIE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "OOZIE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  }, {
+    "name" : "MAPREDUCE",
+    "version" : "1.1.0.1-1",
+    "user" : "mapred",
+    "comment" : "Apache Hadoop Distributed Processing Framework",
+    "components" : [ {
+      "name" : "JOBTRACKER",
+      "category" : "MASTER",
+      "client" : false,
+      "master" : true
+    }, {
+      "name" : "TASKTRACKER",
+      "category" : "SLAVE",
+      "client" : false,
+      "master" : false
+    }, {
+      "name" : "MAPREDUCE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    } ],
+    "clientOnlyService" : false,
+    "clientComponent" : {
+      "name" : "MAPREDUCE_CLIENT",
+      "category" : "CLIENT",
+      "client" : true,
+      "master" : false
+    }
+  } ]
+}
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/cluster_controller.js Sun Dec  9 14:40:20 2012
@@ -345,8 +345,9 @@ App.ClusterController = Em.Controller.ex
       self.updateLoadStatus('users');
     });
 
-    //TODO: define dependencies and delete next line
-    self.updateLoadStatus('services');
+    App.router.get('updateController').updateServiceMetric(function(){
+      self.updateLoadStatus('services');
+    });
 
     setTimeout(function(){
       self.set('updateStatus', true);

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/update_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/update_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/update_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/global/update_controller.js Sun Dec  9 14:40:20 2012
@@ -77,33 +77,25 @@ App.UpdateController = Em.Controller.ext
         if (view) {
           existedGraphs.push(_graph);
           console.log('updated graph', _graph.name);
-          view.$(".chart-container").children().each(function (index, value) {
-            $(value).children().remove();
-          });
           view.loadData();
-          //if graph opened as modal popup
-          if($(".modal-graph-line .modal-body #" + _graph.popupId + "-container-popup").length){
-            view.$(".chart-container").children().each(function (index, value) {
-              $(value).children().remove();
-            });
-            $(".modal-graph-line .modal-body #" + _graph.popupId + "-container-popup").children().each(function (index, value) {
-              $(value).children().remove();
-            });
-            view.set('isPopup', true);
+          //if graph opened as modal popup update it to
+          if($(".modal-graph-line .modal-body #" + _graph.popupId + "-container-popup").length) {
             view.loadData();
           }
         }
       });
       this.set('graphs', existedGraphs);
   },
-  updateServiceMetric:function(){
-
+  updateServiceMetric:function(callback){
+    var self = this;
+    self.set('isUpdated', false);
     var servicesUrl = this.getUrl('/data/dashboard/services.json', '/services?ServiceInfo/service_name!=MISCELLANEOUS&ServiceInfo/service_name!=DASHBOARD&fields=*,components/host_components/*');
+    var callback = callback || function(jqXHR, textStatus){
+      self.set('isUpdated', true);
+    };
 
     App.HttpClient.get(servicesUrl, App.servicesMapper, {
-      complete:function (jqXHR, textStatus) {
-
-      }
+      complete: callback
     });
   }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service.js Sun Dec  9 14:40:20 2012
@@ -20,7 +20,12 @@ var App = require('app');
 
 App.MainServiceController = Em.ArrayController.extend({
   name:'mainServiceController',
-  content: App.Service.find(),
+  content: function(){
+    if(!App.router.get('clusterController.isLoaded')){
+      return [];
+    }
+    return App.Service.find();
+  }.property('App.router.clusterController.isLoaded'),
   additionalMenuItem:Em.Object.create({ id:'Clients', displayName:'Clients', isClients:true }),
   isAdmin: function(){
     return App.db.getUser().admin;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/add_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/add_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/add_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/service/add_controller.js Sun Dec  9 14:40:20 2012
@@ -211,17 +211,18 @@ App.AddServiceController = Em.Controller
   loadConfirmedHosts: function(){
     var hosts = App.db.getHosts();
     if(!hosts){
-    var hosts = {};
+      var hosts = {};
 
-    App.Host.find().forEach(function(item){
-      hosts[item.get('id')] = {
-        name: item.get('id'),
-        cpu: item.get('cpu'),
-        memory: item.get('memory'),
-        bootStatus: "success",
-        isInstalled: true
-      };
-    });
+      App.Host.find().forEach(function(item){
+        hosts[item.get('id')] = {
+          name: item.get('id'),
+          cpu: item.get('cpu'),
+          memory: item.get('memory'),
+          bootStatus: "DONE",
+          isInstalled: true
+        };
+      });
+      App.db.setHosts(hosts);
     }
 
     this.set('content.hostsInfo', hosts);

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step3_controller.js Sun Dec  9 14:40:20 2012
@@ -48,11 +48,6 @@ App.WizardStep3Controller = Em.Controlle
         this.startBootstrap();
       }
     } else {
-      // TODO: assume manually bootstrapped hosts are all successful for now
-      this.get('hosts').forEach(function (_host) {
-        _host.set('bootStatus', 'DONE');
-        _host.set('bootLog', 'Success');
-      });
       this.set('bootHosts', this.get('hosts'));
       this.isHostsRegistered(this.getHostInfo);
     }
@@ -60,6 +55,7 @@ App.WizardStep3Controller = Em.Controlle
 
   clearStep: function () {
     this.hosts.clear();
+    this.bootHosts.clear();
   },
 
   loadStep: function () {
@@ -166,10 +162,12 @@ App.WizardStep3Controller = Em.Controlle
         });
 
         //TODO: uncomment below code to hookup with @GET bootstrap API
-        /*
-         self.set('bootHosts',selectedHosts);
-         self.doBootstrap();
-         */
+        self.set('bootHosts', hosts);
+        if (self.get('content.hosts.manualInstall') !== true) {
+          self.doBootstrap();
+        } else {
+          self.isHostsRegistered(self.getHostInfo);
+        }
         this.hide();
       },
       body: Em.I18n.t('installer.step3.hosts.retry.popup.body')
@@ -237,7 +235,9 @@ App.WizardStep3Controller = Em.Controlle
     //TODO: uncomment following line after the hook up with the API call
     console.log('stopBootstrap() called');
     // this.set('isSubmitDisabled',false);
-    this.startRegistration();
+    Ember.run.later(this, function(){
+      this.startRegistration();
+    }, 1000);
   },
 
   startRegistration: function () {
@@ -255,7 +255,7 @@ App.WizardStep3Controller = Em.Controlle
       timeout: App.timeout,
       success: function (data) {
         var jsonData;
-        if (App.testMode) {
+        if (App.testMode === true) {
           jsonData = data;
         } else {
           jsonData = jQuery.parseJSON(data);
@@ -276,7 +276,16 @@ App.WizardStep3Controller = Em.Controlle
             return;
           }
         }
-        if (hosts.length === jsonData.items.length) {
+        var flag = true;
+        hosts.forEach(function (_host) {
+          if (jsonData.items.someProperty('Hosts.host_name', _host.name)) {
+            _host.set('bootStatus', 'DONE');
+            _host.set('bootLog', 'Success');
+          } else {
+            flag = false;
+          }
+        }, this);
+        if (flag) {
           callback.apply(self);
         } else {
           self.registerErrPopup(Em.I18n.t('installer.step3.hostRegister.popup.header'), Em.I18n.t('installer.step3.hostRegister.popup.body'));
@@ -284,7 +293,6 @@ App.WizardStep3Controller = Em.Controlle
       },
       error: function () {
         console.log('Error: Getting registered host information from the server');
-        self.stopBootstrap();
       },
       statusCode: require('data/statusCodes')
     });

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js Sun Dec  9 14:40:20 2012
@@ -43,7 +43,7 @@ App.WizardStep7Controller = Em.Controlle
   }.property('stepConfigs.@each.errorCount'),
 
   selectedServiceNames: function () {
-    return this.get('content.services').filterProperty('isSelected', true).mapProperty('serviceName');
+    return this.get('content.services').filterProperty('isSelected', true).filterProperty('isInstalled', false).mapProperty('serviceName');
   }.property('content.services').cacheable(),
 
   masterComponentHosts: function () {

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js Sun Dec  9 14:40:20 2012
@@ -734,6 +734,10 @@ App.WizardStep8Controller = Em.Controlle
     var clusterName = this.get('clusterInfo').findProperty('config_name', 'cluster').config_value;
     var url = App.apiPrefix + '/clusters/' + clusterName + '/hosts';
     var data = this.createRegisterHostData();
+    if(data.length == 0){
+      return;
+    }
+
     $.ajax({
       type: 'POST',
       url: url,
@@ -1079,6 +1083,8 @@ App.WizardStep8Controller = Em.Controlle
         return {config: {'global': 'version1', 'core-site': 'version1', 'hbase-site': 'version1'}};
       case 'OOZIE':
         return {config: {'global': 'version1', 'core-site': 'version1', 'oozie-site': 'version1'}};
+      default:
+        return {config: {'global': 'version1'}};
     }
   }
 

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step9_controller.js Sun Dec  9 14:40:20 2012
@@ -49,15 +49,18 @@ App.WizardStep9Controller = Em.Controlle
 
   navigateStep: function () {
     if (this.get('content.cluster.isCompleted') === false) {
-      this.loadStep();
       if (this.get('content.cluster.status') === 'INSTALL FAILED') {
+        this.loadStep();
         this.hosts.setEach('status', 'failed');
         this.set('progress', '100');
         this.set('isStepCompleted', true);
         //this.set('status', 'failed');
       } else if (this.get('content.cluster.status') === 'START FAILED') {
+        this.hosts.setEach('status', 'info');
+        this.set('isStepCompleted', false);
         this.launchStartServices();
       } else {
+        this.loadStep();
         this.startPolling();
       }
     } else {
@@ -288,7 +291,6 @@ App.WizardStep9Controller = Em.Controlle
     var progress = 0;
     var actionsPerHost = actions.length;
     var completedActions = actions.filterProperty('Tasks.status', 'COMPLETED').length
-      + actions.filterProperty('Tasks.status', 'IN_PROGRESS').length
       + actions.filterProperty('Tasks.status', 'FAILED').length
       + actions.filterProperty('Tasks.status', 'ABORTED').length
       + actions.filterProperty('Tasks.status', 'TIMEDOUT').length;
@@ -421,7 +423,6 @@ App.WizardStep9Controller = Em.Controlle
   },
 
   setTasksPerHost: function () {
-    console.log("In setTasksPerHost fo step9*****************");
     var tasksData = this.get('polledData');
     this.get('hosts').forEach(function (_host) {
       var tasksPerHost = tasksData.filterProperty('Tasks.host_name', _host.name); // retrieved from polled Data

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/hosts_mapper.js Sun Dec  9 14:40:20 2012
@@ -17,6 +17,7 @@
 
 App.hostsMapper = App.QuickDataMapper.create({
   model: App.Host,
+  tmp_result:[],
   config: {
     id: 'Hosts.host_name',
     host_name: 'Hosts.host_name',
@@ -59,6 +60,7 @@ App.hostsMapper = App.QuickDataMapper.cr
 
       json.items.forEach(function (item) {
         var result = [];
+        self.tmp_result=[];
 
         // Disk Usage
         if (item.metrics && item.metrics.disk && item.metrics.disk.disk_total && item.metrics.disk.disk_free) {
@@ -80,26 +82,20 @@ App.hostsMapper = App.QuickDataMapper.cr
 
         if(App.Host.find(item.Hosts.host_name).get("hostName") == item.Hosts.host_name){ // UPDATE
 
-         /* App.Host.find(item.Hosts.host_name).set("ip", item.Hosts.ip);
-          App.Host.find(item.Hosts.host_name).set("cpu", item.Hosts.cpu_count);
-          App.Host.find(item.Hosts.host_name).set("osArch", item.Hosts.os_arch);
-          App.Host.find(item.Hosts.host_name).set("osType", item.Hosts.os_type);
-          App.Host.find(item.Hosts.host_name).set("memory", item.Hosts.total_mem);
-          if(typeof item.Hosts.load !=="undefined"){
-            App.Host.find(item.Hosts.host_name).set("loadOne", item.Hosts.load.load_one);
-            App.Host.find(item.Hosts.host_name).set("loadFive", item.Hosts.load.load_five);
-            App.Host.find(item.Hosts.host_name).set("loadFifteen", item.Hosts.load.load_fifteen);
-          }
           App.Host.find(item.Hosts.host_name).set("cpuUsage", item.cpu_usage);
           App.Host.find(item.Hosts.host_name).set("diskUsage", item.disk_usage);
-          App.Host.find(item.Hosts.host_name).set("memoryUsage", item.memory_usage);*/
+          App.Host.find(item.Hosts.host_name).set("memoryUsage", item.memory_usage);
 
-          $.map(item.Hosts, function (e,a){
+          self.tmp_result.push(this.parseIt(item, this.config));
+
+          $.map(self.tmp_result[0], function (e,a){
+            //console.log(a, "------------------", self.tmp_result[0][a])
             if(typeof(e) === "string" || typeof(e) === "number")
             {
               var modelName=self.parseName(a);
-              if(typeof(App.Host.find(item.Hosts.host_name).get(modelName)) !== "undefined"){
-                App.Host.find(item.Hosts.host_name).set(modelName, item.Hosts[a]);
+              if(typeof(App.Host.find(self.tmp_result[0].host_name).get(modelName)) !== "undefined"){
+                App.Host.find(self.tmp_result[0].host_name).set(modelName, self.tmp_result[0][a]);
+               // console.log(modelName, "------------------", self.tmp_result[0][a])
               }
             }
           })
@@ -114,7 +110,6 @@ App.hostsMapper = App.QuickDataMapper.cr
 
         }
       }, this);
-
       // console.log(this.get('model'), result);
 
     }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/service_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/service_mapper.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/mappers/service_mapper.js Sun Dec  9 14:40:20 2012
@@ -16,7 +16,6 @@
  */
 
 App.servicesMapper = App.QuickDataMapper.create({
-  model:App.Service,
   servicesSortOrder: [
     'HDFS',
     'MAPREDUCE',
@@ -39,123 +38,230 @@ App.servicesMapper = App.QuickDataMapper
       }
     return sorted;
   },
-  config:{
-    id:'ServiceInfo.service_name',
-    service_name:'ServiceInfo.service_name',
-    work_status:'ServiceInfo.state',
-    $service_audit:[ 1, 2, 3 ],
-    $alerts:[ 1, 2, 3 ],
-    components_key:'components',
-    components_type:'array',
-    components:{
-      item:'ServiceComponentInfo.component_name'
+
+  model: App.Service,
+  config: {
+    id: 'ServiceInfo.service_name',
+    service_name: 'ServiceInfo.service_name',
+    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'
+    host_components: 'host_components'
+  },
+  hdfsConfig: {
+    version: 'nameNodeComponent.ServiceComponentInfo.Version',
+    name_node_id: 'nameNodeComponent.host_components[0].HostRoles.host_name',
+    sname_node_id: 'snameNodeComponent.host_components[0].HostRoles.host_name',
+    data_nodes: 'data_nodes',
+    name_node_start_time: 'nameNodeComponent.ServiceComponentInfo.StartTime',
+    jvm_memory_heap_used: 'nameNodeComponent.host_components[0].metrics.jvm.memHeapUsedM',
+    jvm_memory_heap_committed: 'nameNodeComponent.host_components[0].metrics.jvm.memHeapCommittedM',
+    live_data_nodes: 'live_data_nodes',
+    dead_data_nodes: 'dead_data_nodes',
+    decommision_data_nodes: 'decommission_data_nodes',
+    capacity_used: 'nameNodeComponent.ServiceComponentInfo.CapacityUsed',
+    capacity_total: 'nameNodeComponent.ServiceComponentInfo.CapacityTotal',
+    dfs_total_blocks: 'nameNodeComponent.ServiceComponentInfo.BlocksTotal',
+    dfs_corrupt_blocks: 'nameNodeComponent.ServiceComponentInfo.CorruptBlocks',
+    dfs_missing_blocks: 'nameNodeComponent.ServiceComponentInfo.MissingBlocks',
+    dfs_under_replicated_blocks: 'nameNodeComponent.ServiceComponentInfo.UnderReplicatedBlocks',
+    dfs_total_files: 'nameNodeComponent.ServiceComponentInfo.TotalFiles',
+    upgrade_status: 'nameNodeComponent.ServiceComponentInfo.UpgradeFinalized',
+    safe_mode_status: 'nameNodeComponent.ServiceComponentInfo.Safemode'
+  },
+  mapReduceConfig: {
+    version: 'jobTrackerComponent.ServiceComponentInfo.Version',
+    job_tracker_id: 'jobTrackerComponent.host_components[0].HostRoles.host_name',
+    task_trackers: 'task_trackers',
+    job_tracker_start_time: 'jobTrackerComponent.ServiceComponentInfo.StartTime',
+    job_tracker_heap_used: 'jobTrackerComponent.ServiceComponentInfo.HeapMemoryUsed',
+    job_tracker_heap_max: 'jobTrackerComponent.ServiceComponentInfo.HeapMemoryMax',
+    alive_trackers: 'alive_trackers',
+    black_list_trackers: 'black_list_trackers',
+    gray_list_trackers: 'gray_list_trackers',
+    map_slots: 'map_slots',
+    reduce_slots: 'reduce_slots',
+    jobs_submitted: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.jobs_submitted',
+    jobs_completed: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.jobs_completed',
+    map_slots_occupied: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.occupied_map_slots',
+    map_slots_reserved: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.reserved_map_slots',
+    reduce_slots_occupied: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.occupied_reduce_slots',
+    reduce_slots_reserved: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.reserved_reduce_slots',
+    maps_running: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.running_maps',
+    maps_waiting: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.waiting_maps',
+    reduces_running: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.running_reduces',
+    reduces_waiting: 'jobTrackerComponent.ServiceComponentInfo.jobtracker.waiting_reduces',
+    trackers_decommisioned: 'jobTrackerComponent.host_components[0].metrics.mapred.jobtracker.trackers_decommissioned'
+  },
+  hbaseConfig: {
+    version: 'masterComponent.ServiceComponentInfo.Version',
+    master_id: 'masterComponent.host_components[0].HostRoles.host_name',
+    region_servers: 'region_servers',
+    master_start_time: 'masterComponent.ServiceComponentInfo.MasterStartTime',
+    master_active_time: 'masterComponent.ServiceComponentInfo.MasterActiveTime',
+    average_load: 'masterComponent.ServiceComponentInfo.AverageLoad',
+    regions_in_transition: 'regions_in_transition',
+    revision: 'masterComponent.ServiceComponentInfo.Revision',
+    heap_memory_used: 'masterComponent.ServiceComponentInfo.HeapMemoryUsed',
+    heap_memory_max: 'masterComponent.ServiceComponentInfo.HeapMemoryMax'
+  },
+
+  model2: App.Component,
+  config2: {
+    id: 'ServiceComponentInfo.component_name',
+    component_name: 'ServiceComponentInfo.component_name',
+    service_id: 'ServiceComponentInfo.service_name',
+    work_status: 'host_components[0].HostRoles.state',
+    host_id: 'host_components[0].HostRoles.host_name',
+    $decommissioned: false
+  },
+
+  model3: App.HostComponent,
+  config3: {
+    id: 'id',
+    work_status: 'HostRoles.state',
+    component_name: 'HostRoles.component_name',
+    host_id: 'HostRoles.host_name',
+    service_id: 'component[0].ServiceComponentInfo.service_name'
   },
 
-  hdfsConfig:{
-    version:'nameNodeComponent.ServiceComponentInfo.Version',
-    name_node_id:'nameNodeComponent.host_components[0].HostRoles.host_name',
-    sname_node_id:'snameNodeComponent.host_components[0].HostRoles.host_name',
-    data_nodes:'data_nodes',
-    name_node_start_time:'nameNodeComponent.ServiceComponentInfo.StartTime',
-    jvm_memory_heap_used:'nameNodeComponent.host_components[0].metrics.jvm.memHeapUsedM',
-    jvm_memory_heap_committed:'nameNodeComponent.host_components[0].metrics.jvm.memHeapCommittedM',
-    live_data_nodes:'live_data_nodes',
-    dead_data_nodes:'dead_data_nodes',
-    decommision_data_nodes:'decommission_data_nodes',
-    capacity_used:'nameNodeComponent.ServiceComponentInfo.CapacityUsed',
-    capacity_total:'nameNodeComponent.ServiceComponentInfo.CapacityTotal',
-    dfs_total_blocks:'nameNodeComponent.ServiceComponentInfo.BlocksTotal',
-    dfs_corrupt_blocks:'nameNodeComponent.ServiceComponentInfo.CorruptBlocks',
-    dfs_missing_blocks:'nameNodeComponent.ServiceComponentInfo.MissingBlocks',
-    dfs_under_replicated_blocks:'nameNodeComponent.ServiceComponentInfo.UnderReplicatedBlocks',
-    dfs_total_files:'nameNodeComponent.ServiceComponentInfo.TotalFiles',
-    upgrade_status:'nameNodeComponent.ServiceComponentInfo.UpgradeFinalized',
-    safe_mode_status:'nameNodeComponent.ServiceComponentInfo.Safemode'
-  },
-
-  mapReduceConfig:{
-    version:'jobTrackerComponent.ServiceComponentInfo.Version',
-    job_tracker_id:'jobTrackerComponent.host_components[0].HostRoles.host_name',
-    task_trackers:'task_trackers',
-    job_tracker_start_time:'jobTrackerComponent.ServiceComponentInfo.StartTime',
-    job_tracker_heap_used:'jobTrackerComponent.ServiceComponentInfo.HeapMemoryUsed',
-    job_tracker_heap_max:'jobTrackerComponent.ServiceComponentInfo.HeapMemoryMax',
-    alive_trackers:'alive_trackers',
-    black_list_trackers:'black_list_trackers',
-    gray_list_trackers:'gray_list_trackers',
-    map_slots:'map_slots',
-    reduce_slots:'reduce_slots',
-    jobs_submitted:'jobTrackerComponent.ServiceComponentInfo.jobtracker.jobs_submitted',
-    jobs_completed:'jobTrackerComponent.ServiceComponentInfo.jobtracker.jobs_completed',
-    map_slots_occupied:'jobTrackerComponent.ServiceComponentInfo.jobtracker.occupied_map_slots',
-    map_slots_reserved:'jobTrackerComponent.ServiceComponentInfo.jobtracker.reserved_map_slots',
-    reduce_slots_occupied:'jobTrackerComponent.ServiceComponentInfo.jobtracker.occupied_reduce_slots',
-    reduce_slots_reserved:'jobTrackerComponent.ServiceComponentInfo.jobtracker.reserved_reduce_slots',
-    maps_running:'jobTrackerComponent.ServiceComponentInfo.jobtracker.running_maps',
-    maps_waiting:'jobTrackerComponent.ServiceComponentInfo.jobtracker.waiting_maps',
-    reduces_running:'jobTrackerComponent.ServiceComponentInfo.jobtracker.running_reduces',
-    reduces_waiting:'jobTrackerComponent.ServiceComponentInfo.jobtracker.waiting_reduces',
-    trackers_decommisioned:'jobTrackerComponent.host_components[0].metrics.mapred.jobtracker.trackers_decommissioned'
-  },
-
-  hbaseConfig:{
-    version:'masterComponent.ServiceComponentInfo.Version',
-    master_id:'masterComponent.host_components[0].HostRoles.host_name',
-    region_servers:'region_servers',
-    master_start_time:'masterComponent.ServiceComponentInfo.MasterStartTime',
-    master_active_time:'masterComponent.ServiceComponentInfo.MasterActiveTime',
-    average_load:'masterComponent.ServiceComponentInfo.AverageLoad',
-    regions_in_transition:'regions_in_transition',
-    revision:'masterComponent.ServiceComponentInfo.Revision',
-    heap_memory_used:'masterComponent.ServiceComponentInfo.HeapMemoryUsed',
-    heap_memory_max:'masterComponent.ServiceComponentInfo.HeapMemoryMax'
-  },
-
-  model2:App.Component,
-  config2:{
-    id:'ServiceComponentInfo.component_name',
-    component_name:'ServiceComponentInfo.component_name',
-    service_id:'ServiceComponentInfo.service_name',
-    work_status:'host_components[0].HostRoles.state',
-    host_id:'host_components[0].HostRoles.host_name',
-    $decommissioned:false
-  },
-  model3:App.HostComponent,
-  config3:{
-    id:'id',
-    work_status:'HostRoles.state',
-    component_name:'HostRoles.component_name',
-    host_id:'HostRoles.host_name',
-    service_id:'component[0].ServiceComponentInfo.service_name'
+  map: function (json) {
+    if (!this.get('model')) {
+      return;
+    }
+
+    if (json.items) {
+      var result = [];
+      json.items.forEach(function (item) {
+        var finalConfig = jQuery.extend({}, this.config);
+        var finalJson = [];
+        item.host_components = [];
+        if (this.get('model').find(item.ServiceInfo.service_name).get('isLoaded')) {
+          this.update(item);
+          return;
+        }
+        item.components.forEach(function (component) {
+          component.host_components.forEach(function (host_component) {
+            host_component.id = host_component.HostRoles.component_name + "_" + host_component.HostRoles.host_name;
+            item.host_components.push(host_component.id);
+          }, this)
+        }, this);
+
+        if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HDFS") {
+          // Change the JSON so that it is easy to map
+          finalJson = this.hdfsMapper(item);
+          result.push(finalJson);
+          App.store.load(App.HDFSService, finalJson);
+        } else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "MAPREDUCE") {
+          finalJson = this.mapreduceMapper(item);
+          result.push(finalJson);
+          App.store.load(App.MapReduceService, finalJson);
+        } else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HBASE") {
+          finalJson = this.hbaseMapper(item);
+          result.push(finalJson);
+          App.store.load(App.HBaseService, finalJson);
+        } else {
+          result.push(this.parseIt(item, this.config));
+        }
+      }, this);
+
+
+      result = this.sortByOrder(this.get('servicesSortOrder'), result);
+      App.store.loadMany(this.get('model'), result);
+
+      result = [];
+      json.items.forEach(function (item) {
+        item.components.forEach(function (component) {
+          result.push(this.parseIt(component, this.config2));
+        }, this)
+      }, this);
+
+      App.store.loadMany(this.get('model2'), result);
+
+      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)
+        }, this)
+      }, this);
+      App.store.loadMany(this.get('model3'), result);
+    }
   },
-  update: function(service){
-    switch(service.ServiceInfo.service_name){
+  update: function (service) {
+    var finalJson;
+    switch (service.ServiceInfo.service_name) {
       case 'HDFS':
-        this.hdfsMapper(service);
+        finalJson = this.hdfsMapper(service);
+        App.HDFSService.find().map(function (e) {
+          e.set("version", finalJson.version);
+          e.set("nameNodeStartTime", finalJson.name_node_start_time);
+          e.set("jvmMemoryHeapCommitted", finalJson.jvm_memory_heap_committed);
+          e.set("jvmMemoryHeapUsed", finalJson.jvm_memory_heap_used);
+          e.set("capacityUsed", finalJson.capacity_used);
+          e.set("capacityTotal", finalJson.capacity_total);
+          e.set("dfsTotalBlocks", finalJson.dfs_total_blocks);
+          e.set("dfsCorruptBlocks", finalJson.dfs_corrupt_blocks);
+          e.set("dfsMissingBlocks", finalJson.dfs_missing_blocks);
+          e.set("dfsUnderReplicatedBlocks", finalJson.dfs_under_replicated_blocks);
+          e.set("dfsTotalFiles", finalJson.dfs_total_files);
+          e.set("upgradeStatus", finalJson.upgrade_status);
+          e.set("safeModeStatus", finalJson.safe_mode_status);
+        });
         break;
       case 'MAPREDUCE':
-        this.mapreduceMapper(service);
+        finalJson = this.mapreduceMapper(service);
+        App.MapReduceService.find().map(function (e) {
+          e.set("version", finalJson.version);
+          e.set("jobTrackerStartTime", 1111111);
+          e.set("jobTrackerHeapUsed", finalJson.job_tracker_heap_used);
+          e.set("jobTrackerHeapMax", finalJson.job_tracker_heap_max);
+          e.set("mapSlots", finalJson.map_slots);
+          e.set("reduceSlots", finalJson.reduce_slots);
+          e.set("jobsSubmitted", finalJson.jobs_submitted);
+          e.set("jobsCompleted", finalJson.jobs_completed);
+          e.set("mapSlotsOccupied", finalJson.map_slots_occupied);
+          e.set("mapSlotsReserved", finalJson.map_slots_reserved);
+          e.set("reduceSlotsOccupied", finalJson.reduce_slots_occupied);
+          e.set("reduceSlotsReserved", finalJson.reduce_slots_reserved);
+          e.set("mapsRunning", finalJson.maps_running);
+          e.set("mapsWaiting", finalJson.maps_waiting);
+          e.set("reducesRunning", finalJson.reduces_running);
+          e.set("reducesWaiting", finalJson.reduces_waiting);
+          e.set("trackersDecommisioned", finalJson.trackers_decommisioned);
+        })
         break;
       case 'HBASE':
-        this.hbaseMapper(service);
+        finalJson = this.hbaseMapper(service);
+        App.HBaseService.find().map(function (e) {
+          e.set("version", finalJson.version);
+          e.set("masterStartTime", finalJson.master_start_time);
+          e.set("masterActiveTime", finalJson.master_active_time);
+          e.set("averageLoad", finalJson.average_load);
+          e.set("regionsInTransition", finalJson.regions_in_transition);
+          e.set("revision", finalJson.revision);
+          e.set("heapMemoryUsed", finalJson.heap_memory_used);
+          e.set("heapMemoryMax", finalJson.heap_memory_max);
+        })
         break;
       default :
         this.otherMapper(service);
     }
   },
-  otherMapper:function(item){
-    var result=[];
-    if(App.Service.find(item.ServiceInfo.service_name).get("serviceName") == item.ServiceInfo.service_name )
-    {
-      return;
+  otherMapper: function (item) {
+    var result = [];
+    if (App.Service.find(item.ServiceInfo.service_name).get("serviceName") == item.ServiceInfo.service_name) {
+      //update other service
     }
-    result.push(this.parseIt(item, this.config));
-    App.store.loadMany(App.Service, result);
   },
-  hdfsMapper:function(item){
-    var result=[];
+  hdfsMapper: function (item) {
+    var result = [];
     var finalConfig = jQuery.extend({}, this.config);
     // Change the JSON so that it is easy to map
     var hdfsConfig = this.hdfsConfig;
@@ -198,26 +304,11 @@ App.servicesMapper = App.QuickDataMapper
     var finalJson = this.parseIt(item, finalConfig);
     finalJson.quick_links = [1, 2, 3, 4];
 
-
-      App.HDFSService.find().map(function(e){
-        e.set("version",finalJson.version);
-        e.set("nameNodeStartTime",finalJson.name_node_start_time);
-        e.set("jvmMemoryHeapCommitted",finalJson.jvm_memory_heap_committed);
-        e.set("capacityUsed",finalJson.capacity_used);
-        e.set("capacityTotal",finalJson.capacity_total);
-        e.set("dfsTotalBlocks",finalJson.dfs_total_blocks);
-        e.set("dfsCorruptBlocks",finalJson.dfs_corrupt_blocks);
-        e.set("dfsMissingBlocks",finalJson.dfs_missing_blocks);
-        e.set("dfsUnderReplicatedBlocks",finalJson.dfs_under_replicated_blocks);
-        e.set("dfsTotalFiles",finalJson.dfs_total_files);
-        e.set("upgradeStatus",finalJson.upgrade_status);
-        e.set("safeModeStatus",finalJson.safe_mode_status);
-      })
-
+    return finalJson;
   },
-  mapreduceMapper:function(item){
+  mapreduceMapper: function (item) {
     // Change the JSON so that it is easy to map
-    var result=[];
+    var result = [];
     var finalConfig = jQuery.extend({}, this.config);
     var mapReduceConfig = this.mapReduceConfig;
     item.components.forEach(function (component) {
@@ -271,40 +362,11 @@ App.servicesMapper = App.QuickDataMapper
     // Map
     finalJson = this.parseIt(item, finalConfig);
     finalJson.quick_links = [5, 6, 7, 8, 9, 10, 11, 12];
-
-    if(App.MapReduceService.find().get("content").length<1)
-    {
-      result.push(finalJson);
-      App.store.load(App.MapReduceService, finalJson);
-      App.store.loadMany(App.Service, result);
-    }else
-    {
-      App.MapReduceService.find().map(function(e){
-        e.set("version",finalJson.version);
-        e.set("jobTrackerStartTime",finalJson.job_tracker_start_time);
-        e.set("jobTrackerHeapUsed",finalJson.job_tracker_heap_used);
-        e.set("jobTrackerHeapMax",finalJson.job_tracker_heap_max);
-        e.set("mapSlots",finalJson.map_slots);
-        e.set("reduceSlots",finalJson.reduce_slots);
-        e.set("jobsSubmitted",finalJson.jobs_submitted);
-        e.set("jobsCompleted",finalJson.jobs_completed);
-        e.set("mapSlotsOccupied",finalJson.map_slots_occupied);
-        e.set("mapSlotsReserved",finalJson.map_slots_reserved);
-        e.set("reduceSlotsOccupied",finalJson.reduce_slots_occupied);
-        e.set("reduceSlotsReserved",finalJson.reduce_slots_reserved);
-        e.set("mapsRunning",finalJson.maps_running);
-        e.set("mapsWaiting",finalJson.maps_waiting);
-        e.set("reducesRunning",finalJson.reduces_running);
-        e.set("reducesWaiting",finalJson.reduces_waiting);
-        e.set("trackersDecommisioned",finalJson.trackers_decommisioned);
-      })
-    }
-
-
+    return finalJson;
   },
-  hbaseMapper:function(item){
+  hbaseMapper: function (item) {
     // Change the JSON so that it is easy to map
-    var result=[];
+    var result = [];
     var finalConfig = jQuery.extend({}, this.config);
     var hbaseConfig = this.hbaseConfig;
     item.components.forEach(function (component) {
@@ -328,201 +390,6 @@ App.servicesMapper = App.QuickDataMapper
     // Map
     finalJson = this.parseIt(item, finalConfig);
     finalJson.quick_links = [13, 14, 15, 16, 17, 18];
-
-    if(App.HBaseService.find().get("content").length<1)
-    {
-      result.push(finalJson);
-      App.store.load(App.HBaseService, finalJson);
-      App.store.loadMany(App.Service, result);
-    }else
-    {
-      App.HBaseService.find().map(function(e){
-        e.set("version",finalJson.version);
-        e.set("masterStartTime",finalJson.master_start_time);
-        e.set("masterActiveTime",finalJson.master_active_time);
-        e.set("averageLoad",finalJson.average_load);
-        e.set("regionsInTransition",finalJson.regions_in_transition);
-        e.set("revision",finalJson.revision);
-        e.set("heapMemoryUsed",finalJson.heap_memory_used);
-        e.set("heapMemoryMax",finalJson.heap_memory_max);
-      })
-    }
-  },
-  map:function (json) {
-    if (!this.get('model')) {
-      return;
-    }
-
-    if (json.items) {
-      var result = [];
-      json.items.forEach(function (item) {
-        var finalConfig = jQuery.extend({}, this.config);
-        item.host_components = [];
-        if(this.get('model').find(item.ServiceInfo.service_name).get('isLoaded')){
-          this.update(item);
-          return;
-        }
-        item.components.forEach(function (component) {
-          component.host_components.forEach(function (host_component) {
-            host_component.id = host_component.HostRoles.component_name + "_" + host_component.HostRoles.host_name;
-            item.host_components.push(host_component.id);
-          }, this)
-        }, this);
-
-        if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HDFS") {
-          // Change the JSON so that it is easy to map
-          var hdfsConfig = this.hdfsConfig;
-          item.components.forEach(function (component) {
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "NAMENODE") {
-              item.nameNodeComponent = component;
-              finalConfig = jQuery.extend(finalConfig, hdfsConfig);
-              // Get the live, dead & decommision nodes from string json
-              var liveNodesJson = App.parseJSON(component.ServiceComponentInfo.LiveNodes);
-              var deadNodesJson = App.parseJSON(component.ServiceComponentInfo.DeadNodes);
-              var decommisionNodesJson = App.parseJSON(component.ServiceComponentInfo.DecomNodes);
-              item.live_data_nodes = [];
-              item.dead_data_nodes = [];
-              item.decommision_data_nodes = [];
-              for (var ln in liveNodesJson) {
-                item.live_data_nodes.push(ln);
-              }
-              for (var dn in deadNodesJson) {
-                item.dead_data_nodes.push(dn);
-              }
-              for (var dcn in decommisionNodesJson) {
-                item.decommision_data_nodes.push(dcn);
-              }
-            }
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "SECONDARY_NAMENODE") {
-              item.snameNodeComponent = component;
-            }
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "DATANODE") {
-              if (!item.data_nodes) {
-                item.data_nodes = [];
-              }
-              if (component.host_components) {
-                component.host_components.forEach(function (hc) {
-                  item.data_nodes.push(hc.HostRoles.host_name);
-                });
-              }
-            }
-          });
-          // Map
-          var finalJson = this.parseIt(item, finalConfig);
-          finalJson.quick_links = [1, 2, 3, 4];
-          result.push(finalJson);
-          App.store.load(App.HDFSService, finalJson);
-        } else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "MAPREDUCE") {
-          // Change the JSON so that it is easy to map
-          var mapReduceConfig = this.mapReduceConfig;
-          item.components.forEach(function (component) {
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "JOBTRACKER") {
-              item.jobTrackerComponent = component;
-              finalConfig = jQuery.extend(finalConfig, mapReduceConfig);
-              // Get the live, gray & black nodes from string json
-              item.map_slots = 0;
-              item.reduce_slots = 0;
-              var liveNodesJson = App.parseJSON(component.ServiceComponentInfo.AliveNodes);
-              var grayNodesJson = App.parseJSON(component.ServiceComponentInfo.GrayListedNodes);
-              var blackNodesJson = App.parseJSON(component.ServiceComponentInfo.BlackListedNodes);
-              item.alive_trackers = [];
-              item.gray_list_trackers = [];
-              item.black_list_trackers = [];
-              if (liveNodesJson != null) {
-                liveNodesJson.forEach(function (nj) {
-                  item.alive_trackers.push(nj.hostname);
-                  if (nj.slots && nj.slots.map_slots)
-                    item.map_slots += nj.slots.map_slots;
-                  if (nj.slots && nj.slots.map_slots_used)
-                    item.map_slots_used += nj.slots.map_slots_used;
-                  if (nj.slots && nj.slots.reduce_slots)
-                    item.reduce_slots += nj.slots.reduce_slots;
-                  if (nj.slots && nj.slots.reduce_slots_used)
-                    item.reduce_slots_used += nj.slots.reduce_slots_used;
-                });
-              }
-              if (grayNodesJson != null) {
-                grayNodesJson.forEach(function (nj) {
-                  item.gray_list_trackers.push(nj.hostname);
-                });
-              }
-              if (blackNodesJson != null) {
-                blackNodesJson.forEach(function (nj) {
-                  item.black_list_trackers.push(nj.hostname);
-                });
-              }
-            }
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "TASKTRACKER") {
-              if (!item.task_trackers) {
-                item.task_trackers = [];
-              }
-              if (component.host_components) {
-                component.host_components.forEach(function (hc) {
-                  item.task_trackers.push(hc.HostRoles.host_name);
-                });
-              }
-            }
-          });
-          // Map
-          finalJson = this.parseIt(item, finalConfig);
-          finalJson.quick_links = [5, 6, 7, 8, 9, 10, 11, 12];
-          result.push(finalJson);
-          App.store.load(App.MapReduceService, finalJson);
-        } else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "HBASE") {
-          // Change the JSON so that it is easy to map
-          var hbaseConfig = this.hbaseConfig;
-          item.components.forEach(function (component) {
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "HBASE_MASTER") {
-              item.masterComponent = component;
-              finalConfig = jQuery.extend(finalConfig, hbaseConfig);
-              var regionsArray = App.parseJSON(component.ServiceComponentInfo.RegionsInTransition);
-              item.regions_in_transition = regionsArray == null ? 0 : regionsArray.length;
-            }
-            if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "HBASE_REGIONSERVER") {
-              if (!item.region_servers) {
-                item.region_servers = [];
-              }
-              if (component.host_components) {
-                component.host_components.forEach(function (hc) {
-                  item.region_servers.push(hc.HostRoles.host_name);
-                });
-              }
-            }
-          });
-          // Map
-          finalJson = this.parseIt(item, finalConfig);
-          finalJson.quick_links = [13, 14, 15, 16, 17, 18];
-          result.push(finalJson);
-          App.store.load(App.HBaseService, finalJson);
-        } else {
-          result.push(this.parseIt(item, this.config));
-        }
-      }, this);
-
-
-
-
-      result = this.sortByOrder(this.get('servicesSortOrder'), result);
-      App.store.loadMany(this.get('model'), result);
-
-      result = [];
-      json.items.forEach(function (item) {
-        item.components.forEach(function (component) {
-          result.push(this.parseIt(component, this.config2));
-        }, this)
-      }, this);
-
-      App.store.loadMany(this.get('model2'), result);
-
-      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)
-        }, this)
-      }, this);
-      App.store.loadMany(this.get('model3'), result);
-    }
+    return finalJson;
   }
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_host_routes.js Sun Dec  9 14:40:20 2012
@@ -182,8 +182,12 @@ module.exports = Em.Route.extend({
       var addHostController = router.get('addHostController');
       var wizardStep9Controller = router.get('wizardStep9Controller');
       if (!wizardStep9Controller.get('isSubmitDisabled')) {
+        if (wizardStep9Controller.get('content.cluster.status') !== 'START FAILED') {
         addHostController.installServices();
         addHostController.setInfoForStep9();
+        } else {
+          wizardStep9Controller.set('content.cluster.isCompleted', false);
+        }
         wizardStep9Controller.navigateStep();
       }
     },
@@ -219,7 +223,7 @@ module.exports = Em.Route.extend({
   }),
 
   backToHostsList: function (router, event) {
-    router.transitionTo('hosts');
+    router.transitionTo('hosts.index');
   },
 
   gotoStep1: Em.Router.transitionTo('step1'),

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_service_routes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_service_routes.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_service_routes.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/add_service_routes.js Sun Dec  9 14:40:20 2012
@@ -183,8 +183,12 @@ module.exports = Em.Route.extend({
       var addServiceController = router.get('addServiceController');
       var wizardStep9Controller = router.get('wizardStep9Controller');
       if (!wizardStep9Controller.get('isSubmitDisabled')) {
+        if (wizardStep9Controller.get('content.cluster.status') !== 'START FAILED') {
         addServiceController.installServices(true);
         addServiceController.setInfoForStep9();
+        } else {
+          wizardStep9Controller.set('content.cluster.isCompleted', false);
+        }
         wizardStep9Controller.navigateStep();
       }
     },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js Sun Dec  9 14:40:20 2012
@@ -275,8 +275,12 @@ module.exports = Em.Route.extend({
       var installerController = router.get('installerController');
       var wizardStep9Controller = router.get('wizardStep9Controller');
       if (!wizardStep9Controller.get('isSubmitDisabled')) {
+        if (wizardStep9Controller.get('content.cluster.status') !== 'START FAILED') {
         installerController.installServices(true);
         installerController.setInfoForStep9();
+        } else {
+          wizardStep9Controller.set('content.cluster.isCompleted', false);
+        }
         wizardStep9Controller.navigateStep();
       }
     },

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/main.js Sun Dec  9 14:40:20 2012
@@ -92,67 +92,70 @@ module.exports = Em.Route.extend({
 
   hosts:Em.Route.extend({
     route:'/hosts',
-    connectOutlets:function (router, context) {
-      router.get('mainController').connectOutlet('mainHost');
-    },
+    index:Ember.Route.extend({
+      route:'/',
+      connectOutlets:function (router, context) {
+        router.get('mainController').connectOutlet('mainHost');
+      }
+    }),
 
-    showDetails:function (router, event) {
-      router.get('mainHostDetailsController').setBack(true);
-      router.transitionTo('hostDetails.summary', event.context)
-    },
+    hostDetails:Em.Route.extend({
+      route:'/:host_id',
+      connectOutlets:function (router, host) {
+        router.get('mainController').connectOutlet('mainHostDetails', host);
+      },
 
-    addHost:function (router) {
-      router.transitionTo('hostAdd');
-    }
+      index:Ember.Route.extend({
+        route:'/',
+        redirectsTo:'summary'
+      }),
 
-  }),
+      summary:Em.Route.extend({
+        route:'/summary',
+        connectOutlets:function (router, context) {
+          router.get('mainHostDetailsController').connectOutlet('mainHostSummary');
+        }
+      }),
 
-  hostAdd:require('routes/add_host_routes'),
+      metrics:Em.Route.extend({
+        route:'/metrics',
+        connectOutlets:function (router, context) {
+          router.get('mainHostDetailsController').connectOutlet('mainHostMetrics');
+        }
+      }),
 
-  hostDetails:Em.Route.extend({
-    route:'/hosts/:host_id',
-    connectOutlets:function (router, host) {
-      router.get('mainController').connectOutlet('mainHostDetails', host);
-    },
+      audit:Em.Route.extend({
+        route:'/audit',
+        connectOutlets:function (router, context) {
+          router.get('mainHostDetailsController').connectOutlet('mainHostAudit');
+        }
+      }),
 
-    index:Ember.Route.extend({
-      route:'/',
-      redirectsTo:'summary'
+      hostNavigate:function (router, event) {
+        var parent = event.view._parentView;
+        parent.deactivateChildViews();
+        event.view.set('active', "active");
+        router.transitionTo(event.context);
+      }
     }),
 
     backToHostsList:function (router, event) {
-      router.transitionTo('hosts');
+      router.transitionTo('hosts.index');
     },
 
-    summary:Em.Route.extend({
-      route:'/summary',
-      connectOutlets:function (router, context) {
-        router.get('mainHostDetailsController').connectOutlet('mainHostSummary');
-      }
-    }),
-
-    metrics:Em.Route.extend({
-      route:'/metrics',
-      connectOutlets:function (router, context) {
-        router.get('mainHostDetailsController').connectOutlet('mainHostMetrics');
-      }
-    }),
-
-    audit:Em.Route.extend({
-      route:'/audit',
-      connectOutlets:function (router, context) {
-        router.get('mainHostDetailsController').connectOutlet('mainHostAudit');
-      }
-    }),
+    showDetails:function (router, event) {
+      router.get('mainHostDetailsController').setBack(true);
+      router.transitionTo('hostDetails.summary', event.context)
+    },
 
-    hostNavigate:function (router, event) {
-      var parent = event.view._parentView;
-      parent.deactivateChildViews();
-      event.view.set('active', "active");
-      router.transitionTo(event.context);
+    addHost:function (router) {
+      router.transitionTo('hostAdd');
     }
+
   }),
 
+  hostAdd:require('routes/add_host_routes'),
+
   admin:Em.Route.extend({
     route:'/admin',
     enter: function(){

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Sun Dec  9 14:40:20 2012
@@ -321,6 +321,9 @@ h1 {
   }
   .accordion-group {
     margin-bottom: 20px;
+    .control-label {
+      text-align: left;
+    }
     .control-group {
       margin: 10px 0;
     }
@@ -328,6 +331,16 @@ h1 {
       margin-bottom: 0;
     }
   }
+  .accordion-group.Advanced {
+    .control-label {
+      float: none;
+      text-align: left;
+      width: auto;
+    }
+    .controls {
+      margin-left: 0;
+    }
+  }
   .badge {
     margin-left: 4px;
   }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/configs.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/configs.hbs?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/configs.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/info/configs.hbs Sun Dec  9 14:40:20 2012
@@ -138,19 +138,11 @@
     {{#each category in selectedService.configCategories}}
 
       <div class="accordion-group">
-        {{#if category.isAdvanced}}
         <div class="accordion-heading">
           <a class="accordion-toggle" {{action "onToggleBlock" category.name target="view"}}>
             {{category.name}}
           </a>
         </div>
-        {{else}}
-        <div class="accordion-heading">
-          <a class="accordion-toggle">
-            {{category.name}}
-          </a>
-        </div>
-        {{/if}}
 
         {{#unless category.isForSlaveComponent}}
           {{#view App.ServiceConfigsByCategoryView categoryBinding="category" serviceConfigsBinding="selectedService.configs"}}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/menu_item.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/menu_item.hbs?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/menu_item.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/service/menu_item.hbs Sun Dec  9 14:40:20 2012
@@ -17,10 +17,9 @@
 }}
 
 <a href="#/main/services/{{unbound view.content.id}}/summary">
-  {{#if view.content.isClients}}
-  {{else}}
+  {{#unless view.content.isClients}}
   {{view App.MainDashboardServiceHealthView class="service-health" serviceBinding="view.content"}}&nbsp;
-  {{/if}}
+  {{/unless}}
   <span>{{unbound view.content.displayName}}</span>
   {{#if view.alertsCount}}
     <span class="label operations-count">

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step7.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step7.hbs?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step7.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/wizard/step7.hbs Sun Dec  9 14:40:20 2012
@@ -36,8 +36,8 @@
 
   <div class="accordion">
     {{#each category in selectedService.configCategories}}
-    <div class="accordion-group">
-      <div class="accordion-heading">
+    <div class="accordion-group {{unbound category.name}}">
+      <div class="accordion-heading" {{action "onToggleBlock" category.name target="view"}}>
         <a class="accordion-toggle">
           {{category.name}}
         </a>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/chart/linear_time.js Sun Dec  9 14:40:20 2012
@@ -247,7 +247,20 @@ App.ChartLinearTimeView = Ember.View.ext
       _refreshGraph: function (jsonData) {
         var seriesData = this.transformToSeries(jsonData);
         if (seriesData instanceof Array && seriesData.length>0) {
-            this.draw(seriesData);
+          //if graph opened as modal popup
+          var popup_path = $(".modal-graph-line .modal-body #" + this.id + "-container" + this.get('popupSuffix'));
+          if(popup_path.length) {
+            popup_path.children().each(function () {
+              $(this).children().remove();
+            });
+            this.set('isPopup', true);
+          }
+          else {
+            $("#" + this.id + "-container").children().each(function (index, value) {
+              $(value).children().remove();
+            });
+          }
+          this.draw(seriesData);
         }
         else {
           this._showMessage('info', 'No Data', 'There was no data available.');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/charts/heatmap.js Sun Dec  9 14:40:20 2012
@@ -22,6 +22,8 @@ App.MainChartsHeatmapView = Em.View.exte
     templateName: require('templates/main/charts/heatmap'),
     didInsertElement: function(){
       this._super();
+      // set default metric
+      this.set('controller.selectedMetric', this.get('controller.allMetrics')[0].get('items')[0]);
       $("#heatmapDetailsBlock").hide();
     }
 });
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard.js Sun Dec  9 14:40:20 2012
@@ -24,11 +24,30 @@ App.MainDashboardView = Em.View.extend({
     this.services();
   },
   content:[],
-  services:function () {
+  updateServices: function(){
+    var services = App.Service.find();
+    services.forEach(function (item) {
+      var view;
+      switch (item.get('serviceName')) {
+        case "HDFS":
+          view = this.get('content').filterProperty('viewName', App.MainDashboardServiceHdfsView);
+          view.objectAt(0).set('model', App.HDFSService.find(item.get('id')));
+          break;
+        case "MAPREDUCE":
+          view = this.get('content').filterProperty('viewName', App.MainDashboardServiceMapreduceView);
+          view.objectAt(0).set('model', App.MapReduceService.find(item.get('id')));
+          break;
+        case "HBASE":
+          view = this.get('content').filterProperty('viewName', App.MainDashboardServiceHbaseView);
+          view.objectAt(0).set('model', App.HBaseService.find(item.get('id')));
+      }
+    }, this);
+  }.observes('App.router.updateController.isUpdate'),
+  services: function () {
+    var services = App.Service.find();
     if (this.get('content').length > 0) {
-      return false;
+      return false
     }
-    var services = App.Service.find();
     services.forEach(function (item) {
       var vName;
       var item2;
@@ -57,14 +76,13 @@ App.MainDashboardView = Em.View.extend({
         default:
           vName = Em.View;
       }
-      this.get('content').pushObject({
-        viewName:vName,
-        model:item2 || item
-      })
+      this.get('content').pushObject(Em.Object.create({
+        viewName: vName,
+        model: item2
+      }))
     }, this);
+  },
 
-  }.observes('App.router.updateController.isUpdated'),
-  
   gangliaUrl: function () {
     return App.router.get('clusterController.gangliaUrl') + "/?r=hour&cs=&ce=&m=&s=by+name&c=HDPSlaves&tab=m&vn=";
   }.property('App.router.clusterController.gangliaUrl')

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js Sun Dec  9 14:40:20 2012
@@ -28,11 +28,11 @@ App.MainDashboardServiceHbaseView = App.
     var heapString = heapUsed>0 ? heapUsed.bytesToSize(1, "parseFloat") : 0;
     var heapMaxString = heapMax>0 ? heapMax.bytesToSize(1, "parseFloat") : 0;
     return this.t('dashboard.services.hbase.masterServerHeap.summary').format(heapString, heapMaxString, percent.toFixed(1));
-  }.property('service'),
+  }.property('service.heapMemoryUsed', 'service.heapMemoryMax'),
 
   summaryHeader: function () {
     return this.t("dashboard.services.hbase.summary").format(this.get('service.regionServers.length'), this.get('service.averageLoad'));
-  }.property('service'),
+  }.property('service.regionServers', 'service.averageLoad'),
 
   hbaseMasterWebUrl: function () {
     return "http://" + this.get('service').get('master').get('publicHostName') + ":60010";
@@ -40,19 +40,19 @@ App.MainDashboardServiceHbaseView = App.
 
   averageLoad: function () {
     return this.t('dashboard.services.hbase.averageLoadPerServer').format(this.get('service.averageLoad'));
-  }.property("service"),
+  }.property("service.averageLoad"),
 
   masterStartedTime: function () {
     var uptime = this.get('service').get('masterStartTime');
     var formatted = (new Date().getTime() - uptime).toDaysHoursMinutes();
     return this.t('dashboard.services.uptime').format(formatted.d, formatted.h, formatted.m);
-  }.property("service"),
+  }.property("service.masterStartTime"),
 
   masterActivatedTime: function () {
     var uptime = this.get('service').get('masterActiveTime');
     var formatted = (new Date().getTime() - uptime).toDaysHoursMinutes();
     return this.t('dashboard.services.uptime').format(formatted.d, formatted.h, formatted.m);
-  }.property("service"),
+  }.property("service.masterActiveTime"),
 
   regionServerComponent: function () {
     return App.Component.find().findProperty('componentName', 'HBASE_REGIONSERVER');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js Sun Dec  9 14:40:20 2012
@@ -21,12 +21,11 @@ var App = require('app');
 App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
   templateName:require('templates/main/dashboard/service/hdfs'),
   serviceName:'HDFS',
-
   Chart:App.ChartPieView.extend({
     service: null,
     data:function () {
       return [ this.get('service.capacityUsed'), this.get('service.capacityTotal') ];
-    }.property('service')
+    }.property('service.capacityUsed', 'service.capacityTotal')
   }),
 
   nodeUptime:function () {
@@ -48,7 +47,7 @@ App.MainDashboardServiceHdfsView = App.M
       memCommitted.bytesToSize(1, 'parseFloat'),
       percent.toFixed(1));
 
-  }.property('service'),
+  }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapCommitted'),
 
   summaryHeader:function () {
     var text = this.t("dashboard.services.hdfs.summary");
@@ -58,16 +57,23 @@ App.MainDashboardServiceHdfsView = App.M
     var total = svc.get('capacityTotal') + 0;
     var used = svc.get('capacityUsed') + 0;
     var percentRemaining = (100-Math.round((used*100)/total)).toFixed(1);
+    if(percentRemaining == "NaN")
+    {
+      percentRemaining = "n/a ";
+    }
     return text.format(liveCount, totalCount, percentRemaining);
-  }.property('service'),
+  }.property('service.liveDataNodes', 'service.dataNodes', 'service.capacityUsed', 'service.capacityTotal'),
 
   capacity:function () {
     var text = this.t("dashboard.services.hdfs.capacityUsed");
     var total = this.get('service').get('capacityTotal') + 0;
     var used = this.get('service').get('capacityUsed') + 0;
     var percent = Math.round((used*100)/total).toFixed(1);
+    if(percent == "NaN"){
+      percent = "n/a ";
+    }
     return text.format(used.bytesToSize(1), total.bytesToSize(1), percent);
-  }.property('service'),
+  }.property('service.capacityUsed', 'service.capacityTotal'),
   
   dataNodeComponent: function(){
     return App.Component.find().findProperty('componentName', 'DATANODE');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js Sun Dec  9 14:40:20 2012
@@ -44,7 +44,7 @@ App.MainDashboardServiceMapreduceView = 
     var waitingCount = svc.get('mapsWaiting') + svc.get('reducesWaiting');
     var template = this.t('dashboard.services.mapreduce.summary');
     return template.format(liveCount, allCount, runningCount, waitingCount);
-  }.property('service'),
+  }.property('service.aliveTrackers', 'service.taskTrackers','service.mapsRunning', 'service.mapsWaiting', 'service.reducesRunning', 'service.reducesWaiting'),
 
   trackersSummary: function () {
     var svc = this.get('service');
@@ -52,52 +52,56 @@ App.MainDashboardServiceMapreduceView = 
     var totalCount = svc.get('taskTrackers').get('length');
     var template = this.t('dashboard.services.mapreduce.trackersSummary');
     return template.format(liveCount, totalCount);
-  }.property('service'),
+  }.property('service.aliveTrackers', 'service.taskTrackers'),
 
   trackersHeapSummary: function () {
     var heapUsed = this.get('service').get('jobTrackerHeapUsed') || 90;
     var heapMax = this.get('service').get('jobTrackerHeapMax') || 90;
     var percent = heapMax > 0 ? 100 * heapUsed / heapMax : 0;
     return this.t('dashboard.services.mapreduce.jobTrackerHeapSummary').format(heapUsed.bytesToSize(1, "parseFloat"), heapMax.bytesToSize(1, "parseFloat"), percent.toFixed(1));
-  }.property('service'),
+  }.property('service.jobTrackerHeapUsed', 'service.jobTrackerHeapMax'),
 
   jobsSummary: function () {
     var svc = this.get('service');
     var template = this.t('dashboard.services.mapreduce.jobsSummary');
     return template.format(svc.get('jobsSubmitted'), svc.get('jobsCompleted'));
-  }.property('service'),
+  }.property('service.jobsSubmitted', 'service.jobsCompleted'),
 
   mapSlotsSummary: function () {
     var svc = this.get('service');
     var template = this.t('dashboard.services.mapreduce.mapSlotsSummary');
     return template.format(svc.get('mapSlotsOccupied'), svc.get('mapSlotsReserved'));
-  }.property('service'),
+  }.property('service.mapSlotsOccupied', 'service.mapSlotsReserved'),
 
   reduceSlotsSummary: function () {
     var svc = this.get('service');
     var template = this.t('dashboard.services.mapreduce.reduceSlotsSummary');
     return template.format(svc.get('reduceSlotsOccupied'), svc.get('reduceSlotsReserved'));
-  }.property('service'),
+  }.property('service.reduceSlotsOccupied', 'service.reduceSlotsReserved'),
 
   mapTasksSummary: function () {
     var svc = this.get('service');
     var template = this.t('dashboard.services.mapreduce.tasksSummary');
     return template.format(svc.get('mapsRunning'), svc.get('mapsWaiting'));
-  }.property('service'),
+  }.property('service.mapsRunning', 'service.mapsWaiting'),
 
   reduceTasksSummary: function () {
     var svc = this.get('service');
     var template = this.t('dashboard.services.mapreduce.tasksSummary');
     return template.format(svc.get('reducesRunning'), svc.get('reducesWaiting'));
-  }.property('service'),
+  }.property('service.reducesRunning', 'service.reducesWaiting'),
 
   slotsCapacitySummary: function () {
     var mapSlots = this.get('service').get('mapSlots');
     var reduceSlots = this.get('service').get('reduceSlots');
     var liveNodeCount = this.get('service').get('aliveTrackers').get('length');
-    var avg = (mapSlots + reduceSlots) / liveNodeCount;
+    if(liveNodeCount != 0){
+      var avg = (mapSlots + reduceSlots) / liveNodeCount;
+    }else{
+      avg = "n/a ";
+    }
     return this.t('dashboard.services.mapreduce.slotCapacitySummary').format(mapSlots, reduceSlots, avg);
-  }.property('service'),
+  }.property('service.mapSlots', 'service.reduceSlots', 'service.aliveTrackers'),
 
   taskTrackerComponent: function () {
     return App.Component.find().findProperty('componentName', 'TASKTRACKER');

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/configs.js Sun Dec  9 14:40:20 2012
@@ -23,8 +23,6 @@ App.MainServiceInfoConfigsView = Em.View
   didInsertElement: function () {
     var controller = this.get('controller');
     controller.loadStep();
-    var advanced = this.get('controller.selectedService.configCategories').filterProperty('name', 'Advanced');
-    if(advanced.length) advanced.objectAt(0).set('isAdvanced', true);
   },
   onToggleBlock: function(event){
     $("#" + event.context).toggle('blind', 500);

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/info/summary.js Sun Dec  9 14:40:20 2012
@@ -201,7 +201,9 @@ App.MainServiceInfoSummaryView = Em.View
     var components = this.get('clientComponents');
     var names = [];
     components.forEach(function (component) {
-      names.push(component.get('displayName'));
+      if (names.indexOf(component.get('displayName')) == -1) {
+        names.push(component.get('displayName'));
+      }
     });
 
     return names.length ? names.join(', ') : false;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js?rev=1418980&r1=1418979&r2=1418980&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/service/menu.js Sun Dec  9 14:40:20 2012
@@ -20,14 +20,11 @@ var App = require('app');
 
 App.MainServiceMenuView = Em.CollectionView.extend({
   content:function () {
-    var items = App.router.get('mainServiceController.content').toArray();
-
-    var itemsToRemove = ['PIG', 'SQOOP'];
-
-    items.forEach(function (item) {
-      if (itemsToRemove.indexOf(item.get('serviceName')) != -1) {
-        items.removeObject(item);
+    var items = App.router.get('mainServiceController.content').filter(function(item){
+      if(['PIG', 'SQOOP'].contains(item.get('id'))){
+        return false;
       }
+      return true;
     });
 
     items.push(App.router.get('mainServiceController.additionalMenuItem'));