Selaa lähdekoodia

AMBARI-1145. Cluster Management refactoring. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1431677 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 vuotta sitten
vanhempi
commit
31fef9aa44
36 muutettua tiedostoa jossa 868 lisäystä ja 131 poistoa
  1. 520 0
      ambari-web/app/assets/data/hosts/hosts.json
  2. BIN
      ambari-web/app/assets/img/logo-micro.gif
  3. BIN
      ambari-web/app/assets/img/logo-small-gold.png
  4. BIN
      ambari-web/app/assets/img/logo-small-yellow.png
  5. BIN
      ambari-web/app/assets/img/logo-small.gif
  6. BIN
      ambari-web/app/assets/img/logo-small.png
  7. 7 4
      ambari-web/app/controllers/global/update_controller.js
  8. 2 2
      ambari-web/app/controllers/main/host/details.js
  9. 3 0
      ambari-web/app/controllers/wizard.js
  10. 17 10
      ambari-web/app/controllers/wizard/step2_controller.js
  11. 2 1
      ambari-web/app/controllers/wizard/step8_controller.js
  12. 1 1
      ambari-web/app/controllers/wizard/step9_controller.js
  13. 1 1
      ambari-web/app/data/config_mapping.js
  14. 1 1
      ambari-web/app/mappers/users_mapper.js
  15. 19 8
      ambari-web/app/messages.js
  16. 2 2
      ambari-web/app/models/host.js
  17. 1 0
      ambari-web/app/models/user.js
  18. 2 0
      ambari-web/app/routes/add_host_routes.js
  19. 95 2
      ambari-web/app/styles/application.less
  20. 0 29
      ambari-web/app/styles/apps.less
  21. 2 2
      ambari-web/app/templates/application.hbs
  22. 1 0
      ambari-web/app/templates/main/dashboard/service/hive.hbs
  23. 1 1
      ambari-web/app/templates/main/host/summary.hbs
  24. 30 0
      ambari-web/app/templates/main/service/alert_notification_popup.hbs
  25. 2 2
      ambari-web/app/templates/main/service/info/summary.hbs
  26. 1 1
      ambari-web/app/templates/main/service/menu_item.hbs
  27. 28 31
      ambari-web/app/templates/wizard/step2.hbs
  28. 10 5
      ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
  29. 11 0
      ambari-web/app/utils/validator.js
  30. 6 3
      ambari-web/app/views/common/modal_popup.js
  31. 5 5
      ambari-web/app/views/main/host/summary.js
  32. 44 1
      ambari-web/app/views/main/service.js
  33. 14 14
      ambari-web/app/views/main/service/info/summary.js
  34. 2 1
      ambari-web/app/views/main/service/menu.js
  35. 25 1
      ambari-web/app/views/wizard/step2_view.js
  36. 13 3
      ambari-web/app/views/wizard/step9_view.js

+ 520 - 0
ambari-web/app/assets/data/hosts/hosts.json

@@ -22554,6 +22554,526 @@
           }
           }
         }
         }
       ]
       ]
+    },
+
+    {
+      "href" : "http://ec2-184-73-113-36.compute-1.amazonaws.com:8080/api/v1/clusters/ambari50/hosts/ip-10-2-9-59.ec2.internal",
+      "metrics" : {
+        "rpc" : {
+          "offline_num_ops" : 0.0,
+          "reportRSFatalError_num_ops" : 0.0,
+          "checkAndDelete_num_ops" : 0.0,
+          "createTable_num_ops" : 0.0,
+          "isMasterRunning_num_ops" : 0.0,
+          "openRegion_avg_time" : 0.0,
+          "execCoprocessor_num_ops" : 0.0,
+          "removeFromOnlineRegions_avg_time" : 0.0,
+          "unassign_avg_time" : 0.0,
+          "enableTable_avg_time" : 0.0,
+          "getZooKeeper_avg_time" : 0.0,
+          "balanceSwitch_avg_time" : 0.0,
+          "getHServerInfo_avg_time" : 0.0,
+          "addToOnlineRegions_avg_time" : 0.0,
+          "increment_num_ops" : 0.0,
+          "deleteColumn_num_ops" : 0.0,
+          "balanceSwitch_num_ops" : 0.0,
+          "isMasterRunning_avg_time" : 0.0,
+          "checkOOME_avg_time" : 0.0,
+          "regionServerStartup_avg_time" : 0.0,
+          "createTable_avg_time" : 0.0,
+          "getRegionInfo_avg_time" : 0.0,
+          "addColumn_avg_time" : 0.0,
+          "RpcProcessingTime_num_ops" : 0.0,
+          "getProtocolSignature_num_ops" : 0.0,
+          "stop_num_ops" : 0.0,
+          "exists_avg_time" : 0.0,
+          "flushRegion_avg_time" : 0.0,
+          "next_avg_time" : 0.0,
+          "incrementColumnValue_avg_time" : 0.0,
+          "deleteTable_avg_time" : 0.0,
+          "getConfiguration_avg_time" : 0.0,
+          "getZooKeeper_num_ops" : 0.0,
+          "removeFromOnlineRegions_num_ops" : 0.0,
+          "RpcProcessingTime_avg_time" : 0.0,
+          "bulkLoadHFiles_avg_time" : 0.0,
+          "getCatalogTracker_num_ops" : 0.0,
+          "abort_avg_time" : 0.0,
+          "modifyColumn_num_ops" : 0.0,
+          "getFromOnlineRegions_num_ops" : 0.0,
+          "RpcQueueTime_num_ops" : 0.0,
+          "reportRSFatalError_avg_time" : 0.0,
+          "rpcAuthenticationFailures" : 0.0,
+          "stopMaster_avg_time" : 0.0,
+          "delete_num_ops" : 0.0,
+          "getAlterStatus_avg_time" : 0.0,
+          "getServerName_avg_time" : 0.0,
+          "stopMaster_num_ops" : 0.0,
+          "regionServerReport_num_ops" : 0.0,
+          "getFromOnlineRegions_avg_time" : 0.0,
+          "splitRegion_num_ops" : 0.0,
+          "shutdown_num_ops" : 0.0,
+          "lockRow_avg_time" : 0.0,
+          "getClosestRowBefore_avg_time" : 0.0,
+          "multi_avg_time" : 0.0,
+          "checkOOME_num_ops" : 0.0,
+          "delete_avg_time" : 0.0,
+          "move_avg_time" : 0.0,
+          "offline_avg_time" : 0.0,
+          "regionServerReport_avg_time" : 0.0,
+          "getHTableDescriptors_num_ops" : 0.0,
+          "getServerName_num_ops" : 0.0,
+          "getClusterStatus_avg_time" : 0.0,
+          "getBlockCacheColumnFamilySummaries_avg_time" : 0.0,
+          "flushRegion_num_ops" : 0.0,
+          "close_avg_time" : 0.0,
+          "RpcQueueTime_avg_time" : 0.0,
+          "isAborted_avg_time" : 0.0,
+          "SentBytes" : 0.0,
+          "enableTable_num_ops" : 0.0,
+          "unlockRow_num_ops" : 0.0,
+          "disableTable_num_ops" : 0.0,
+          "openRegions_avg_time" : 0.0,
+          "checkAndPut_num_ops" : 0.0,
+          "ReceivedBytes" : 0.0,
+          "checkAndPut_avg_time" : 0.0,
+          "put_num_ops" : 0.0,
+          "rollHLogWriter_num_ops" : 0.0,
+          "getHTableDescriptors_avg_time" : 0.0,
+          "close_num_ops" : 0.0,
+          "next_num_ops" : 0.0,
+          "closeRegion_avg_time" : 0.0,
+          "openScanner_num_ops" : 0.0,
+          "deleteTable_num_ops" : 0.0,
+          "checkAndDelete_avg_time" : 0.0,
+          "addToOnlineRegions_num_ops" : 0.0,
+          "increment_avg_time" : 0.0,
+          "compactRegion_num_ops" : 0.0,
+          "shutdown_avg_time" : 0.0,
+          "openScanner_avg_time" : 0.0,
+          "exists_num_ops" : 0.0,
+          "compactRegion_avg_time" : 0.0,
+          "isAborted_num_ops" : 0.0,
+          "isStopped_avg_time" : 0.0,
+          "lockRow_num_ops" : 0.0,
+          "abort_num_ops" : 0.0,
+          "put_avg_time" : 0.0,
+          "getProtocolVersion_num_ops" : 0.0,
+          "modifyTable_avg_time" : 0.0,
+          "getCatalogTracker_avg_time" : 0.0,
+          "getAlterStatus_num_ops" : 0.0,
+          "addColumn_num_ops" : 0.0,
+          "isStopped_num_ops" : 0.0,
+          "rpcAuthorizationSuccesses" : 0.0,
+          "execCoprocessor_avg_time" : 0.0,
+          "assign_avg_time" : 0.0,
+          "incrementColumnValue_num_ops" : 0.0,
+          "modifyTable_num_ops" : 0.0,
+          "modifyColumn_avg_time" : 0.0,
+          "getConfiguration_num_ops" : 0.0,
+          "splitRegion_avg_time" : 0.0,
+          "getRegionInfo_num_ops" : 0.0,
+          "balance_num_ops" : 0.0,
+          "RpcSlowResponse_avg_time" : 0.0,
+          "getClosestRowBefore_num_ops" : 0.0,
+          "replicateLogEntries_avg_time" : 0.0,
+          "closeRegion_num_ops" : 0.0,
+          "openRegions_num_ops" : 0.0,
+          "regionServerStartup_num_ops" : 0.0,
+          "multi_num_ops" : 0.0,
+          "getOnlineRegions_avg_time" : 0.0,
+          "deleteColumn_avg_time" : 0.0,
+          "getClusterStatus_num_ops" : 0.0,
+          "RpcSlowResponse_num_ops" : 0.0,
+          "rpcAuthenticationSuccesses" : 0.0,
+          "get_avg_time" : 0.0,
+          "unlockRow_avg_time" : 0.0,
+          "balance_avg_time" : 0.0,
+          "openRegion_num_ops" : 0.0,
+          "stop_avg_time" : 0.0,
+          "rpcAuthorizationFailures" : 0.0,
+          "getProtocolVersion_avg_time" : 0.0,
+          "get_num_ops" : 0.0,
+          "getProtocolSignature_avg_time" : 0.0,
+          "replicateLogEntries_num_ops" : 0.0,
+          "unassign_num_ops" : 0.0,
+          "getHServerInfo_num_ops" : 0.0,
+          "rollHLogWriter_avg_time" : 0.0,
+          "move_num_ops" : 0.0,
+          "getOnlineRegions_num_ops" : 0.0,
+          "disableTable_avg_time" : 0.0,
+          "getBlockCacheColumnFamilySummaries_num_ops" : 0.0,
+          "assign_num_ops" : 0.0,
+          "bulkLoadHFiles_num_ops" : 0.0,
+          "stop" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "incrementColumnValue" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "splitRegion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "bulkLoadHFiles" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "put" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "flushRegion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "unlockRow" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "next" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "removeFromOnlineRegions" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getOnlineRegions" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getRegionInfo" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "openScanner" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "close" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "delete" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "isAborted" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getFromOnlineRegions" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "isStopped" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getServerName" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "openRegions" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "openRegion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getClosestRowBefore" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "addToOnlineRegions" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getBlockCacheColumnFamilySummaries" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "increment" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getHServerInfo" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getProtocolSignature" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "checkOOME" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "get" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getProtocolVersion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getZooKeeper" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "checkAndPut" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getCatalogTracker" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "checkAndDelete" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "execCoprocessor" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "lockRow" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "exists" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "multi" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "closeRegion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "getConfiguration" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "replicateLogEntries" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "compactRegion" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "abort" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          },
+          "rollHLogWriter" : {
+            "aboveOneSec" : {
+              "_avg_time" : 0.0,
+              "_num_ops" : 0.0
+            }
+          }
+        },
+        "ugi" : {
+          "loginFailure_num_ops" : 0.0,
+          "loginSuccess_num_ops" : 0.0,
+          "loginSuccess_avg_time" : 0.0,
+          "loginFailure_avg_time" : 0.0
+        },
+        "jvm" : {
+          "memHeapCommittedM" : 88.3904513889,
+          "logFatal" : 0.0,
+          "threadsBlocked" : 0.0,
+          "threadsWaiting" : 9.225,
+          "gcCount" : 6.56175576628E7,
+          "logError" : 0.0,
+          "logWarn" : 0.0,
+          "memNonHeapCommittedM" : 23.1875,
+          "gcTimeMillis" : 6.56175575948E7,
+          "memNonHeapUsedM" : 20.6444657944,
+          "logInfo" : 0.0,
+          "memHeapUsedM" : 8.10178122361,
+          "threadsNew" : 0.0,
+          "threadsTerminated" : 0.0,
+          "threadsTimedWaiting" : 7.24722222222,
+          "threadsRunnable" : 6.75277777778
+        }
+      },
+      "Hosts" : {
+        "host_status" : "HEALTHY",
+        "public_host_name" : "ec2-54-234-44-57.compute-1.amazonaws.com",
+        "cpu_count" : 1,
+        "rack_info" : "/default-rack",
+        "host_health_report" : "",
+        "os_arch" : "x86_64",
+        "host_name" : "ip-10-2-9-59.ec2.internal",
+        "disk_info" : [
+          {
+            "available" : "3967812",
+            "used" : "1877904",
+            "percent" : "33%",
+            "size" : "5905712",
+            "type" : "ext4",
+            "mountpoint" : "/"
+          },
+          {
+            "available" : "3823076",
+            "used" : "0",
+            "percent" : "0%",
+            "size" : "3823076",
+            "type" : "tmpfs",
+            "mountpoint" : "/dev/shm"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/0"
+          },
+          {
+            "available" : "411234588",
+            "used" : "203012",
+            "percent" : "1%",
+            "size" : "433455904",
+            "type" : "ext3",
+            "mountpoint" : "/grid/1"
+          }
+        ],
+        "ip" : "10.2.9.59",
+        "os_type" : "redhat6",
+        "last_heartbeat_time" : 1354614186009,
+        "host_state" : "HEALTHY",
+        "cluster_name" : "ambari50",
+        "last_registration_time" : 1354583705401,
+        "total_mem" : 7644119
+      },
+      "host_components" : [
+        {
+          "href" : "http://ec2-184-73-113-36.compute-1.amazonaws.com:8080/api/v1/clusters/ambari50/hosts/ip-10-2-9-59.ec2.internal/host_components/TASKTRACKER",
+          "HostRoles" : {
+            "cluster_name" : "ambari50",
+            "component_name" : "TASKTRACKER",
+            "host_name" : "ip-10-2-9-59.ec2.internal"
+          }
+        },
+        {
+          "href" : "http://ec2-184-73-113-36.compute-1.amazonaws.com:8080/api/v1/clusters/ambari50/hosts/ip-10-2-9-59.ec2.internal/host_components/HBASE_REGIONSERVER",
+          "HostRoles" : {
+            "cluster_name" : "ambari50",
+            "component_name" : "HBASE_REGIONSERVER",
+            "host_name" : "ip-10-2-9-59.ec2.internal"
+          }
+        },
+        {
+          "href" : "http://ec2-184-73-113-36.compute-1.amazonaws.com:8080/api/v1/clusters/ambari50/hosts/ip-10-2-9-59.ec2.internal/host_components/GANGLIA_MONITOR",
+          "HostRoles" : {
+            "cluster_name" : "ambari50",
+            "component_name" : "GANGLIA_MONITOR",
+            "host_name" : "ip-10-2-9-59.ec2.internal"
+          }
+        },
+        {
+          "href" : "http://ec2-184-73-113-36.compute-1.amazonaws.com:8080/api/v1/clusters/ambari50/hosts/ip-10-2-9-59.ec2.internal/host_components/DATANODE",
+          "HostRoles" : {
+            "cluster_name" : "ambari50",
+            "component_name" : "DATANODE",
+            "host_name" : "ip-10-2-9-59.ec2.internal"
+          }
+        }
+      ]
     }
     }
+
+
   ]
   ]
 }
 }

BIN
ambari-web/app/assets/img/logo-micro.gif


BIN
ambari-web/app/assets/img/logo-small-gold.png


BIN
ambari-web/app/assets/img/logo-small-yellow.png


BIN
ambari-web/app/assets/img/logo-small.gif


BIN
ambari-web/app/assets/img/logo-small.png


+ 7 - 4
ambari-web/app/controllers/global/update_controller.js

@@ -35,13 +35,10 @@ App.UpdateController = Em.Controller.extend({
   updateAll:function(){
   updateAll:function(){
     var timeIntervalId = this.get('timeIntervalId');
     var timeIntervalId = this.get('timeIntervalId');
     var self = this;
     var self = this;
-
     if(this.get('isWorking')){
     if(this.get('isWorking')){
       if(timeIntervalId) return;
       if(timeIntervalId) return;
       this.set('timeIntervalId', setInterval(function(){
       this.set('timeIntervalId', setInterval(function(){
-        self.updateHost();
-        self.updateServiceMetric();
-        self.graphsUpdate();
+        this.updateAllWrapper();
       }, App.contentUpdateInterval));
       }, App.contentUpdateInterval));
     } else {
     } else {
       clearInterval(timeIntervalId);
       clearInterval(timeIntervalId);
@@ -49,6 +46,12 @@ App.UpdateController = Em.Controller.extend({
     }
     }
   }.observes('isWorking'),
   }.observes('isWorking'),
 
 
+  updateAllWrapper: function() {
+    this.updateHost();
+    this.updateServiceMetric();
+    this.graphsUpdate();
+  },
+
   updateHost:function(){
   updateHost:function(){
       var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts,host_components,metrics/cpu,metrics/disk,metrics/load,metrics/memory');
       var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts,host_components,metrics/cpu,metrics/disk,metrics/load,metrics/memory');
       App.HttpClient.get(hostsUrl, App.hostsMapper, {
       App.HttpClient.get(hostsUrl, App.hostsMapper, {

+ 2 - 2
ambari-web/app/controllers/main/host/details.js

@@ -182,7 +182,7 @@ App.MainHostDetailsController = Em.Controller.extend({
 
 
   decommission: function(event){
   decommission: function(event){
     var self = this;
     var self = this;
-    var decommissionHostNames = this.get('view.decommissionDatanodeHostnames');
+    var decommissionHostNames = this.get('view.decommissionDataNodeHostNames');
     if (decommissionHostNames == null) {
     if (decommissionHostNames == null) {
       decommissionHostNames = [];
       decommissionHostNames = [];
     }
     }
@@ -286,7 +286,7 @@ App.MainHostDetailsController = Em.Controller.extend({
 
 
   recommission: function(event){
   recommission: function(event){
     var self = this;
     var self = this;
-    var decommissionHostNames = this.get('view.decommissionDatanodeHostnames');
+    var decommissionHostNames = this.get('view.decommissionDataNodeHostNames');
     if (decommissionHostNames == null) {
     if (decommissionHostNames == null) {
       decommissionHostNames = [];
       decommissionHostNames = [];
     }
     }

+ 3 - 0
ambari-web/app/controllers/wizard.js

@@ -403,6 +403,9 @@ App.WizardController = Em.Controller.extend({
   installOptionsTemplate : {
   installOptionsTemplate : {
     hostNames: "", //string
     hostNames: "", //string
     manualInstall: false, //true, false
     manualInstall: false, //true, false
+    useSsh: true, //bool
+    isJavaHome : false, //bool
+    javaHome: '', //string
     localRepo: false, //true, false
     localRepo: false, //true, false
     sshKey: "", //string
     sshKey: "", //string
     bootRequestId: null //string
     bootRequestId: null //string

+ 17 - 10
ambari-web/app/controllers/wizard/step2_controller.js

@@ -17,6 +17,7 @@
  */
  */
 
 
 var App = require('app');
 var App = require('app');
+var validator = require('utils/validator');
 
 
 App.WizardStep2Controller = Em.Controller.extend({
 App.WizardStep2Controller = Em.Controller.extend({
   name: 'wizardStep2Controller',
   name: 'wizardStep2Controller',
@@ -42,8 +43,8 @@ App.WizardStep2Controller = Em.Controller.extend({
   }.property('manualInstall'),
   }.property('manualInstall'),
 
 
   isHostNameValid: function (hostname) {
   isHostNameValid: function (hostname) {
-    // For now hostnames that start or end with '-' are not allowed
-    return !(/^\-/.test(hostname) || /\-$/.test(hostname));
+    // For now hostnames that start or end with '-' are not allowed and hostname should be valid
+    return validator.isHostname(hostname) && (!(/^\-/.test(hostname) || /\-$/.test(hostname)));
   },
   },
 
 
   updateHostNameArr: function(){
   updateHostNameArr: function(){
@@ -52,13 +53,17 @@ App.WizardStep2Controller = Em.Controller.extend({
   },
   },
 
 
   isAllHostNamesValid: function () {
   isAllHostNamesValid: function () {
+    var self = this;
+    var result = true;
     this.updateHostNameArr();
     this.updateHostNameArr();
-    for (var index in this.hostNameArr) {
-      if (!this.isHostNameValid(this.hostNameArr[index])) {
-        return false;
+
+    this.hostNameArr.forEach(function(hostName){
+      if (!self.isHostNameValid(hostName)) {
+        result = false;
       }
       }
-    }
-    return true;
+    });
+
+    return result;
   },
   },
 
 
   hostsError: function () {
   hostsError: function () {
@@ -143,13 +148,15 @@ App.WizardStep2Controller = Em.Controller.extend({
 
 
         if(parseInt(start) <= parseInt(end) && parseInt(start) >= 0){
         if(parseInt(start) <= parseInt(end) && parseInt(start) >= 0){
           self.isPattern = true;
           self.isPattern = true;
-          if(start[0] == "0" && start.length > 1)
-          {
+
+          if(start[0] == "0" && start.length > 1) {
             extra = start.match(/0*/);
             extra = start.match(/0*/);
           }
           }
+
           for (var i = parseInt(start); i < parseInt(end) + 1; i++) {
           for (var i = parseInt(start); i < parseInt(end) + 1; i++) {
-            hostNames.push(a.replace(/\[\d*\-\d*\]/,extra[0].substring(0,1+extra[0].length-i.toString().length)+i))
+            hostNames.push(a.replace(/\[\d*\-\d*\]/,extra[0].substring(1,1+extra[0].length-i.toString().length)+i))
           }
           }
+
         }else{
         }else{
           hostNames.push(a);
           hostNames.push(a);
         }
         }

+ 2 - 1
ambari-web/app/controllers/wizard/step8_controller.js

@@ -410,12 +410,13 @@ App.WizardStep8Controller = Em.Controller.extend({
           case 'GANGLIA':
           case 'GANGLIA':
             this.loadGanglia(serviceObj);
             this.loadGanglia(serviceObj);
             break;
             break;
-          case 'PIG':
+         /* case 'PIG':
             this.loadPig(serviceObj);
             this.loadPig(serviceObj);
             break;
             break;
           case 'SQOOP':
           case 'SQOOP':
             this.loadSqoop(serviceObj);
             this.loadSqoop(serviceObj);
             break;
             break;
+            */
           case 'HCATALOG':
           case 'HCATALOG':
             break;
             break;
           default:
           default:

+ 1 - 1
ambari-web/app/controllers/wizard/step9_controller.js

@@ -624,7 +624,7 @@ App.WizardStep9Controller = Em.Controller.extend({
     if (App.testMode) {
     if (App.testMode) {
       this.numPolls++;
       this.numPolls++;
       url = this.get('mockDataPrefix') + '/poll_' + this.get('numPolls') + '.json';
       url = this.get('mockDataPrefix') + '/poll_' + this.get('numPolls') + '.json';
-      debugger;
+
     }
     }
     this.getLogsByRequest(url, true);
     this.getLogsByRequest(url, true);
   },
   },

+ 1 - 1
ambari-web/app/data/config_mapping.js

@@ -361,7 +361,7 @@ module.exports = [
   },
   },
   {
   {
     "name": "mapred.tasktracker.red.tasks.maximum",
     "name": "mapred.tasktracker.red.tasks.maximum",
-    "templateName": ["mapred_map_tasks_max"],
+    "templateName": ["mapred_red_tasks_max"],
     "foreignKey": null,
     "foreignKey": null,
     "value": "<templateName[0]>",
     "value": "<templateName[0]>",
     "filename": "mapred-site.xml"
     "filename": "mapred-site.xml"

+ 1 - 1
ambari-web/app/mappers/users_mapper.js

@@ -30,7 +30,7 @@ App.usersMapper = App.QuickDataMapper.create({
     var self = this;
     var self = this;
     json.items.forEach(function (item) {
     json.items.forEach(function (item) {
       var result= [] ;
       var result= [] ;
-      if(App.User.find(item.Users.user_name).get("userName") != item.Users.user_name)
+      if(!App.User.find().someProperty("userName", item.Users.user_name))
       {
       {
         if(item.Users.roles.indexOf("admin") >= 0){
         if(item.Users.roles.indexOf("admin") >= 0){
           item.Users.admin = true;
           item.Users.admin = true;

+ 19 - 8
ambari-web/app/messages.js

@@ -48,6 +48,9 @@ Em.I18n.translations = {
   'services.alerts.OK.timePrefix': 'OK for ',
   'services.alerts.OK.timePrefix': 'OK for ',
   'services.alerts.WARN.timePrefix': 'WARN for ',
   'services.alerts.WARN.timePrefix': 'WARN for ',
   'services.alerts.CRIT.timePrefix': 'CRIT for ',
   'services.alerts.CRIT.timePrefix': 'CRIT for ',
+  'services.alerts.headingOfList': 'Alerts and Health Checks',
+  'services.alerts.goToService': 'Go to Service',
+  'services.alerts.goToNagios': 'Go to Nagios Web UI',
 
 
   'topnav.logo.href':'http://incubator.apache.org/ambari/',
   'topnav.logo.href':'http://incubator.apache.org/ambari/',
   'topnav.help.href':'https://cwiki.apache.org/confluence/display/AMBARI/Ambari',
   'topnav.help.href':'https://cwiki.apache.org/confluence/display/AMBARI/Ambari',
@@ -73,10 +76,9 @@ Em.I18n.translations = {
   'installer.step2.hostPattern.tooltip.content':'You can use pattern expressions to specify a number of target hosts. For example, to specify host1 thru host10, enter host[1-10] in the target hosts textarea.',
   'installer.step2.hostPattern.tooltip.content':'You can use pattern expressions to specify a number of target hosts. For example, to specify host1 thru host10, enter host[1-10] in the target hosts textarea.',
   'installer.step2.hostName.error.required':'You must specify at least one host name',
   'installer.step2.hostName.error.required':'You must specify at least one host name',
   'installer.step2.hostName.error.notRequired':'Host Names will be ignored if not using SSH to automatically configure hosts',
   '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) - cannot start or end with a hyphen',
+  'installer.step2.hostName.error.invalid':'Invalid Host Name(s)',
   'installer.step2.hostName.pattern.header':'Host name pattern expressions',
   'installer.step2.hostName.pattern.header':'Host name pattern expressions',
   'installer.step2.sshKey':'Host Connectivity Information',
   'installer.step2.sshKey':'Host Connectivity Information',
-  'installer.step2.sshKey.info':'Provide your SSH Private Key (<b>id_rsa</b> for <b>root</b>)',
   'installer.step2.sshKey.error.required':'SSH Private Key is required',
   'installer.step2.sshKey.error.required':'SSH Private Key is required',
   'installer.step2.passphrase.error.match':'Passphrases do not match',
   'installer.step2.passphrase.error.match':'Passphrases do not match',
   'installer.step2.manualInstall.label':'Do not use SSH to automatically configure hosts ',
   'installer.step2.manualInstall.label':'Do not use SSH to automatically configure hosts ',
@@ -84,14 +86,23 @@ Em.I18n.translations = {
     'Ambari Agent on each host in order for the wizard to perform the necessary configurations and software installs.',
     '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.advancedOption':'Advanced Options',
   'installer.step2.repoConf':'Software Repository Configuration File Path',
   'installer.step2.repoConf':'Software Repository Configuration File Path',
-  'installer.step2.localRepo.header':'Software Repository',
-  'installer.step2.localRepo.label':'Use a local software repository',
+  'installer.step2.advancedOptions.header':'Advanced Options',
+  'installer.step2.localRepo.label_use':'Use a',
+  '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.error.required':'Local repository file path is required',
-  'installer.step2.localRepo.info':'Instructs the package manager to use your local software repository to retrieve software packages, instead of ' +
-    'downloading from the internet.',
   'installer.step2.localRepo.tooltip.title':'Local Software Repository',
   'installer.step2.localRepo.tooltip.title':'Local Software Repository',
-  'installer.step2.localRepo.tooltip.content':'Instructs the package manager to use your local software repository to retrieve software packages, instead of ' +
-    'downloading from the internet.',
+  'installer.step2.localRepo.tooltip.content': 'The cluster install 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.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',
+  '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.tooltip.title':'Not Using SSH (Manual Install)',
   '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,' +
   '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.',
     ' you have the option of configuring them yourself.  This involves installing and starting Ambari Agent on each of your target hosts.',

+ 2 - 2
ambari-web/app/models/host.js

@@ -68,13 +68,13 @@ App.Host = DS.Model.extend({
    * Format diskUsed value to float with 2 digits (also convert to GB)
    * Format diskUsed value to float with 2 digits (also convert to GB)
    */
    */
   diskUsedFormatted: function() {
   diskUsedFormatted: function() {
-    return Math.round(this.get('diskUsed') / (1024*1024) * Math.pow(10, 2)) / Math.pow(10, 2) + 'GB';
+    return Math.round(this.get('diskUsed') / (1024*1024*1024) * Math.pow(10, 2)) / Math.pow(10, 2) + 'GB';
   }.property('diskUsed'),
   }.property('diskUsed'),
   /**
   /**
    * Format diskTotal value to float with 2 digits (also convert to GB)
    * Format diskTotal value to float with 2 digits (also convert to GB)
    */
    */
   diskTotalFormatted: function() {
   diskTotalFormatted: function() {
-    return Math.round(this.get('diskTotal') / (1024*1024) * Math.pow(10, 2)) / Math.pow(10, 2) + 'GB';
+    return Math.round(this.get('diskTotal') / (1024*1024*1024) * Math.pow(10, 2)) / Math.pow(10, 2) + 'GB';
   }.property('diskTotal'),
   }.property('diskTotal'),
   /**
   /**
    * Percent value of used disk space
    * Percent value of used disk space

+ 1 - 0
ambari-web/app/models/user.js

@@ -135,6 +135,7 @@ App.CreateUserForm = App.Form.extend({
   getValues:function () {
   getValues:function () {
     var values = this._super();
     var values = this._super();
     values.type = ['local'];
     values.type = ['local'];
+    values.id = values.userName;
     return values;
     return values;
   },
   },
 
 

+ 2 - 0
ambari-web/app/routes/add_host_routes.js

@@ -249,8 +249,10 @@ module.exports = Em.Route.extend({
     complete: function (router, context) {
     complete: function (router, context) {
       if (true) {   // this function will be moved to installerController where it will validate
       if (true) {   // this function will be moved to installerController where it will validate
         var addHostController = router.get('addHostController');
         var addHostController = router.get('addHostController');
+        App.router.get('updateController').updateAllWrapper();
         addHostController.finish();
         addHostController.finish();
         $(context.currentTarget).parents("#modal").find(".close").trigger('click');
         $(context.currentTarget).parents("#modal").find(".close").trigger('click');
+        router.transitionTo('main.index');
       } else {
       } else {
         console.log('cluster installation failure');
         console.log('cluster installation failure');
         //$(context.currentTarget).parents("#modal").find(".close").trigger('click');
         //$(context.currentTarget).parents("#modal").find(".close").trigger('click');

+ 95 - 2
ambari-web/app/styles/application.less

@@ -213,7 +213,9 @@ h1 {
 .icon-remove {
 .icon-remove {
   color: #FF4B4B;
   color: #FF4B4B;
 }
 }
-
+.tooltip {
+  z-index: 1050;
+}
 .tooltip-inner {
 .tooltip-inner {
   text-align: left;
   text-align: left;
 }
 }
@@ -267,9 +269,15 @@ h1 {
         margin-bottom: 0;
         margin-bottom: 0;
       }
       }
     }
     }
-    #localRepo {
+    .advancedOptions {
       margin-top: 20px;
       margin-top: 20px;
       margin-bottom: 30px;
       margin-bottom: 30px;
+      label{
+        margin-bottom: 10px;
+      }
+      label.disabled{
+        color: #ccc;
+      }
     }
     }
   }
   }
   #confirm-hosts {
   #confirm-hosts {
@@ -490,6 +498,74 @@ a:focus {
 
 
 /*****end styles for boxes*****/
 /*****end styles for boxes*****/
 
 
+
+/*90% width modal window start*/
+.full-width-modal {
+  .modal {
+    width: 90%;
+    margin: -350px 0 0 -45%;
+  }
+
+  .clear {
+    clear:both;
+  }
+  > div > .dataTable {
+    border: 1px solid silver;
+    th {
+      border-top:none;
+    }
+  }
+  .content {
+    padding: 0;
+  }
+
+//fix stripped in inner table
+  .table-striped tbody tr:nth-child(odd)
+  td .table-striped tbody
+  tr:nth-child(odd) td,
+  tr:nth-child(even) th{
+    background-color: none;
+  }
+
+}
+/*90% width modal window end*/
+
+/*60% width modal window start*/
+.sixty-percent-width-modal {
+  .modal {
+    width: 60%;
+    margin: -45% 0 0 -30%;
+    max-height: 526px;
+  }
+
+  .modal-body{
+
+  }
+
+  .clear {
+    clear:both;
+  }
+  > div > .dataTable {
+    border: 1px solid silver;
+    th {
+      border-top:none;
+    }
+  }
+  .content {
+    padding: 0;
+  }
+
+//fix stripped in inner table
+  .table-striped tbody tr:nth-child(odd)
+  td .table-striped tbody
+  tr:nth-child(odd) td,
+  tr:nth-child(even) th{
+    background-color: none;
+  }
+
+}
+/*60% width modal window end*/
+
 /*****start styles for install tasks logs*****/
 /*****start styles for install tasks logs*****/
 .task-list-main-warp, .task-detail-info {
 .task-list-main-warp, .task-detail-info {
   i {
   i {
@@ -516,6 +592,10 @@ a:focus {
 }
 }
 .task-list-main-warp{
 .task-list-main-warp{
 
 
+  .task-list-line-cursor{
+    cursor:pointer;
+  }
+
   .task-top-wrap{
   .task-top-wrap{
 
 
     width:100%;
     width:100%;
@@ -833,6 +913,19 @@ a:focus {
 
 
 /*end alerts summary*/
 /*end alerts summary*/
 
 
+/*Alerts popup*/
+.alertsPopupLinks {
+  padding: 20px 40px 0px;
+  text-align: right;
+
+  a:first-child {
+    float: left;
+  }
+}
+.modal-footer.align-center {
+  text-align: center;
+}
+
 /*start chart/style graphs*/
 /*start chart/style graphs*/
 .chart-container {
 .chart-container {
   cursor: pointer;
   cursor: pointer;

+ 0 - 29
ambari-web/app/styles/apps.less

@@ -377,36 +377,7 @@
   }
   }
 }
 }
 
 
-/*90% width modal window*/
-.full-width-modal {
-  .modal {
-    width: 90%;
-    margin: -350px 0 0 -45%;
-  }
 
 
-  .clear {
-    clear:both;
-  }
-  > div > .dataTable {
-    border: 1px solid silver;
-    th {
-      border-top:none;
-    }
-  }
-  .content {
-    padding: 0;
-  }
-
-
-//fix stripped in inner table
-  .table-striped tbody tr:nth-child(odd)
-  td .table-striped tbody
-  tr:nth-child(odd) td,
-  tr:nth-child(even) th{
-    background-color: none;
-  }
-
-}
 
 
 @media all and (max-width: 1024px) {
 @media all and (max-width: 1024px) {
   .big-modal {
   .big-modal {

+ 2 - 2
ambari-web/app/templates/application.hbs

@@ -21,8 +21,8 @@
     <div class="navbar navbar-static-top">
     <div class="navbar navbar-static-top">
       <div class="navbar-inner">
       <div class="navbar-inner">
         <div class="container">
         <div class="container">
-          <a {{translateAttr href="topnav.logo.href"}} target="_blank"><img id="logo" src="/img/logo-small.gif"></a>
-          <a class="brand" {{translateAttr href="topnav.logo.href"}} target="_blank">{{t app.name}}</a>
+          <a {{translateAttr href="topnav.logo.href"}} target="_blank"><img id="logo" src="/img/logo-small.png" alt="Apache Ambari" title="Apache Ambari"></a>
+          <a class="brand" {{translateAttr href="topnav.logo.href"}} target="_blank" alt="Apache Ambari" title="Apache Ambari">{{t app.name}}</a>
             {{#if App.router.loggedIn}}
             {{#if App.router.loggedIn}}
               <a class="brand cluster-name" href="#">
               <a class="brand cluster-name" href="#">
 <!--                 - {{clusterName}} -->
 <!--                 - {{clusterName}} -->

+ 1 - 0
ambari-web/app/templates/main/dashboard/service/hive.hbs

@@ -18,6 +18,7 @@
 
 
 <div class="clearfix">
 <div class="clearfix">
   <div class="name span2">
   <div class="name span2">
+    <i class="pull-left icon-empty"></i>
     {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
     <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>
     <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>
     {{#if view.criticalAlertsCount}}
     {{#if view.criticalAlertsCount}}

+ 1 - 1
ambari-web/app/templates/main/host/summary.hbs

@@ -49,7 +49,7 @@
           <div class="row-fluid">
           <div class="row-fluid">
           {{#view view.ComponentView contentBinding="component"}}
           {{#view view.ComponentView contentBinding="component"}}
             <div class="span8">
             <div class="span8">
-              <span {{bindAttr class="view.statusClass"}}></span>&nbsp;
+              <span {{bindAttr class="view.statusClass :components-health"}}></span>&nbsp;
               {{component.displayName}}&nbsp;/&nbsp;
               {{component.displayName}}&nbsp;/&nbsp;
               <a href="#" {{action routeToService component.service target="controller"  }}>{{component.service.displayName}}</a>
               <a href="#" {{action routeToService component.service target="controller"  }}>{{component.service.displayName}}</a>
             </div>
             </div>

+ 30 - 0
ambari-web/app/templates/main/service/alert_notification_popup.hbs

@@ -0,0 +1,30 @@
+{{!
+* 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.
+}}
+
+<p>You have {{view.warnAlertsCount}} critical alert notification(s).</p>
+{{#if view.warnAlertsCount}}
+  <ul id='summary-alerts-list' class="alerts">
+    {{#each view.warnAlerts}}
+      {{view App.AlertItemView contentBinding="this"}}
+    {{/each}}
+  </ul>
+{{/if}}
+<p class="alertsPopupLinks">
+    <a href="#" {{action selectService}}>{{t services.alerts.goToService}}</a>
+    <a {{bindAttr href="view.nagiosUrl"}} target="_blank" {{action "closePopup" on="mouseUp"}}>{{t services.alerts.goToNagios}}</a>
+</p>

+ 2 - 2
ambari-web/app/templates/main/service/info/summary.hbs

@@ -125,7 +125,7 @@
   {{#if view.hasAlertsBox }}
   {{#if view.hasAlertsBox }}
 	<div class="box">
 	<div class="box">
 		<div class="box-header">
 		<div class="box-header">
-			<h4>Alerts and Health Checks</h4>
+			<h4>{{t services.alerts.headingOfList}}</h4>
 			<div class="btn-group">
 			<div class="btn-group">
         <a class="btn" target="_blank" rel="tooltip" title="Go to Nagios" {{bindAttr href="controller.nagiosUrl"}}><i class="icon-link"></i></a>
         <a class="btn" target="_blank" rel="tooltip" title="Go to Nagios" {{bindAttr href="controller.nagiosUrl"}}><i class="icon-link"></i></a>
 			</div>
 			</div>
@@ -133,7 +133,7 @@
 		<ul id='summary-alerts-list' class="alerts">
 		<ul id='summary-alerts-list' class="alerts">
 		  {{#if controller.alerts.length}}
 		  {{#if controller.alerts.length}}
 				{{#each controller.alerts}}
 				{{#each controller.alerts}}
-          {{view view.alertItemView contentBinding="this"}}
+          {{view App.AlertItemView contentBinding="this"}}
 				{{/each}}
 				{{/each}}
 			{{else}}
 			{{else}}
 		    {{#if controller.isNagiosInstalled}}
 		    {{#if controller.isNagiosInstalled}}

+ 1 - 1
ambari-web/app/templates/main/service/menu_item.hbs

@@ -20,7 +20,7 @@
   {{view App.MainDashboardServiceHealthView class="service-health" serviceBinding="view.content"}}&nbsp;
   {{view App.MainDashboardServiceHealthView class="service-health" serviceBinding="view.content"}}&nbsp;
   <span>{{unbound view.content.displayName}}</span>
   <span>{{unbound view.content.displayName}}</span>
   {{#if view.alertsCount}}
   {{#if view.alertsCount}}
-    <span class="label operations-count">
+    <span class="label operations-count" {{action "showAlertsPopup" view.content on="click" target="view.parentView.parentView"}}>
       {{view.alertsCount}}
       {{view.alertsCount}}
     </span>
     </span>
   {{/if}}
   {{/if}}

+ 28 - 31
ambari-web/app/templates/wizard/step2.hbs

@@ -59,7 +59,15 @@
     <div class="ambari-agents">
     <div class="ambari-agents">
       <h5>{{t installer.step2.sshKey}}</h5>
       <h5>{{t installer.step2.sshKey}}</h5>
 
 
-      <p>{{t installer.step2.sshKey.info}}</p>
+      <label class="checkbox">
+        {{view Ember.Checkbox checkedBinding="content.installOptions.useSsh"}}
+        {{t installer.step2.useSsh.provide}}
+          <a href="javascript:void(null)"
+             rel="popover"
+            {{translateAttr title="installer.step2.useSsh.tooltip.title" data-content="installer.step2.useSsh.tooltip.content"}}>
+              {{t installer.step2.useSsh.tooltip.title}}</a>
+          {{t installer.step2.useSsh.provide_id_rsa}}
+      </label>
 
 
       <div {{bindAttr class="sshKeyError:error :control-group"}}>
       <div {{bindAttr class="sshKeyError:error :control-group"}}>
         {{#if view.isFileApi}}
         {{#if view.isFileApi}}
@@ -75,44 +83,33 @@
         </div>
         </div>
       </div>
       </div>
 
 
-      <div class="manual-install">
-      <label class="checkbox">
-        {{t installer.step2.manualInstall.label}}
-        <a href="javascript:void(null)"
-           rel="popover"
-          {{translateAttr title="installer.step2.manualInstall.tooltip.title" data-content="installer.step2.manualInstall.tooltip.content"}}>
-          Learn more</a>
-        {{view Ember.Checkbox checkedBinding="content.installOptions.manualInstall"}}
-      </label>
-      </div>
-
-      {{#if content.installOptions.manualInstall}}
-      <div class="alert">
-        {{t installer.step2.manualInstall.info}}
-      </div>
-      {{/if}}
-
     </div>
     </div>
   </div>
   </div>
 
 
-  <div id="localRepo">
-    <h5>{{t installer.step2.localRepo.header}}</h5>
-    <label class="checkbox">
-      {{t installer.step2.localRepo.label}}
+  <div class="advancedOptions">
+    <h5>{{t installer.step2.advancedOptions.header}}</h5>
+
+    <label {{bindAttr class=":checkbox content.installOptions.localRepo::disabled"}}>
+      {{view Ember.Checkbox checkedBinding="content.installOptions.localRepo"}}
+
+      {{t installer.step2.localRepo.label_use}}
+
       <a href="javascript:void(null)"
       <a href="javascript:void(null)"
          rel="popover"
          rel="popover"
         {{translateAttr title="installer.step2.localRepo.tooltip.title" data-content="installer.step2.localRepo.tooltip.content"}}>
         {{translateAttr title="installer.step2.localRepo.tooltip.title" data-content="installer.step2.localRepo.tooltip.content"}}>
-        Learn more</a>
-      {{view Ember.Checkbox checkedBinding="content.installOptions.localRepo"}}
+        {{t installer.step2.localRepo.tooltip.title}}</a>
+      {{t installer.step2.localRepo.label_instead}}
     </label>
     </label>
 
 
-    {{#if content.installOptions.localRepo}}
-    <div {{bindAttr class="localRepoError:error :control-group"}}>
-      <div class="alert alert-info">
-        {{t installer.step2.localRepo.info}}
-      </div>
-    </div>
-    {{/if}}
+    <label {{bindAttr class=":checkbox content.installOptions.isJavaHome::disabled"}}>
+      {{view Ember.Checkbox checkedBinding="content.installOptions.isJavaHome"}}
+        {{t installer.step2.javaHome.label}}
+        <a href="javascript:void(null)"
+           rel="popover"
+          {{translateAttr title="installer.step2.javaHome.tooltip.title" data-content="installer.step2.javaHome.tooltip.content"}}>
+            {{t installer.step2.javaHome.tooltip.title}}</a>
+        {{view App.WizardTextField valueBinding="content.installOptions.javaHome" placeholder="/usr/jdk/jdk1.6.0_31"}}
+    </label>
   </div>
   </div>
   <div class="btn-area">
   <div class="btn-area">
     {{#unless view.parentView.controller.hideBackButton }}
     {{#unless view.parentView.controller.hideBackButton }}

+ 10 - 5
ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs

@@ -32,14 +32,19 @@
     {{#each role in view.roles}}
     {{#each role in view.roles}}
     {{#each taskInfo in role.taskInfos}}
     {{#each taskInfo in role.taskInfos}}
     <div {{bindAttr class="taskInfo.isVisible::hidden :log-list-wrap"}}>
     <div {{bindAttr class="taskInfo.isVisible::hidden :log-list-wrap"}}>
-      <i {{bindAttr class="taskInfo.status taskInfo.icon"}}></i>
-      <a href="#" class="" {{action toggleTaskLog taskInfo}}>
-        {{{role.roleName}} {{taskInfo.command}}
-      </a>
-      <div {{action toggleTaskLog taskInfo}} class="show-details"><i class="icon-caret-right"></i></div>
+      <div {{action toggleTaskLog taskInfo}} class="task-list-line-cursor">
+        <i {{bindAttr class="taskInfo.status taskInfo.icon"}}></i>
+        <a href="#" class="" >
+          {{{role.roleName}} {{taskInfo.command}}
+        </a>
+        <div class="show-details"><i class="icon-caret-right"></i></div>
+      </div>
     </div>
     </div>
     {{/each}}
     {{/each}}
     {{/each}}
     {{/each}}
+    {{#if view.isEmptyList}}
+      <div class="log-list-wrap">No tasks to show</div>
+    {{/if}}
   </div>
   </div>
 </div>
 </div>
 
 

+ 11 - 0
ambari-web/app/utils/validator.js

@@ -46,6 +46,17 @@ module.exports = {
     return ipRegex.test(value);
     return ipRegex.test(value);
   },
   },
 
 
+  /**
+   * validate hostname
+   * @param value
+   * @return {Boolean}
+   */
+  isHostname: function(value) {
+    var regex = /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/;
+    console.warn("HOSTNAME:", value, "   VALUE:" ,regex.test(value));
+    return regex.test(value);
+  },
+
   /**
   /**
    * validate domain name with port
    * validate domain name with port
    * @param value
    * @param value

+ 6 - 3
ambari-web/app/views/common/modal_popup.js

@@ -48,6 +48,7 @@ App.ModalPopup = Ember.View.extend({
   // define bodyClass which extends Ember.View to use an arbitrary Handlebars template as the body
   // define bodyClass which extends Ember.View to use an arbitrary Handlebars template as the body
   primary: 'OK',
   primary: 'OK',
   secondary: 'Cancel',
   secondary: 'Cancel',
+  autoHeight: true,
 
 
   onPrimary: function() {
   onPrimary: function() {
   },
   },
@@ -67,9 +68,11 @@ App.ModalPopup = Ember.View.extend({
   showFooter: true,
   showFooter: true,
 
 
   didInsertElement: function(){
   didInsertElement: function(){
-    this._super();
-    var block = this.$().find('#modal > .modal-body').first();
-    block.css('max-height', $(window).height()- block.offset().top - 100); // fix popup height
+    if(this.autoHeight){
+      this._super();
+      var block = this.$().find('#modal > .modal-body').first();
+      block.css('max-height', $(window).height()- block.offset().top - 100); // fix popup height
+    }
   }
   }
 });
 });
 
 

+ 5 - 5
ambari-web/app/views/main/host/summary.js

@@ -36,7 +36,7 @@ App.MainHostSummaryView = Em.View.extend({
    */
    */
   decommissionDataNodeHostNames: null,
   decommissionDataNodeHostNames: null,
 
 
-  loadDecommisionNodesList: function () {
+  loadDecommissionNodesList: function () {
     var self = this;
     var self = this;
     var clusterName = App.router.get('clusterController.clusterName');
     var clusterName = App.router.get('clusterController.clusterName');
     var persistUrl = App.apiPrefix + '/persist';
     var persistUrl = App.apiPrefix + '/persist';
@@ -88,7 +88,7 @@ App.MainHostSummaryView = Em.View.extend({
     jQuery.ajax(getConfigAjax);
     jQuery.ajax(getConfigAjax);
   },
   },
   didInsertElement: function () {
   didInsertElement: function () {
-    this.loadDecommisionNodesList();
+    this.loadDecommissionNodesList();
   },
   },
   sortedComponents: function() {
   sortedComponents: function() {
     var slaveComponents = [];
     var slaveComponents = [];
@@ -132,7 +132,7 @@ App.MainHostSummaryView = Em.View.extend({
         }
         }
       }
       }
       return 'health-status-' + App.Component.Status.getKeyName(this.get('content.workStatus'));
       return 'health-status-' + App.Component.Status.getKeyName(this.get('content.workStatus'));
-    }.property('content'),
+    }.property('content.workStatus'),
     /**
     /**
      * Disable element while component is starting/stopping
      * Disable element while component is starting/stopping
      */
      */
@@ -152,7 +152,7 @@ App.MainHostSummaryView = Em.View.extend({
       var self = this;
       var self = this;
       var pulsate = [ App.Component.Status.starting, App.Component.Status.stopping ].contains(workStatus);
       var pulsate = [ App.Component.Status.starting, App.Component.Status.stopping ].contains(workStatus);
       if (!pulsate && this.get('isDataNode')) {
       if (!pulsate && this.get('isDataNode')) {
-        var dataNodeComponent = this.get('hostComponent');
+        var dataNodeComponent = this.get('content');
         if (dataNodeComponent)
         if (dataNodeComponent)
           pulsate = dataNodeComponent.get('isDecommissioning');
           pulsate = dataNodeComponent.get('isDecommissioning');
       }
       }
@@ -167,7 +167,7 @@ App.MainHostSummaryView = Em.View.extend({
      */
      */
     startBlinking:function(){
     startBlinking:function(){
       this.doBlinking();
       this.doBlinking();
-    }.observes('content.workStatus', 'content'),
+    }.observes('content.workStatus'),
 
 
     isStart : function() {
     isStart : function() {
       return (this.get('content.workStatus') === App.Component.Status.started || this.get('content.workStatus') === App.Component.Status.starting);
       return (this.get('content.workStatus') === App.Component.Status.started || this.get('content.workStatus') === App.Component.Status.starting);

+ 44 - 1
ambari-web/app/views/main/service.js

@@ -19,5 +19,48 @@
 var App = require('app');
 var App = require('app');
 
 
 App.MainServiceView = Em.View.extend({
 App.MainServiceView = Em.View.extend({
-  templateName:require('templates/main/service')
+  templateName:require('templates/main/service'),
+
+  showAlertsPopup: function (event) {
+    App.ModalPopup.show({
+      header: this.t('services.alerts.headingOfList'),
+      bodyClass: Ember.View.extend({
+        service: event.context,
+        warnAlerts: function () {
+          var allAlerts = App.router.get('clusterController.alerts');
+          var serviceId = this.get('service.serviceName');
+          if (serviceId) {
+            return allAlerts.filterProperty('serviceType', serviceId).filterProperty('isOk', false);
+          }
+          return 0;
+        }.property('App.router.clusterController.alerts'),
+
+        warnAlertsCount: function () {
+          return this.get('warnAlerts').length;
+        }.property('warnAlerts'),
+
+        nagiosUrl: function () {
+          return App.router.get('clusterController.nagiosUrl');
+        }.property('App.router.clusterController.nagiosUrl'),
+
+        closePopup: function () {
+          this.get('parentView').hide();
+        },
+
+        selectService: function () {
+          App.router.transitionTo('services.service.summary', event.context)
+          this.closePopup();
+        },
+        templateName: require('templates/main/service/alert_notification_popup')
+      }),
+      primary: 'Close',
+      onPrimary: function() {
+        this.hide();
+      },
+      secondary : null,
+      didInsertElement: function () {
+        this.$().find('.modal-footer').addClass('align-center');
+      }
+    });
+  }
 });
 });

+ 14 - 14
ambari-web/app/views/main/service/info/summary.js

@@ -17,6 +17,20 @@
 
 
 var App = require('app');
 var App = require('app');
 
 
+App.AlertItemView = Em.View.extend({
+  tagName:"li",
+  templateName: require('templates/main/service/info/summary_alert'),
+  classNameBindings: ["status"],
+  status: function () {
+    return "status-" + this.get("content.status");
+  }.property('content'),
+  didInsertElement: function () {
+    // Tooltips for alerts need to be enabled.
+    $("div[rel=tooltip]").tooltip();
+    $(".tooltip").remove();
+  }
+})
+
 App.MainServiceInfoSummaryView = Em.View.extend({
 App.MainServiceInfoSummaryView = Em.View.extend({
   templateName: require('templates/main/service/info/summary'),
   templateName: require('templates/main/service/info/summary'),
   attributes:null,
   attributes:null,
@@ -330,20 +344,6 @@ App.MainServiceInfoSummaryView = Em.View.extend({
     }
     }
   },
   },
 
 
-  alertItemView:Em.View.extend({
-    tagName:"li",
-    templateName: require('templates/main/service/info/summary_alert'),
-    classNameBindings: ["status"],
-    status: function () {
-      return "status-" + this.get("content.status");
-    }.property('content'),
-    didInsertElement: function () {
-      // Tooltips for alerts need to be enabled.
-      $("div[rel=tooltip]").tooltip();
-      $(".tooltip").remove();
-    }
-  }),
-
   clientHosts:App.Host.find(),
   clientHosts:App.Host.find(),
 
 
   clientHostsLength:function () {
   clientHostsLength:function () {

+ 2 - 1
ambari-web/app/views/main/service/menu.js

@@ -60,7 +60,7 @@ App.MainServiceMenuView = Em.CollectionView.extend({
     active:function () {
     active:function () {
       return this.get('content.id') == this.get('parentView.activeServiceId') ? 'active' : '';
       return this.get('content.id') == this.get('parentView.activeServiceId') ? 'active' : '';
     }.property('parentView.activeServiceId'),
     }.property('parentView.activeServiceId'),
-    alertsCount:function () {
+    alertsCount: function () {
       var allAlerts = App.router.get('clusterController.alerts');
       var allAlerts = App.router.get('clusterController.alerts');
       var serviceId = this.get('content.serviceName');
       var serviceId = this.get('content.serviceName');
       if (serviceId) {
       if (serviceId) {
@@ -68,6 +68,7 @@ App.MainServiceMenuView = Em.CollectionView.extend({
       }
       }
       return 0;
       return 0;
     }.property('App.router.clusterController.alerts'),
     }.property('App.router.clusterController.alerts'),
+
     templateName:require('templates/main/service/menu_item')
     templateName:require('templates/main/service/menu_item')
   })
   })
 });
 });

+ 25 - 1
ambari-web/app/views/wizard/step2_view.js

@@ -39,6 +39,15 @@ App.SshKeyFileUploader = Ember.View.extend({
   }
   }
 });
 });
 
 
+App.WizardTextField = Ember.TextField.extend({
+  disabled: function(){
+    return !this.get('controller.content.installOptions.isJavaHome');
+  }.property('controller.content.installOptions.isJavaHome'),
+  click: function(){
+    return false;
+  }
+})
+
 App.WizardStep2View = Em.View.extend({
 App.WizardStep2View = Em.View.extend({
 
 
   templateName: require('templates/wizard/step2'),
   templateName: require('templates/wizard/step2'),
@@ -141,7 +150,22 @@ App.WizardStep2View = Em.View.extend({
     } else {
     } else {
       return 'hidden';
       return 'hidden';
     }
     }
-  }.property('controller.content.installOptions.sshKey', 'controller.content.installOptions.manualInstall')
+  }.property('controller.content.installOptions.sshKey', 'controller.content.installOptions.manualInstall'),
+
+  manualInstallPopup: function(){
+    if(!this.get('controller.content.installOptions.useSsh')){
+      App.ModalPopup.show({
+        header: "Warning",
+        body: Em.I18n.t('installer.step2.manualInstall.info'),
+        encodeBody: false,
+        onPrimary: function () {
+          this.hide();
+        },
+        secondary: null
+      });
+    }
+    this.set('controller.content.installOptions.manualInstall', !this.get('controller.content.installOptions.useSsh'));
+  }.observes('controller.content.installOptions.useSsh')
 
 
 });
 });
 
 

+ 13 - 3
ambari-web/app/views/wizard/step9_view.js

@@ -129,7 +129,8 @@ App.HostStatusView = Em.View.extend({
     var host = event.context;
     var host = event.context;
     App.ModalPopup.show({
     App.ModalPopup.show({
       header: event.context.get('name'),
       header: event.context.get('name'),
-      classNames: ['full-width-modal'],
+      classNames: ['sixty-percent-width-modal'],
+      autoHeight: false,
       onPrimary:function () {
       onPrimary:function () {
         this.hide();
         this.hide();
       },
       },
@@ -139,6 +140,7 @@ App.HostStatusView = Em.View.extend({
         templateName:require('templates/wizard/step9HostTasksLogPopup'),
         templateName:require('templates/wizard/step9HostTasksLogPopup'),
         isLogWrapHidden: true,
         isLogWrapHidden: true,
         showTextArea: false,
         showTextArea: false,
+        isEmptyList:true,
         controllerBinding:context,
         controllerBinding:context,
         hostObj:function () {
         hostObj:function () {
           return this.get('parentView.obj');
           return this.get('parentView.obj');
@@ -172,6 +174,8 @@ App.HostStatusView = Em.View.extend({
         },
         },
 
 
         visibleTasks: function () {
         visibleTasks: function () {
+          var self=this;
+          self.set("isEmptyList", true);
           if (this.get('category.value')) {
           if (this.get('category.value')) {
             var filter = this.get('category.value');
             var filter = this.get('category.value');
             $.each(this.get("roles"),function(a,e){
             $.each(this.get("roles"),function(a,e){
@@ -207,6 +211,10 @@ App.HostStatusView = Em.View.extend({
               {
               {
                 e.taskInfos.filterProperty("status", "timedout").setEach("isVisible", true);
                 e.taskInfos.filterProperty("status", "timedout").setEach("isVisible", true);
               }
               }
+
+              if(e.taskInfos.filterProperty("isVisible", true).length >0){
+                self.set("isEmptyList", false);
+              }
             })
             })
           }
           }
         }.observes('category'),
         }.observes('category'),
@@ -219,7 +227,7 @@ App.HostStatusView = Em.View.extend({
             Ember.Object.create({value: 'completed', label: 'Success' }),
             Ember.Object.create({value: 'completed', label: 'Success' }),
             Ember.Object.create({value: 'aborted', label: 'Cancelled' }),
             Ember.Object.create({value: 'aborted', label: 'Cancelled' }),
             Ember.Object.create({value: 'timedout', label: 'Timed Out' })
             Ember.Object.create({value: 'timedout', label: 'Timed Out' })
-          ],
+        ],
 
 
         category: null,
         category: null,
 
 
@@ -271,7 +279,8 @@ App.HostStatusView = Em.View.extend({
 
 
         getStartedTasks:function (host) {
         getStartedTasks:function (host) {
           var startedTasks = host.logTasks.filter(function (task) {
           var startedTasks = host.logTasks.filter(function (task) {
-            return task.Tasks.status != 'PENDING' && task.Tasks.status != 'QUEUED';
+            return task.Tasks.status;
+            //return task.Tasks.status != 'PENDING' && task.Tasks.status != 'QUEUED';
           });
           });
           return startedTasks;
           return startedTasks;
         },
         },
@@ -305,6 +314,7 @@ App.HostStatusView = Em.View.extend({
                 var task = $.parseJSON(data);
                 var task = $.parseJSON(data);
                 $(".stderr").html(task.Tasks.stderr);
                 $(".stderr").html(task.Tasks.stderr);
                 $(".stdout").html(task.Tasks.stdout);
                 $(".stdout").html(task.Tasks.stdout);
+                $(".modal").scrollTop(0);
                 $(".modal-body").scrollTop(0);
                 $(".modal-body").scrollTop(0);
               },
               },
               error:function () {
               error:function () {