git commit: AMBARI-7286. Associating repository latest url for deploying cluster using blueprint (Cabir Zounaidou via alejandro)

2014-09-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 380fc2c70 -> b82ac7abf


AMBARI-7286. Associating repository latest url for deploying cluster using 
blueprint (Cabir Zounaidou via alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b82ac7ab
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b82ac7ab
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b82ac7ab

Branch: refs/heads/trunk
Commit: b82ac7abf4e9979a8c9d5a244565e2e3e58c2374
Parents: 380fc2c
Author: Alejandro Fernandez 
Authored: Fri Sep 19 22:11:50 2014 -0700
Committer: Alejandro Fernandez 
Committed: Fri Sep 19 22:11:50 2014 -0700

--
 .../server/state/stack/LatestRepoCallable.java  |  59 
 .../server/api/services/AmbariMetaInfoTest.java | 145 ++-
 2 files changed, 174 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b82ac7ab/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
index 47d93f1..efb2d0a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
@@ -41,13 +41,13 @@ import com.google.gson.reflect.TypeToken;
 public class LatestRepoCallable implements Callable {
   private static final int LOOKUP_CONNECTION_TIMEOUT = 2000;
   private static final int LOOKUP_READ_TIMEOUT = 1000;
-  
+
   private final static Logger LOG = 
LoggerFactory.getLogger(LatestRepoCallable.class);
-  
+
   private String sourceUri = null;
   private File stackRepoFolder = null;
   private StackInfo stack = null;
-  
+
   public LatestRepoCallable(String latestSourceUri, File stackRepoFolder, 
StackInfo stack) {
 this.sourceUri = latestSourceUri;
 this.stackRepoFolder = stackRepoFolder;
@@ -56,19 +56,19 @@ public class LatestRepoCallable implements Callable {
 
   @Override
   public Void call() throws Exception {
-
+
 Type type = new TypeToken>>(){}.getType();
 Gson gson = new Gson();
-
+
 Map> latestUrlMap = null;
-
+
 try {
   if (sourceUri.startsWith("http")) {
-
+
 URLStreamProvider streamProvider = new URLStreamProvider(
 LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
 null, null, null);
-
+
 LOG.info("Loading latest URL info from " + sourceUri);
 latestUrlMap = gson.fromJson(new InputStreamReader(
 streamProvider.readFrom(sourceUri)), type);
@@ -79,7 +79,7 @@ public class LatestRepoCallable implements Callable {
 } else {
   jsonFile = new File(sourceUri);
 }
-
+
 if (jsonFile.exists()) {
   LOG.info("Loading latest URL info from " + jsonFile);
   latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
@@ -89,71 +89,76 @@ public class LatestRepoCallable implements Callable {
   LOG.error("Could not load the URI " + sourceUri + " (" + e.getMessage() 
+ ")");
   throw e;
 }
-
-
+
+
 if (null != latestUrlMap) {
   for (RepositoryInfo ri : stack.getRepositories()) {
 if (latestUrlMap.containsKey(ri.getRepoId())) {
   Map valueMap = latestUrlMap.get(ri.getRepoId());
   if (valueMap.containsKey("latest")) {
-
+
 @SuppressWarnings("unchecked")
 Map osMap = (Map) 
valueMap.get("latest");
-
+
 String baseUrl = resolveOsUrl(ri.getOsType(), osMap);
 if (null != baseUrl) {
   // !!! in the case where .repo is defined with the base 
url, strip that off.
   // Agents do the reverse action (take the base url, and append 
.repo)
-  
+
   String repo_file_format;
   if(ri.getOsType().equals("ubuntu12")) {
 repo_file_format = "list";
   } else {
 repo_file_format = "repo";
   }
-  
+
   String repoFileName = stack.getName().toLowerCase() + "." + 
repo_file_format;
-  int idx = baseUrl.toLowerCase().indexOf(repoFileName); 
-  
+  int idx = baseUrl.toLowerCase().indexOf(repoFileName);
+
   if (-1 != idx && baseUrl.toLowerCase().endsWith(repoFileName)) {
 baseUrl = baseUrl.substring(0, idx);
   }
-  
+
   if ('/' == baseUrl.charAt(baseUrl.length()-1)) {
 baseUrl = baseUrl.substring(0, baseUrl.length()

git commit: Revert "AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir Zounaidou via alejandro)"

2014-09-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 348d918a9 -> 380fc2c70


Revert "AMBARI-7286. Use latest repo url in blueprints rather than the default 
(Cabir Zounaidou via alejandro)"


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/380fc2c7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/380fc2c7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/380fc2c7

Branch: refs/heads/trunk
Commit: 380fc2c70c24a6fd719cfd6843043b1189243f70
Parents: 348d918
Author: Alejandro Fernandez 
Authored: Fri Sep 19 17:24:17 2014 -0700
Committer: Alejandro Fernandez 
Committed: Fri Sep 19 17:24:17 2014 -0700

--
 .../server/state/stack/LatestRepoCallable.java  |  59 
 .../server/api/services/AmbariMetaInfoTest.java | 135 +--
 2 files changed, 30 insertions(+), 164 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/380fc2c7/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
index efb2d0a..47d93f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
@@ -41,13 +41,13 @@ import com.google.gson.reflect.TypeToken;
 public class LatestRepoCallable implements Callable {
   private static final int LOOKUP_CONNECTION_TIMEOUT = 2000;
   private static final int LOOKUP_READ_TIMEOUT = 1000;
-
+  
   private final static Logger LOG = 
LoggerFactory.getLogger(LatestRepoCallable.class);
-
+  
   private String sourceUri = null;
   private File stackRepoFolder = null;
   private StackInfo stack = null;
-
+  
   public LatestRepoCallable(String latestSourceUri, File stackRepoFolder, 
StackInfo stack) {
 this.sourceUri = latestSourceUri;
 this.stackRepoFolder = stackRepoFolder;
@@ -56,19 +56,19 @@ public class LatestRepoCallable implements Callable {
 
   @Override
   public Void call() throws Exception {
-
+
 Type type = new TypeToken>>(){}.getType();
 Gson gson = new Gson();
-
+
 Map> latestUrlMap = null;
-
+
 try {
   if (sourceUri.startsWith("http")) {
-
+
 URLStreamProvider streamProvider = new URLStreamProvider(
 LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
 null, null, null);
-
+
 LOG.info("Loading latest URL info from " + sourceUri);
 latestUrlMap = gson.fromJson(new InputStreamReader(
 streamProvider.readFrom(sourceUri)), type);
@@ -79,7 +79,7 @@ public class LatestRepoCallable implements Callable {
 } else {
   jsonFile = new File(sourceUri);
 }
-
+
 if (jsonFile.exists()) {
   LOG.info("Loading latest URL info from " + jsonFile);
   latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
@@ -89,76 +89,71 @@ public class LatestRepoCallable implements Callable {
   LOG.error("Could not load the URI " + sourceUri + " (" + e.getMessage() 
+ ")");
   throw e;
 }
-
-
+
+
 if (null != latestUrlMap) {
   for (RepositoryInfo ri : stack.getRepositories()) {
 if (latestUrlMap.containsKey(ri.getRepoId())) {
   Map valueMap = latestUrlMap.get(ri.getRepoId());
   if (valueMap.containsKey("latest")) {
-
+
 @SuppressWarnings("unchecked")
 Map osMap = (Map) 
valueMap.get("latest");
-
+
 String baseUrl = resolveOsUrl(ri.getOsType(), osMap);
 if (null != baseUrl) {
   // !!! in the case where .repo is defined with the base 
url, strip that off.
   // Agents do the reverse action (take the base url, and append 
.repo)
-
+  
   String repo_file_format;
   if(ri.getOsType().equals("ubuntu12")) {
 repo_file_format = "list";
   } else {
 repo_file_format = "repo";
   }
-
+  
   String repoFileName = stack.getName().toLowerCase() + "." + 
repo_file_format;
-  int idx = baseUrl.toLowerCase().indexOf(repoFileName);
-
+  int idx = baseUrl.toLowerCase().indexOf(repoFileName); 
+  
   if (-1 != idx && baseUrl.toLowerCase().endsWith(repoFileName)) {
 baseUrl = baseUrl.substring(0, idx);
   }
-
+  
   if ('/' == baseUrl.charAt(baseUrl.length()-1)) {
 baseUrl = baseUrl.substring(0, baseUrl.length()-1);

git commit: AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir Zounaidou via alejandro)

2014-09-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk c840be073 -> 348d918a9


AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir 
Zounaidou via alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/348d918a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/348d918a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/348d918a

Branch: refs/heads/trunk
Commit: 348d918a91cd12688ea43b08931b419a7325ac9d
Parents: c840be0
Author: Alejandro Fernandez 
Authored: Fri Sep 19 16:07:52 2014 -0700
Committer: Alejandro Fernandez 
Committed: Fri Sep 19 16:07:52 2014 -0700

--
 .../server/state/stack/LatestRepoCallable.java  |  59 
 .../server/api/services/AmbariMetaInfoTest.java | 135 ++-
 2 files changed, 164 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/348d918a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
index 47d93f1..efb2d0a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
@@ -41,13 +41,13 @@ import com.google.gson.reflect.TypeToken;
 public class LatestRepoCallable implements Callable {
   private static final int LOOKUP_CONNECTION_TIMEOUT = 2000;
   private static final int LOOKUP_READ_TIMEOUT = 1000;
-  
+
   private final static Logger LOG = 
LoggerFactory.getLogger(LatestRepoCallable.class);
-  
+
   private String sourceUri = null;
   private File stackRepoFolder = null;
   private StackInfo stack = null;
-  
+
   public LatestRepoCallable(String latestSourceUri, File stackRepoFolder, 
StackInfo stack) {
 this.sourceUri = latestSourceUri;
 this.stackRepoFolder = stackRepoFolder;
@@ -56,19 +56,19 @@ public class LatestRepoCallable implements Callable {
 
   @Override
   public Void call() throws Exception {
-
+
 Type type = new TypeToken>>(){}.getType();
 Gson gson = new Gson();
-
+
 Map> latestUrlMap = null;
-
+
 try {
   if (sourceUri.startsWith("http")) {
-
+
 URLStreamProvider streamProvider = new URLStreamProvider(
 LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
 null, null, null);
-
+
 LOG.info("Loading latest URL info from " + sourceUri);
 latestUrlMap = gson.fromJson(new InputStreamReader(
 streamProvider.readFrom(sourceUri)), type);
@@ -79,7 +79,7 @@ public class LatestRepoCallable implements Callable {
 } else {
   jsonFile = new File(sourceUri);
 }
-
+
 if (jsonFile.exists()) {
   LOG.info("Loading latest URL info from " + jsonFile);
   latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
@@ -89,71 +89,76 @@ public class LatestRepoCallable implements Callable {
   LOG.error("Could not load the URI " + sourceUri + " (" + e.getMessage() 
+ ")");
   throw e;
 }
-
-
+
+
 if (null != latestUrlMap) {
   for (RepositoryInfo ri : stack.getRepositories()) {
 if (latestUrlMap.containsKey(ri.getRepoId())) {
   Map valueMap = latestUrlMap.get(ri.getRepoId());
   if (valueMap.containsKey("latest")) {
-
+
 @SuppressWarnings("unchecked")
 Map osMap = (Map) 
valueMap.get("latest");
-
+
 String baseUrl = resolveOsUrl(ri.getOsType(), osMap);
 if (null != baseUrl) {
   // !!! in the case where .repo is defined with the base 
url, strip that off.
   // Agents do the reverse action (take the base url, and append 
.repo)
-  
+
   String repo_file_format;
   if(ri.getOsType().equals("ubuntu12")) {
 repo_file_format = "list";
   } else {
 repo_file_format = "repo";
   }
-  
+
   String repoFileName = stack.getName().toLowerCase() + "." + 
repo_file_format;
-  int idx = baseUrl.toLowerCase().indexOf(repoFileName); 
-  
+  int idx = baseUrl.toLowerCase().indexOf(repoFileName);
+
   if (-1 != idx && baseUrl.toLowerCase().endsWith(repoFileName)) {
 baseUrl = baseUrl.substring(0, idx);
   }
-  
+
   if ('/' == baseUrl.charAt(baseUrl.length()-1)) {
 baseUrl = baseUrl.substring(0, baseUrl.length()-1);
 

git commit: AMBARI-7418 - Views: cannot create instance w/o a restart.

2014-09-19 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 40050513e -> c840be073


AMBARI-7418 - Views: cannot create instance w/o a restart.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c840be07
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c840be07
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c840be07

Branch: refs/heads/trunk
Commit: c840be073d1b969b50bedee9d8252dbc20ea9ab9
Parents: 4005051
Author: tbeerbower 
Authored: Fri Sep 19 18:32:31 2014 -0400
Committer: tbeerbower 
Committed: Fri Sep 19 18:49:46 2014 -0400

--
 .../ambari/server/view/ViewProviderModule.java  | 26 
 .../apache/ambari/server/view/ViewRegistry.java | 22 -
 .../ambari/server/view/ViewRegistryTest.java| 20 +++
 3 files changed, 46 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c840be07/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
index edaff1b..5fadf22 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
@@ -22,9 +22,7 @@ import 
org.apache.ambari.server.controller.spi.PropertyProvider;
 import org.apache.ambari.server.controller.spi.ProviderModule;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
-import org.apache.ambari.server.orm.entities.ViewEntity;
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -35,11 +33,6 @@ import java.util.Map;
  */
 public class ViewProviderModule implements ProviderModule {
   /**
-   * Mapping of view resource type to resource provider.
-   */
-  private final Map resourceProviders;
-
-  /**
* The delegate provider module.
*/
   private final ProviderModule providerModule;
@@ -51,12 +44,9 @@ public class ViewProviderModule implements ProviderModule {
* Construct a view provider module.
*
* @param providerModule the delegate provider module
-   * @param resourceProviders  the map of view resource types to resource 
providers
*/
-  private ViewProviderModule(ProviderModule providerModule,
-Map 
resourceProviders) {
+  private ViewProviderModule(ProviderModule providerModule) {
 this.providerModule = providerModule;
-this.resourceProviders = resourceProviders;
   }
 
 
@@ -65,6 +55,9 @@ public class ViewProviderModule implements ProviderModule {
   @Override
   public ResourceProvider getResourceProvider(Resource.Type type) {
 
+Map resourceProviders =
+ViewRegistry.getInstance().getResourceProviders();
+
 if (resourceProviders.containsKey(type)) {
   return resourceProviders.get(type);
 }
@@ -87,15 +80,6 @@ public class ViewProviderModule implements ProviderModule {
* @return a view provider module
*/
   public static ViewProviderModule getViewProviderModule(ProviderModule 
module) {
-Map resourceProviders = new 
HashMap();
-
-ViewRegistry registry = ViewRegistry.getInstance();
-for (ViewEntity definition : registry.getDefinitions()) {
-  for (Resource.Type type : definition.getViewResourceTypes()){
-ResourceProvider provider = definition.getResourceProvider(type);
-resourceProviders.put(type, provider);
-  }
-}
-return new ViewProviderModule(module, resourceProviders);
+return new ViewProviderModule(module);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c840be07/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 5e652a1..58c4334 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -29,6 +29,7 @@ import 
org.apache.ambari.server.api.services.ViewExternalSubResourceService;
 import org.apache.ambari.server.api.services.ViewSubResourceService;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.orm.dao.MemberDAO;
 import org.apache.ambari.server.orm.dao.Privileg

git commit: AMBARI-7348. Single Sign-On with Views API to impersonate account (alejandro)

2014-09-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 1f7dbd5df -> 40050513e


AMBARI-7348. Single Sign-On with Views API to impersonate account (alejandro)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40050513
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40050513
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40050513

Branch: refs/heads/trunk
Commit: 40050513e2cecaabf4139e40e09f8b198e6a7bd5
Parents: 1f7dbd5
Author: Alejandro Fernandez 
Authored: Wed Sep 17 19:52:41 2014 -0700
Committer: Alejandro Fernandez 
Committed: Fri Sep 19 11:47:20 2014 -0700

--
 .../controller/internal/URLStreamProvider.java  |   4 +
 .../ambari/server/proxy/ProxyService.java   |  17 +-
 .../server/view/HttpImpersonatorImpl.java   | 167 +++
 .../server/view/ImpersonatorSettingImpl.java|  63 +++
 .../ambari/server/view/ViewContextImpl.java |  18 +-
 .../ambari/server/proxy/ProxyServiceTest.java   |  14 ++
 .../server/view/HttpImpersonatorImplTest.java   | 128 ++
 .../apache/ambari/view/HttpImpersonator.java|  53 ++
 .../apache/ambari/view/ImpersonatorSetting.java |  46 +
 .../org/apache/ambari/view/ViewContext.java |  15 ++
 ambari-web/app/utils/ajax/ajax.js   |  22 ---
 contrib/views/jobs/pom.xml  |  15 ++
 .../apache/ambari/view/jobs/ProxyServlet.java   |  68 
 .../jobs/src/main/resources/WEB-INF/web.xml |  37 
 .../app/scripts/controllers/jobs_controller.js  |  10 +-
 .../resources/ui/app/scripts/helpers/ajax.js|  25 ++-
 .../resources/ui/app/scripts/helpers/jobs.js|  15 +-
 .../ui/app/scripts/routes/application_route.js  |   8 +
 18 files changed, 687 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/40050513/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
index 2b32d11..1b57c84 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
@@ -218,4 +218,8 @@ public class URLStreamProvider implements StreamProvider {
  
 return connection;
   }
+
+  public AppCookieManager getAppCookieManager() {
+return appCookieManager;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/40050513/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 
b/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
index 30e998b..2cdffef 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
@@ -20,6 +20,7 @@ package org.apache.ambari.server.proxy;
 
 import com.google.gson.Gson;
 import org.apache.ambari.server.controller.internal.URLStreamProvider;
+import org.apache.ambari.server.view.ImpersonatorSettingImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,6 +37,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -48,9 +50,9 @@ import java.util.HashMap;
 @Path("/")
 public class ProxyService {
 
-  private static final int URL_CONNECT_TIMEOUT = 2;
-  private static final int URL_READ_TIMEOUT = 15000;
-  private static final int HTTP_ERROR_RANGE_START = 
Response.Status.BAD_REQUEST.getStatusCode();
+  public static final int URL_CONNECT_TIMEOUT = 2;
+  public static final int URL_READ_TIMEOUT = 15000;
+  public static final int HTTP_ERROR_RANGE_START = 
Response.Status.BAD_REQUEST.getStatusCode();
 
   private static final String REQUEST_TYPE_GET = "GET";
   private static final String REQUEST_TYPE_POST = "POST";
@@ -59,6 +61,7 @@ public class ProxyService {
   private static final String QUERY_PARAMETER_URL = "url=";
   private static final String AMBARI_PROXY_PREFIX = "AmbariProxy-";
   private static final String ERROR_PROCESSING_URL = "Error occurred during 
processing URL ";
+  private static final String INVALID_PARAM_IN_URL = "Invalid query params 
found in URL ";
 
   private final static Logger LOG = 
LoggerFactory.getLogg

git commit: AMBARI-7349 - Admin : LDAP Sync API to support sync events

2014-09-19 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 21d784b68 -> 1f7dbd5df


AMBARI-7349 - Admin : LDAP Sync API to support sync events


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1f7dbd5d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1f7dbd5d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1f7dbd5d

Branch: refs/heads/trunk
Commit: 1f7dbd5df4b624a083cc8f8fe4141e6289ecf46e
Parents: 21d784b
Author: tbeerbower 
Authored: Thu Sep 18 22:12:45 2014 -0400
Committer: tbeerbower 
Committed: Fri Sep 19 14:25:08 2014 -0400

--
 .../LdapSyncEventResourceDefinition.java|  57 +++
 .../resources/ResourceInstanceFactoryImpl.java  |   4 +
 .../api/services/LdapSyncEventService.java  | 144 ++
 .../internal/DefaultProviderModule.java |   2 +
 .../internal/LdapSyncEventResourceProvider.java | 438 +++
 .../ambari/server/controller/spi/Resource.java  |   4 +-
 .../orm/entities/LdapSyncEventEntity.java   | 284 
 .../server/orm/entities/LdapSyncSpecEntity.java | 143 ++
 .../LdapSyncEventResourceDefinitionTest.java|  49 +++
 .../api/services/LdapSyncEventServiceTest.java  |  97 
 .../LdapSyncEventResourceProviderTest.java  | 114 +
 .../orm/entities/LdapSyncEventEntityTest.java   | 166 +++
 .../orm/entities/LdapSyncSpecEntityTest.java|  95 
 13 files changed, 1596 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7dbd5d/ambari-server/src/main/java/org/apache/ambari/server/api/resources/LdapSyncEventResourceDefinition.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/LdapSyncEventResourceDefinition.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/LdapSyncEventResourceDefinition.java
new file mode 100644
index 000..554c688
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/LdapSyncEventResourceDefinition.java
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+package org.apache.ambari.server.api.resources;
+
+import org.apache.ambari.server.controller.spi.Resource;
+
+import java.util.Collections;
+import java.util.Set;
+
+/**
+ * LDAP sync event resource definition.
+ */
+public class LdapSyncEventResourceDefinition extends BaseResourceDefinition {
+
+  // - Constructors --
+
+  /**
+   * Construct an event resource definition.
+   */
+  public LdapSyncEventResourceDefinition() {
+super(Resource.Type.LdapSyncEvent);
+  }
+
+
+  // - ResourceDefinition 
+
+  @Override
+  public String getPluralName() {
+return "ldap_sync_events";
+  }
+
+  @Override
+  public String getSingularName() {
+return "ldap_sync_event";
+  }
+
+  @Override
+  public Set getSubResourceDefinitions() {
+return Collections.emptySet();
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f7dbd5d/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index f85c0ea..2676fd3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -280,6 +280,10 @@ public class ResourceInstanceFactoryImpl implements 
ResourceInstanceFactory {
 resourceDefinition = new ClientConfigResourceDefinition();
 break;
 
+  case LdapSyncEvent:
+resourceDefinition = new LdapSyncEventResourceDefinition();
+break;
+
   default:

[1/2] AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline ambari-server sync-ldap to call the API for syncing.

2014-09-19 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk d018aa6a1 -> 21d784b68


http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
index 906d695..93a0b46 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
@@ -18,11 +18,14 @@
 package org.apache.ambari.server.security.ldap;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import junit.framework.Assert;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
@@ -31,10 +34,10 @@ import org.apache.ambari.server.orm.entities.MemberEntity;
 import org.apache.ambari.server.orm.entities.PrincipalEntity;
 import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
+import org.apache.ambari.server.security.authorization.Group;
 import org.apache.ambari.server.security.authorization.LdapServerProperties;
 import org.apache.ambari.server.security.authorization.User;
 import org.apache.ambari.server.security.authorization.Users;
-import org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -42,76 +45,1312 @@ import org.junit.Test;
 import org.springframework.ldap.core.AttributesMapper;
 import org.springframework.ldap.core.LdapTemplate;
 
+import static junit.framework.Assert.*;
+import static org.easymock.EasyMock.*;
+
 public class AmbariLdapDataPopulatorTest {
-  private static class AmbariLdapDataPopulatorTestInstance extends 
AmbariLdapDataPopulator {
+  public static class AmbariLdapDataPopulatorTestInstance extends 
AmbariLdapDataPopulator {
 
-public AmbariLdapDataPopulatorTestInstance(Configuration configuration,
-Users users) {
+public AmbariLdapDataPopulatorTestInstance(Configuration configuration, 
Users users) {
   super(configuration, users);
-  this.ldapServerProperties = 
EasyMock.createNiceMock(LdapServerProperties.class);
 }
 
-final LdapTemplate ldapTemplate = 
EasyMock.createNiceMock(LdapTemplate.class);
+private LdapTemplate ldapTemplate;
 
 @Override
 protected LdapTemplate loadLdapTemplate() {
   return ldapTemplate;
 }
 
+public void setLdapTemplate(LdapTemplate ldapTemplate) {
+  this.ldapTemplate = ldapTemplate;
+}
+
 public LdapServerProperties getLdapServerProperties() {
   return this.ldapServerProperties;
 }
+
+public void setLdapServerProperties(LdapServerProperties 
ldapServerProperties) {
+  this.ldapServerProperties = ldapServerProperties;
+}
   }
 
   @Test
   public void testIsLdapEnabled_badConfiguration() {
-final Configuration configuration = 
EasyMock.createNiceMock(Configuration.class);
-final Users users = EasyMock.createNiceMock(Users.class);
+final Configuration configuration = createNiceMock(Configuration.class);
+final Users users = createNiceMock(Users.class);
 
-final AmbariLdapDataPopulator populator = new 
AmbariLdapDataPopulatorTestInstance(configuration, users);
+LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
+LdapServerProperties ldapServerProperties = 
createNiceMock(LdapServerProperties.class);
+expect(configuration.isLdapConfigured()).andReturn(true);
+expect(ldapTemplate.search(EasyMock.anyObject(), 
EasyMock.anyObject(), 
EasyMock.anyObject())).andThrow(new 
NullPointerException()).once();
+replay(ldapTemplate, configuration, ldapServerProperties);
 
-EasyMock.expect(configuration.isLdapConfigured()).andReturn(true);
-EasyMock.expect(populator.loadLdapTemplate().search(EasyMock. 
anyObject(), EasyMock. anyObject(), EasyMock. 
anyObject())).andThrow(new NullPointerException()).once();
-EasyMock.replay(populator.loadLdapTemplate(), configuration);
+final AmbariLdapDataPopulatorTestInstance populator = new 
AmbariLdapDataPopulatorTestInstance(configuration, users);
+populator.setLdapTemplate(ldapTemplate);
+populator.setLdapServerProperties(ldapServerProperties);
 
-Assert.assertFalse(populator.isLdapEnabled());
-EasyMock.verify(populator.loadLdapTemplate(), configuration);
+assertFalse(populator.isLdapEnabled());
+verify(populator.loadLdapTemplate(), configuration);
   }
 

[2/2] git commit: AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline ambari-server sync-ldap to call the API for syncing.

2014-09-19 Thread swagle
AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline 
ambari-server sync-ldap to call the API for syncing.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21d784b6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21d784b6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21d784b6

Branch: refs/heads/trunk
Commit: 21d784b68764899c8aa7262ba4b9a447911ddc22
Parents: d018aa6
Author: Siddharth Wagle 
Authored: Fri Sep 19 11:21:04 2014 -0700
Committer: Siddharth Wagle 
Committed: Fri Sep 19 11:24:05 2014 -0700

--
 .../main/resources/ui/admin-web/app/index.html  |1 -
 .../app/scripts/controllers/NavbarCtrl.js   |   22 +-
 .../ui/admin-web/app/scripts/services/ldap.js   |   60 -
 .../resources/ui/admin-web/app/styles/main.css  |   10 +-
 .../ui/admin-web/app/views/leftNavbar.html  |9 -
 ambari-server/sbin/ambari-server|4 +
 .../controller/AmbariManagementController.java  |   10 +-
 .../AmbariManagementControllerImpl.java |   31 +-
 .../internal/ControllerResourceProvider.java|   53 +-
 .../server/security/authorization/Users.java|   17 +-
 .../security/ldap/AmbariLdapDataPopulator.java  |  268 +++-
 ambari-server/src/main/python/ambari-server.py  |   74 +
 .../ldap/AmbariLdapDataPopulatorTest.java   | 1329 +-
 .../security/ldap/LdapPerformanceTest.java  |   10 +-
 14 files changed, 1673 insertions(+), 225 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/index.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
index 7ff0638..2fb9fce 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -134,7 +134,6 @@
 
 
 
-
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
index 9434cff..130d6fc 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 
'ROUTES', 'LDAP', 'ConfirmationModal', '$rootScope', function($scope, Cluster, 
$location, uiAlert, ROUTES, LDAP, ConfirmationModal, $rootScope) {
+.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 
'ROUTES', 'ConfirmationModal', '$rootScope', function($scope, Cluster, 
$location, uiAlert, ROUTES, ConfirmationModal, $rootScope) {
   $scope.cluster = null;
   $scope.editCluster = {
 name: '',
@@ -73,24 +73,4 @@ angular.module('ambariAdminConsole')
var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+'));
return r.test($location.path());
   };
-
-  $scope.isLDAPConfigured = false;
-  $scope.ldapData = {};
-  LDAP.get().then(function(data) {
-$scope.ldapData = data.data;
-$scope.isLDAPConfigured = data.data['LDAP']['configured'];
-  });
-
-  $scope.syncLDAP = function() {
-ConfirmationModal.show('Sync LDAP', 'Are you sure you want to sync 
LDAP?').then(function() {
-  LDAP.sync($scope.ldapData['LDAP'].groups, 
$scope.ldapData['LDAP'].users).then(function() {
-uiAlert.success('LDAP synced successful');
-$rootScope.$evalAsync(function() {
-  $rootScope.LDAPSynced = true;
-});
-  }).catch(function(data) {
-uiAlert.danger(data.data.status, data.data.message);
-  });
-});
-  };
 }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js
deleted file mode 100644
index a911ec2..000
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional informat

git commit: AMBARI-7416. Slider View: Do not show Flex action when app is stopped (alexantonenko)

2014-09-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk fbe97db79 -> d018aa6a1


AMBARI-7416. Slider View: Do not show Flex action when app is stopped 
(alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d018aa6a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d018aa6a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d018aa6a

Branch: refs/heads/trunk
Commit: d018aa6a1b720149fe4417801122cd72c322e4ab
Parents: fbe97db
Author: Alex Antonenko 
Authored: Fri Sep 19 21:11:25 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 21:22:46 2014 +0300

--
 .../main/resources/ui/app/controllers/slider_app_controller.js | 2 +-
 .../slider/src/main/resources/ui/app/styles/application.less   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d018aa6a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index f042e38..94ae7e7 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -56,7 +56,7 @@ App.SliderAppController = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
 confirm: true
   });
 }
-if ('FINISHED' !== status) {
+if ('RUNNING' == status) {
   actions.push({
 title: 'Flex',
 action: 'flex',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d018aa6a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index f0d0bab..98f52d4 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -595,6 +595,9 @@ select {
 border-width: 0;
   }
 }
+td:nth-child(2) span{
+  word-break: break-all;
+}
   }
   .panel-heading {
 font-weight: 700;
@@ -604,9 +607,6 @@ select {
 td:first-child {
   text-align: right;
 }
-span{
-  word-break: break-all;
-}
   }
   .panel-components {
 .status {



git commit: AMBARI-7414. ATS shows stopped after upgrade 1.6.1 -> 1.7.0.(vbrodetskyi)

2014-09-19 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk d99a275f5 -> fbe97db79


AMBARI-7414. ATS shows stopped after upgrade 1.6.1 -> 1.7.0.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fbe97db7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fbe97db7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fbe97db7

Branch: refs/heads/trunk
Commit: fbe97db797a276a490b9aeba752a22df3e5a8f07
Parents: d99a275
Author: Vitaly Brodetskyi 
Authored: Fri Sep 19 21:01:24 2014 +0300
Committer: Vitaly Brodetskyi 
Committed: Fri Sep 19 21:01:24 2014 +0300

--
 .../services/YARN/package/scripts/application_timeline_server.py   | 2 ++
 .../HDP/2.0.6/services/YARN/package/scripts/status_params.py   | 1 +
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe97db7/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
index 85d97c2..b38c147 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
@@ -49,6 +49,8 @@ class ApplicationTimelineServer(Script):
   def status(self, env):
 import status_params
 env.set_params(status_params)
+Execute(format("mv {yarn_historyserver_pid_file_old} 
{yarn_historyserver_pid_file}"),
+only_if = format("test -e {yarn_historyserver_pid_file_old}", 
user=status_params.yarn_user))
 check_process_status(status_params.yarn_historyserver_pid_file)
 
 if __name__ == "__main__":

http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe97db7/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
index 6bc977c..498a885 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
@@ -31,5 +31,6 @@ mapred_pid_dir = 
format("{mapred_pid_dir_prefix}/{mapred_user}")
 
 resourcemanager_pid_file = 
format("{yarn_pid_dir}/yarn-{yarn_user}-resourcemanager.pid")
 nodemanager_pid_file = 
format("{yarn_pid_dir}/yarn-{yarn_user}-nodemanager.pid")
+yarn_historyserver_pid_file_old = 
format("{yarn_pid_dir}/yarn-{yarn_user}-historyserver.pid")
 yarn_historyserver_pid_file = 
format("{yarn_pid_dir}/yarn-{yarn_user}-timelineserver.pid")  # 
*-historyserver.pid is deprecated
 mapred_historyserver_pid_file = 
format("{mapred_pid_dir}/mapred-{mapred_user}-historyserver.pid")
\ No newline at end of file



git commit: AMBARI-7415. Properties from Xml should be automatically added during upgrade (aonishuk)

2014-09-19 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk edce1b29b -> d99a275f5


AMBARI-7415. Properties from Xml should be automatically added during upgrade 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d99a275f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d99a275f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d99a275f

Branch: refs/heads/trunk
Commit: d99a275f552813593ff378270a8d411f34a25937
Parents: edce1b2
Author: Andrew Onishuk 
Authored: Fri Sep 19 20:53:05 2014 +0300
Committer: Andrew Onishuk 
Committed: Fri Sep 19 20:53:05 2014 +0300

--
 .../ambari/server/state/ConfigHelper.java   |  39 
 .../server/upgrade/AbstractUpgradeCatalog.java  | 215 ++-
 .../server/upgrade/UpgradeCatalog161.java   |   2 +-
 .../server/upgrade/UpgradeCatalog170.java   |  27 +--
 .../server/upgrade/UpgradeCatalog161Test.java   |   2 +-
 .../server/upgrade/UpgradeCatalog170Test.java   |  35 +--
 6 files changed, 216 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d99a275f/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 191549b..8b724b1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -474,6 +474,8 @@ public class ConfigHelper {
 
 for(ServiceInfo serviceInfo:stack.getServices()) { 
   Set stackProperties = 
ambariMetaInfo.getProperties(stack.getName(), stack.getVersion(), 
serviceInfo.getName());
+  Set stackLevelProperties = 
ambariMetaInfo.getStackProperties(stack.getName(), stack.getVersion());
+  stackProperties.addAll(stackLevelProperties);
   
   for (PropertyInfo stackProperty : stackProperties) {
 String stackPropertyConfigType = 
fileNameToConfigType(stackProperty.getFilename());
@@ -488,6 +490,43 @@ public class ConfigHelper {
 return null;
   }
   
+  public ServiceInfo getPropertyOwnerService(Cluster cluster, String 
configType, String propertyName) throws AmbariException {
+StackId stackId = cluster.getCurrentStackVersion();
+StackInfo stack = ambariMetaInfo.getStackInfo(stackId.getStackName(),
+stackId.getStackVersion());
+
+for(ServiceInfo serviceInfo:stack.getServices()) { 
+  Set stackProperties = 
ambariMetaInfo.getProperties(stack.getName(), stack.getVersion(), 
serviceInfo.getName());
+  
+  for (PropertyInfo stackProperty : stackProperties) {
+String stackPropertyConfigType = 
fileNameToConfigType(stackProperty.getFilename());
+
+if(stackProperty.getName().equals(propertyName) && 
stackPropertyConfigType.equals(configType)) {
+  return serviceInfo;
+}
+  }
+  
+}
+
+return null;
+  }
+  
+  public Set getServiceProperties(Cluster cluster, String 
serviceName) throws AmbariException {
+StackId stackId = cluster.getCurrentStackVersion();
+StackInfo stack = ambariMetaInfo.getStackInfo(stackId.getStackName(),
+stackId.getStackVersion());
+
+return ambariMetaInfo.getProperties(stack.getName(), stack.getVersion(), 
serviceName);
+  }
+  
+  public Set getStackProperties(Cluster cluster) throws 
AmbariException {
+StackId stackId = cluster.getCurrentStackVersion();
+StackInfo stack = ambariMetaInfo.getStackInfo(stackId.getStackName(),
+stackId.getStackVersion());
+
+return ambariMetaInfo.getStackProperties(stack.getName(), 
stack.getVersion());
+  }
+  
   public void createConfigType(Cluster cluster, AmbariManagementController 
ambariManagementController, 
   String configType, Map properties, String authName) 
throws AmbariException {
 String tag;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d99a275f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index a53159c..d245b51 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -22,6 +22,7 @@ import com.google.inject.Inject;
 import com.google.inject.Injector;
 import com.google.inject.Provider;
 impo

[23/29] git commit: AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0255e5da
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0255e5da
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0255e5da

Branch: refs/heads/branch-alerts-dev
Commit: 0255e5dacf6ad02d262969d87edb9639c5bfb9ec
Parents: 52d8c27
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 16:58:39 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 17:01:10 2014 +0300

--
 .../ui-bg_flat_0_aa_40x100.png  | Bin 0 -> 180 bytes
 .../ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes
 .../ui-bg_glass_65_ff_1x400.png | Bin 0 -> 105 bytes
 .../ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes
 .../ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes
 .../ui-bg_glass_75_ff_1x400.png | Bin 0 -> 107 bytes
 .../ui-bg_highlight-soft_75_cc_1x100.png| Bin 0 -> 101 bytes
 .../ui-bg_inset-soft_95_fef1ec_1x100.png| Bin 0 -> 123 bytes
 .../ui-icons_22_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_88_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_f6cf3b_256x240.png | Bin 0 -> 8884 bytes
 .../resources/ui/app/styles/application.less|  37 +++
 .../resources/ui/app/templates/slider_apps.hbs  |   3 +-
 .../src/main/resources/ui/app/translations.js   |   6 +--
 17 files changed, 41 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
new file mode 100644
index 000..5b5dab2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000..ad3d634
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
new file mode 100644
index 000..42ccba2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000..5a46b47
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glas

[20/29] git commit: AMBARI-7404. configTypes field for stack service API should provide supports addProperty field. (aonishuk)

2014-09-19 Thread jonathanhurley
AMBARI-7404. configTypes field for stack service API should provide supports 
addProperty field. (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05f0b402
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05f0b402
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05f0b402

Branch: refs/heads/branch-alerts-dev
Commit: 05f0b402fc8ee7d79325985ed4468809455e13ef
Parents: 201bcb3
Author: Andrew Onishuk 
Authored: Fri Sep 19 15:10:30 2014 +0300
Committer: Andrew Onishuk 
Committed: Fri Sep 19 15:10:30 2014 +0300

--
 .../server/api/util/StackExtensionHelper.java   |  3 +-
 .../src/main/resources/properties.json  |  1 +
 .../configuration/capacity-scheduler.xml|  2 +-
 .../YARN/configuration/capacity-scheduler.xml   |  2 +-
 .../api/util/StackExtensionHelperTest.java  | 40 ++--
 .../services/YARN/configuration/yarn-site.xml   |  2 +-
 6 files changed, 42 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index 2c5396b..fe6c6bc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -916,7 +916,8 @@ public class StackExtensionHelper {
*/
   protected enum Supports {
 
-FINAL("supports_final");
+FINAL("supports_final"),
+ADDING_FORBIDDEN("supports_adding_forbidden");
 
 public static final String KEYWORD = "supports";
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/properties.json
--
diff --git a/ambari-server/src/main/resources/properties.json 
b/ambari-server/src/main/resources/properties.json
index 76797d3..b99ede5 100644
--- a/ambari-server/src/main/resources/properties.json
+++ b/ambari-server/src/main/resources/properties.json
@@ -248,6 +248,7 @@
 "StackConfigurations/property_description",
 "StackConfigurations/type",
 "StackConfigurations/final",
+"StackConfigurations/adding_forbidden",
 "StackConfigurations/property_type",
 "_"
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
index 010a313..574d508 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
@@ -22,7 +22,7 @@
 
 
 
-
+
 
   
 mapred.capacity-scheduler.maximum-system-jobs

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
index 261d872..a8dc5c2 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
@@ -15,7 +15,7 @@
limitations under the License.
 -->
 
-
+
 
   
 yarn.scheduler.capacity.maximum-applications

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
index 2219b6f..74761dd 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/se

[05/29] git commit: AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics collection

2014-09-19 Thread jonathanhurley
AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics 
collection


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1498061e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1498061e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1498061e

Branch: refs/heads/branch-alerts-dev
Commit: 1498061ee682e92f60b82ce496f7e25fc5ff474b
Parents: 5c24d29
Author: Sumit Mohanty 
Authored: Thu Sep 18 13:30:16 2014 -0700
Committer: Sumit Mohanty 
Committed: Thu Sep 18 13:30:16 2014 -0700

--
 .../HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml | 2 +-
 .../HDP/2.0.6/services/GANGLIA/package/scripts/params.py | 8 +---
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
index 3328acf..59d607a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
@@ -71,7 +71,7 @@
   
 additional_clusters
  
-Add additional desired Ganglia metrics cluster in the form 
"name1:port1,name2:port2". Ensure that the names and ports are unique across 
all cluster and ports are available on ganglia server host. Ambari has reserved 
ports 8667-8669 within its own pool.
+Add additional desired Ganglia metrics cluster in the form 
"name1,port1,name2,port2". Ensure that the names and ports are unique across 
all cluster and ports are available on ganglia server host. Ambari has reserved 
ports 8667-8669 within its own pool.
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
index bf36b93..a00f7b1 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
@@ -37,9 +37,11 @@ if gmond_add_clusters_str and 
gmond_add_clusters_str.isspace():
 
 gmond_app_strs = [] if gmond_add_clusters_str is None else 
gmond_add_clusters_str.split(',')
 gmond_apps = []
-for x in gmond_app_strs:
-  a,b = x.strip().split(':')
-  gmond_apps.append((a.strip(),b.strip()))
+
+i = 0
+while i < len(gmond_app_strs):
+  gmond_apps.append((gmond_app_strs[i].strip(), gmond_app_strs[i+1].strip()))
+  i = i + 2
 
 if System.get_instance().os_family == "ubuntu":
   gmond_service_name = "ganglia-monitor"



[19/29] git commit: AMBARI-7403. Slider View: AppTypes should be determined only once at view load. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7403. Slider View: AppTypes should be determined only once at view load. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/201bcb3e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/201bcb3e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/201bcb3e

Branch: refs/heads/branch-alerts-dev
Commit: 201bcb3e81b172d585744c66449d76ca2f1b1d89
Parents: 0eb3937
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 14:12:23 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 14:12:23 2014 +0300

--
 contrib/views/slider/src/main/resources/ui/app/initialize.js   | 2 +-
 .../slider/src/main/resources/ui/app/mappers/application_type.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/initialize.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js 
b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 5428c3d..2a85588 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -112,7 +112,7 @@ App.initializer({
 
 });
 application.SliderController.proto().initResources();
-application.ApplicationTypeMapper.loop('load');
+application.ApplicationTypeMapper.load();
 application.SliderAppsMapper.loop('load');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
index 938412e..e4bdd85 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
@@ -34,7 +34,7 @@
  * 
  * @type {App.Mapper}
  */
-App.ApplicationTypeMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
+App.ApplicationTypeMapper = App.Mapper.create({
 
   /**
* Map for parsing JSON received from server



[14/29] AMBARI-7400. Slider View: Most view parameters should be made required. (onechiporenko)

2014-09-19 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js 
b/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
new file mode 100644
index 000..b530ab3
--- /dev/null
+++ b/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
@@ -0,0 +1,1605 @@
+/*
+ Author: Geraint Luff and others
+ Year: 2013
+
+ This code is released into the "public domain" by its author(s).  Anybody may 
use, alter and distribute the code without restriction.  The author makes no 
guarantees, and takes no liability of any kind for use of this code.
+
+ If you find a bug or make an improvement, it would be courteous to let the 
author know, but it is not compulsory.
+ */
+(function (global, factory) {
+  if (typeof define === 'function' && define.amd) {
+// AMD. Register as an anonymous module.
+define([], factory);
+  } else if (typeof module !== 'undefined' && module.exports){
+// CommonJS. Define export.
+module.exports = factory();
+  } else {
+// Browser globals
+global.tv4 = factory();
+  }
+}(this, function () {
+
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys
+  if (!Object.keys) {
+Object.keys = (function () {
+  var hasOwnProperty = Object.prototype.hasOwnProperty,
+hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
+dontEnums = [
+  'toString',
+  'toLocaleString',
+  'valueOf',
+  'hasOwnProperty',
+  'isPrototypeOf',
+  'propertyIsEnumerable',
+  'constructor'
+],
+dontEnumsLength = dontEnums.length;
+
+  return function (obj) {
+if (typeof obj !== 'object' && typeof obj !== 'function' || obj === 
null) {
+  throw new TypeError('Object.keys called on non-object');
+}
+
+var result = [];
+
+for (var prop in obj) {
+  if (hasOwnProperty.call(obj, prop)) {
+result.push(prop);
+  }
+}
+
+if (hasDontEnumBug) {
+  for (var i=0; i < dontEnumsLength; i++) {
+if (hasOwnProperty.call(obj, dontEnums[i])) {
+  result.push(dontEnums[i]);
+}
+  }
+}
+return result;
+  };
+})();
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
+  if (!Object.create) {
+Object.create = (function(){
+  function F(){}
+
+  return function(o){
+if (arguments.length !== 1) {
+  throw new Error('Object.create implementation only accepts one 
parameter.');
+}
+F.prototype = o;
+return new F();
+  };
+})();
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray
+  if(!Array.isArray) {
+Array.isArray = function (vArg) {
+  return Object.prototype.toString.call(vArg) === "[object Array]";
+};
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf
+  if (!Array.prototype.indexOf) {
+Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
+  if (this === null) {
+throw new TypeError();
+  }
+  var t = Object(this);
+  var len = t.length >>> 0;
+
+  if (len === 0) {
+return -1;
+  }
+  var n = 0;
+  if (arguments.length > 1) {
+n = Number(arguments[1]);
+if (n !== n) { // shortcut for verifying if it's NaN
+  n = 0;
+} else if (n !== 0 && n !== Infinity && n !== -Infinity) {
+  n = (n > 0 || -1) * Math.floor(Math.abs(n));
+}
+  }
+  if (n >= len) {
+return -1;
+  }
+  var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
+  for (; k < len; k++) {
+if (k in t && t[k] === searchElement) {
+  return k;
+}
+  }
+  return -1;
+};
+  }
+
+// Grungey Object.isFrozen hack
+  if (!Object.isFrozen) {
+Object.isFrozen = function (obj) {
+  var key = "tv4_test_frozen_key";
+  while (obj.hasOwnProperty(key)) {
+key += Math.random();
+  }
+  try {
+obj[key] = true;
+delete obj[key];
+return false;
+  } catch (e) {
+return true;
+  }
+};
+  }
+// Based on: https://github.com/geraintluff/uri-templates, but with all the 
de-substitution stuff removed
+
+  var uriTemplateGlobalModifiers = {
+"+": true,
+"#": true,
+"."

[03/29] git commit: AMBARI-7353. Upgrade from ambari 1.6.0 -> 1.7.0 fails, with "schema upgrade failed". (jaimin)

2014-09-19 Thread jonathanhurley
AMBARI-7353. Upgrade from ambari 1.6.0 -> 1.7.0 fails, with "schema upgrade 
failed". (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/742b7189
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/742b7189
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/742b7189

Branch: refs/heads/branch-alerts-dev
Commit: 742b71893633afd7ce1424239bd8937ba502a7a5
Parents: 35e
Author: Jaimin Jetly 
Authored: Thu Sep 18 11:21:27 2014 -0700
Committer: Jaimin Jetly 
Committed: Thu Sep 18 11:21:27 2014 -0700

--
 .../server/api/util/StackExtensionHelper.java   | 119 ++-
 .../server/upgrade/UpgradeCatalog170.java   |  43 +++
 2 files changed, 88 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/742b7189/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index 3e211fe..2c5396b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -17,6 +17,40 @@
  */
 package org.apache.ambari.server.api.util;
 
+import com.google.inject.Injector;
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.metadata.ActionMetadata;
+import org.apache.ambari.server.state.ClientConfigFileDefinition;
+import org.apache.ambari.server.state.CommandScriptDefinition;
+import org.apache.ambari.server.state.ComponentInfo;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.CustomCommandDefinition;
+import org.apache.ambari.server.state.DependencyInfo;
+import org.apache.ambari.server.state.PropertyInfo;
+import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.state.ServiceOsSpecific;
+import org.apache.ambari.server.state.StackInfo;
+import org.apache.ambari.server.state.stack.ConfigurationXml;
+import org.apache.ambari.server.state.stack.RepositoryXml;
+import org.apache.ambari.server.state.stack.ServiceMetainfoXml;
+import org.apache.ambari.server.state.stack.StackMetainfoXml;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -31,33 +65,6 @@ import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
-import org.apache.ambari.server.metadata.ActionMetadata;
-import org.apache.ambari.server.state.*;
-import org.apache.ambari.server.state.stack.ConfigurationXml;
-import org.apache.ambari.server.state.stack.RepositoryXml;
-import org.apache.ambari.server.state.stack.ServiceMetainfoXml;
-import org.apache.ambari.server.state.stack.StackMetainfoXml;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import com.google.inject.Injector;
-
 /**
  * Helper methods for providing stack extension behavior -
  * Apache Jira: AMBARI-2819
@@ -520,8 +527,8 @@ public class StackExtensionHelper {
   }
 
   void populateServicesForStack(StackInfo stackInfo) throws
-  ParserConfigurationException, SAXException,
-  XPathExpressionException, IOException, JAXBException {
+  ParserConfigurationException, SAXException,
+  XPathExpressionException, IOException, JAXBException {
 List services = new ArrayList();
 File 

[09/29] git commit: AMBARI-7395. Configs: hover dismiss issues and ui cleanup.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7395. Configs: hover dismiss issues and ui cleanup.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6446499d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6446499d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6446499d

Branch: refs/heads/branch-alerts-dev
Commit: 6446499d27acfa78c78608293a377a43835911e2
Parents: 84133c2
Author: Xi Wang 
Authored: Thu Sep 18 16:26:51 2014 -0700
Committer: Xi Wang 
Committed: Thu Sep 18 16:50:29 2014 -0700

--
 .../ui/admin-web/app/views/leftNavbar.html  |  2 -
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/models/service_config_version.js |  7 ++-
 ambari-web/app/styles/application.less  | 51 
 .../common/configs/config_history_flow.hbs  | 20 
 .../common/configs/service_version_box.hbs  | 17 +++
 .../templates/main/dashboard/config_history.hbs |  6 +--
 .../views/common/configs/config_history_flow.js | 19 +++-
 8 files changed, 63 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index 0aa9340..8119428 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -66,7 +66,6 @@
   Launch Install Wizard
 
   
-
 
   
 
@@ -98,6 +97,5 @@
 
 
   
-
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 1052d9b..67b7799 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2013,6 +2013,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.table.configGroup.default' : 'default',
   'dashboard.configHistory.table.empty' : 'No history to display',
   'dashboard.configHistory.table.notes.default': 'Initial configurations for 
{0}',
+  'dashboard.configHistory.table.notes.no': 'No notes',
   'dashboard.configHistory.table.version.versionText' : 'V{0}',
   'dashboard.configHistory.table.version.prefix' : 'V',
   'dashboard.configHistory.table.current.tooltip' : 'Current config for 
{0}:{1}',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/models/service_config_version.js
--
diff --git a/ambari-web/app/models/service_config_version.js 
b/ambari-web/app/models/service_config_version.js
index 61703ad..0f436a8 100644
--- a/ambari-web/app/models/service_config_version.js
+++ b/ambari-web/app/models/service_config_version.js
@@ -42,9 +42,12 @@ App.ServiceConfigVersion = DS.Model.extend({
   configGroupName: function () {
 return (this.get('groupName') === 'default') ? (this.get('displayName') + 
' ' + Em.I18n.t('common.default')) : this.get('groupName');
   }.property('groupName'),
-  briefNotes: function () {
-return (typeof this.get('notes') === 'string') ? 
this.get('notes').slice(0, 81) : "";
+  fullNotes: function () {
+return (typeof this.get('notes') === 'string') ? this.get('notes') || 
Em.I18n.t('dashboard.configHistory.table.notes.no') : 
Em.I18n.t('dashboard.configHistory.table.notes.no');
   }.property('notes'),
+  briefNotes: function () {
+return this.get('fullNotes').slice(0, 81);
+  }.property('fullNotes'),
   moreNotesExists: function () {
 return (typeof this.get('notes') === 'string') ?  this.get('notes').length 
> 80 : false;
   }.property('notes'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 0420804..e20980a 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4995,15 +4995,15 @@ ul.inline li {
 height: 58px;
 margin: 5px 0;
 .flow-element {
-  width: 18.5%;
   height: 58px;
+  width: 15.2%;
   .version-box {
 position: relative;
 height: 90%;
   }
   .version-box .box {
 cursor: pointer;
-width: 72%;
+width: 92%;
 height: 100%;
 background-color: #ff;
 -webkit-border-radius: 4px;
@@ -5066,11 +5066,14 @@ ul.inline li {
   .date{
 color: #808080;
  

[01/29] git commit: AMBARI-7311 Incorrect name for turning on/off Maintenance Mode in Background operations window (dsen)

2014-09-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 179290e0f -> e2e79668e


AMBARI-7311 Incorrect name for turning on/off Maintenance Mode in Background 
operations window (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31a41066
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31a41066
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31a41066

Branch: refs/heads/branch-alerts-dev
Commit: 31a410662cb626b04ec551495120b9bf2109cad1
Parents: 5fc5828
Author: Dmytro Sen 
Authored: Thu Sep 18 18:29:53 2014 +0300
Committer: Dmytro Sen 
Committed: Thu Sep 18 18:29:53 2014 +0300

--
 .../apache/ambari/server/controller/MaintenanceStateHelper.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/31a41066/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
index f24..459f01f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
@@ -50,7 +50,7 @@ public class MaintenanceStateHelper {
   private static final String NAGIOS_COMPONENT = "NAGIOS_SERVER";
   private static final String NAGIOS_ACTION_NAME = "nagios_update_ignore";
   private static final Logger LOG = 
LoggerFactory.getLogger(MaintenanceStateHelper.class);
-  public static final String UPDATE_NAGIOS_REQUEST_NAME = "Update Nagios 
configuration";
+  public static final String UPDATE_NAGIOS_REQUEST_NAME = "Adjusting ignored 
alerts for Services/Hosts Maintenance Mode";
 
   @Inject
   private Clusters clusters;



[07/29] git commit: AMBARI-7373. Admin View: Landing page should say the same thing on INSTALL/CREATE buttons.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7373. Admin View: Landing page should say the same thing on 
INSTALL/CREATE buttons.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84133c22
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84133c22
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84133c22

Branch: refs/heads/branch-alerts-dev
Commit: 84133c222408788a15b35310c7194dc36d7fe4e3
Parents: e0215f5
Author: Xi Wang 
Authored: Wed Sep 17 14:35:26 2014 -0700
Committer: Xi Wang 
Committed: Thu Sep 18 16:26:58 2014 -0700

--
 .../src/main/resources/ui/admin-web/app/views/leftNavbar.html | 3 +--
 ambari-admin/src/main/resources/ui/admin-web/app/views/main.html  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/84133c22/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index 8fd8c6a..0aa9340 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -63,8 +63,7 @@
 
   
 
-  
-  Create a Cluster
+  Launch Install Wizard
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/84133c22/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
index a542b4f..126f4f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
@@ -36,7 +36,7 @@
 Create a Cluster
 Use the Install Wizard to select services and 
configure your cluster
 
- Install Cluster
+ Launch Install Wizard
   
 
 



[12/29] git commit: AMBARI-7347. Fixes for Ambari view to work aftsrimanth)

2014-09-19 Thread jonathanhurley
AMBARI-7347. Fixes for Ambari view to work aftsrimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/44fbccef
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/44fbccef
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/44fbccef

Branch: refs/heads/branch-alerts-dev
Commit: 44fbccef840e07899b4ba18eac1007f8e15336aa
Parents: 7270881
Author: Srimanth Gunturi 
Authored: Thu Sep 18 19:58:17 2014 -0700
Committer: Srimanth Gunturi 
Committed: Thu Sep 18 19:58:22 2014 -0700

--
 .../ui/app/controllers/slider_controller.js |  3 +
 .../ui/app/mappers/slider_apps_mapper.js| 33 +++--
 .../main/resources/ui/app/models/slider_app.js  |  5 ++
 .../views/slider_app/metrics/app_metric_view.js | 71 
 .../ui/app/views/slider_app/summary_view.js | 71 +++-
 5 files changed, 174 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 5eb323d..eb2762e 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -106,6 +106,9 @@ App.SliderController = 
Ember.Controller.extend(App.RunPeriodically, {
 || properties['zookeeper.quorum'] == null) {
   this.getClusterName();
 } else {
+  // TODO remove below line as it is a temporary hack 
+  this.getClusterName();
+
   initialValuesToLoad.setProperties({
 ambariAddress: location.protocol + "//" + document.location.host,
 hdfsAddress: properties['hdfs.address'],

http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 013c65c..a8ebbff 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -113,25 +113,38 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
* @param {object} data received from server data
* @method parse
*/
-  parseQuickLinks: function (data) {
+  parseQuickLinks : function(data) {
 var quickLinks = [],
-  appId = data.id;
+appId = data.id;
+var yarnAppId = appId;
+var index = appId.lastIndexOf('_');
+if (index > 0) {
+  yarnAppId = appId.substring(0, index + 1);
+  for (var k = (appId.length - index - 1); k < 4; k++) {
+yarnAppId += '0';
+  }
+  yarnAppId += appId.substring(index + 1);
+}
+var yarnUI = "http://"+window.location.hostname+":8088";;
+if (App.viewUrls) {
+  yarnUI = App.viewUrls['yarn.resourcemanager.webapp.address'];
+}
 quickLinks.push(
   Ember.Object.create({
 id: 'YARN application',
 label: 'YARN application',
-url: "http://"; + window.location.hostname + ":8088"
+url: yarnUI + '/cluster/app/application_' + yarnAppId
   })
 );
 
-if (!data.urls) {
+if(!data.urls){
   return quickLinks.mapProperty('id');
 }
 
 Object.keys(data.urls).forEach(function (key) {
   quickLinks.push(
 Ember.Object.create({
-  id: appId + key,
+  id: appId+key,
   label: key,
   url: data.urls[key]
 })
@@ -148,6 +161,13 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
 });
   },
 
+  parseMetricNames : function(app) {
+if (app.supportedMetrics) {
+  return app.supportedMetrics.join(",");
+}
+return "";
+  },
+
   /**
* Parse loaded data
* Load App.SliderApp model
@@ -190,7 +210,8 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   alerts: alerts,
   configs: configs,
   jmx: jmx,
-  runtimeProperties: app.configs
+  runtimeProperties: app.configs,
+  supportedMetricNames: metricNames
 })
   );
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/sli

[08/29] git commit: AMBARI-7372. Admin View: various UI.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7372. Admin View: various UI.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e0215f54
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e0215f54
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e0215f54

Branch: refs/heads/branch-alerts-dev
Commit: e0215f5401d03ff90cf35cf9cb01b9aba843829b
Parents: bf5f1c6
Author: Xi Wang 
Authored: Wed Sep 17 14:23:48 2014 -0700
Committer: Xi Wang 
Committed: Thu Sep 18 16:26:58 2014 -0700

--
 .../clusters/ClustersManageAccessCtrl.js  |  2 +-
 .../app/scripts/directives/editableList.js| 18 --
 .../resources/ui/admin-web/app/styles/main.css| 14 --
 .../app/views/directives/editableList.html|  2 +-
 .../ui/admin-web/app/views/groups/list.html   |  2 +-
 .../ui/admin-web/app/views/leftNavbar.html|  4 ++--
 .../resources/ui/admin-web/app/views/main.html|  1 +
 .../ui/admin-web/app/views/users/list.html|  2 +-
 8 files changed, 23 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
index 8999594..4cf39af 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
@@ -52,7 +52,7 @@ angular.module('ambariAdminConsole')
 PermissionSaver.saveClusterPermissions(
   $scope.permissionsEdit,
   {
-clusterId: $routeParams.id,
+clusterId: $routeParams.id
   }
 ).then(reloadClusterData)
 .catch(function(data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
index 5d72078..f157d70 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
@@ -53,7 +53,6 @@ angular.module('ambariAdminConsole')
   var elem = $editBox[0];
   var selection = window.getSelection(),
   range = document.createRange();
-
   elem.innerHTML = '\u00a0';
   range.selectNodeContents(elem);
   selection.removeAllRanges();
@@ -72,6 +71,7 @@ angular.module('ambariAdminConsole')
   case 13: // Enter
 $scope.$apply(function() {
   $scope.addItem();
+  $scope.focusOnInput();
 });
 return false;
 break;
@@ -117,6 +117,7 @@ angular.module('ambariAdminConsole')
   $scope.addItem(item);
 });
 $scope.clearInput();
+$scope.focusOnInput();
 
   } else {
 // Load typeahed items based on current input
@@ -129,30 +130,27 @@ angular.module('ambariAdminConsole')
 } else if($scope.resourceType === 'Group'){
   name = item.Groups.group_name;
 }
-
 if($scope.items.indexOf(name) < 0){ // Only if item not in list
   items.push(name);
 }
-$scope.typeahead = items.slice(0, 5);
-$scope.selectedTypeahed = 0;
   });
+  $scope.typeahead = items.slice(0, 5);
+  $scope.selectedTypeahed = 0;
 });
   }
-
-
 } else {
   $scope.typeahead = [];
   $scope.selectedTypeahed = 0;
+  $scope.focusOnInput();
 }
   });
 
-  $scope.enableEditMode = function() {
+  $scope.enableEditMode = function(event) {
 if( $scope.editable && !$scope.editMode){
   $scope.editMode = true;
-  if( $scope.items.length === 0){
-$scope.focusOnInput();
-  }
+  $scope.focusOnInput();
 }
+event.stopPropagation();
   };
 
   $scope.cancel = function(event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css

[22/29] git commit: AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via akovalenko)

2014-09-19 Thread jonathanhurley
AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via 
akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52d8c27a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52d8c27a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52d8c27a

Branch: refs/heads/branch-alerts-dev
Commit: 52d8c27aa5f709074bbf33a2c908dd6ca739b89b
Parents: 0f7dee0
Author: Aleksandr Kovalenko 
Authored: Fri Sep 19 16:07:35 2014 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Sep 19 16:15:09 2014 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 24 
 ambari-web/app/data/site_properties.js  | 24 
 2 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index 8643095..1d2dbb4 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2638,6 +2638,30 @@ module.exports =
   "filename": "webhcat-env.xml",
   "category": "Advanced webhcat-env"
 },
+{
+  "id": "puppet var",
+  "name": "hive_database_name",
+  "displayName": "hive_database_name",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
+{
+  "id": "puppet var",
+  "name": "hive_database_type",
+  "displayName": "hive_database_type",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
   
/**OOZIE***/
 {
   "id": "puppet var",

http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/ambari-web/app/data/site_properties.js
--
diff --git a/ambari-web/app/data/site_properties.js 
b/ambari-web/app/data/site_properties.js
index 14c7045..06bbe09 100644
--- a/ambari-web/app/data/site_properties.js
+++ b/ambari-web/app/data/site_properties.js
@@ -1730,6 +1730,30 @@ module.exports =
   "filename": "hive-env.xml",
   "category": "Advanced hive-env"
 },
+{
+  "id": "puppet var",
+  "name": "hive_database_name",
+  "displayName": "hive_database_name",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
+{
+  "id": "puppet var",
+  "name": "hive_database_type",
+  "displayName": "hive_database_type",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
   
/**HIVE***/
 {
   "id": "puppet var",



[17/29] git commit: AMBARI-7402 Incorrect behavior of filtering by custom date on Config History tab. (ababiichuk)

2014-09-19 Thread jonathanhurley
AMBARI-7402 Incorrect behavior of filtering by custom date on Config History 
tab. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c48015d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c48015d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c48015d

Branch: refs/heads/branch-alerts-dev
Commit: 5c48015d6b62e3052b2555fefc0cc4604c74a88a
Parents: 6eda8c6
Author: aBabiichuk 
Authored: Fri Sep 19 13:36:18 2014 +0300
Committer: aBabiichuk 
Committed: Fri Sep 19 13:36:35 2014 +0300

--
 ambari-web/app/views/common/filter_view.js | 8 +++-
 ambari-web/app/views/main/dashboard/config_history_view.js | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c48015d/ambari-web/app/views/common/filter_view.js
--
diff --git a/ambari-web/app/views/common/filter_view.js 
b/ambari-web/app/views/common/filter_view.js
index 93c2d90..f279fd3 100644
--- a/ambari-web/app/views/common/filter_view.js
+++ b/ambari-web/app/views/common/filter_view.js
@@ -495,7 +495,13 @@ module.exports = {
 break;
   case 'range':
 return function (origin, compareValue){
-  //TODO add filter by range value
+  if (compareValue[1] && compareValue[0]) {
+return origin >= compareValue[0] && origin <= compareValue[1];
+  } else if (compareValue[0]){
+return origin >= compareValue[0];
+  } else if (compareValue[1]) {
+return origin <= compareValue[1]
+  }
   return true;
 };
 break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c48015d/ambari-web/app/views/main/dashboard/config_history_view.js
--
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js 
b/ambari-web/app/views/main/dashboard/config_history_view.js
index 436451e..792e31f 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -155,8 +155,8 @@ App.MainConfigHistoryView = App.TableView.extend({
 startTimeBinding: "controller.modifiedFilter.actualValues.startTime",
 endTimeBinding: "controller.modifiedFilter.actualValues.endTime",
 onTimeChange: function () {
-  this.get('parentView').updateFilter(this.get('column'), 
[this.get('startTime'), this.get('endTime')], 'range');
-}.observes('startTime')
+  this.get('parentView').updateFilter(this.get('column'), 
[this.get('controller.modifiedFilter.actualValues.startTime'), 
this.get('controller.modifiedFilter.actualValues.endTime')], 'range');
+}.observes('controller.modifiedFilter.actualValues.startTime', 
'controller.modifiedFilter.actualValues.endTime')
   }),
 
   authorFilterView: filters.createTextView({



[27/29] AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)

2014-09-19 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py 
b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
index 13f3049..58f3759 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
@@ -157,7 +157,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_default(self):
 
-self.assertResourceCalled('Directory', '/etc/flume/conf')
+self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
 self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 
@@ -180,7 +180,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_many(self):
 
-self.assertResourceCalled('Directory', '/etc/flume/conf')
+self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
 self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
index 01f96c7..38f04ab 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
@@ -56,7 +56,7 @@ class TestServiceCheck(RMFTestCase):
 self.assertResourceCalled('ExecuteHadoop', 'fs -mkdir /tmp',
 conf_dir = '/etc/hadoop/conf',
 logoutput = True,
-not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs 
-test -e /tmp\'',
+not_if = 'su - ambari-qa -c \'/usr/bin/hadoop --config 
/etc/hadoop/conf fs -test -e /tmp\'',
 try_sleep = 3,
 tries = 5,
 bin_dir = '/usr/bin',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
index f1d7ed9..fb4f9c9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
@@ -31,10 +31,12 @@ class TestHcatClient(RMFTestCase):
 self.assertResourceCalled('Directory', '/etc/hive/conf',
   owner = 'hcat',
   group = 'hadoop',
+  recursive = True,
 )
 self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
   owner = 'hcat',
   group = 'hadoop',
+  recursive = True,
 )
 self.assertResourceCalled('Directory', '/var/run/webhcat',
   owner = 'hcat',
@@ -64,10 +66,12 @@ class TestHcatClient(RMFTestCase):
  config_file="secured.json"
 )
 self.assertResourceCalled('Directory', '/etc/hive/conf',
+  recursive = True,
   owner = 'hcat',
   group = 'hadoop',
 )
 self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
+  recursive = True,
   owner = 'hcat',
   group = 'hadoop',
 )

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
index 204e384..1101230 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
@@ -41,7 +41,7 @@ class TestHiveMetastore(RMFTestCase):
 self.assert_configure_default()
 self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_metastore_script 
/var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid 
/etc/hive/conf.server /var/log/hive',
 not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1 && ps `cat 
/var/run/hive/hive.pid` >/dev/null 2>&1',
-environment = {'PATH' : os.environ['PATH'] + os.pathsep + 
"/usr/lib/hive/bin",
+environment = {'PATH' : os.environ['PATH'] + os.pathsep + 
"/usr/lib/hive/bin" + os.pathsep + "/usr/bin",
'HADOOP_HOME' : '/usr'},
 user = 'hive',
 )
@@ -81,10 +81,9 @@ class TestHiveMetastore(RMFTestCase):
 )
 

[15/29] git commit: AMBARI-7400. Slider View: Most view parameters should be made required. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7400. Slider View: Most view parameters should be made required. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d62147ed
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d62147ed
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d62147ed

Branch: refs/heads/branch-alerts-dev
Commit: d62147ed37864f7f9f321448c3036ade0eeb681f
Parents: d7b09b6
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 13:13:34 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 13:13:34 2014 +0300

--
 .../app/assets/data/resource/cluster_name.json  |   12 -
 .../assets/data/resource/components_hosts.json  |   16 -
 .../ui/app/assets/data/resource/empty_json.json |1 +
 .../assets/data/resource/service_configs.json   |   38 -
 .../assets/data/resource/service_status.json|   95 --
 .../assets/data/resource/slider-properties.json |7 +-
 .../createAppWizard/step1_controller.js |   90 +-
 .../ui/app/controllers/slider_controller.js |  308 +---
 .../src/main/resources/ui/app/helpers/ajax.js   |  119 +-
 .../src/main/resources/ui/app/initialize.js |9 +-
 .../ui/app/mappers/slider_apps_mapper.js|7 +
 .../resources/ui/app/models/slider_config.js|   51 +
 .../src/main/resources/ui/app/routes/main.js|   16 +
 .../resources/ui/app/templates/application.hbs  |4 +-
 .../ui/app/templates/slider_title_tooltip.hbs   |2 +-
 .../src/main/resources/ui/app/translations.js   |7 +-
 .../resources/ui/app/views/application_view.js  |   13 +-
 .../slider/src/main/resources/ui/config.js  |1 +
 .../resources/ui/vendor/scripts/common/tv4.js   | 1605 ++
 .../views/slider/src/main/resources/view.xml|   21 +-
 20 files changed, 1815 insertions(+), 607 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
deleted file mode 100644
index f559483..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "href" : "http://162.216.151.215:8080/api/v1/clusters?_=1409232826826";,
-  "items" : [
-{
-  "href" : "http://162.216.151.215:8080/api/v1/clusters/mycluster";,
-  "Clusters" : {
-"cluster_name" : "mycluster",
-"version" : "HDP-2.1"
-  }
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
deleted file mode 100644
index eaf72b4..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "items" : [
-{
-  "Hosts" : {
-"host_name" : "myHost"
-  },
-  "host_components" : [
-{
-  "HostRoles" : {
-"component_name" : ""
-  }
-}
-  ]
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
deleted file mode 100644
index 24c1a31..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "items" : [
-{
-  "cluster_name" : "cl",
-  "configurations" : [
-{
-  "Config" : {
-"cluster_name" : 

[29/29] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-19 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2e79668
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2e79668
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2e79668

Branch: refs/heads/branch-alerts-dev
Commit: e2e79668ed94266487fe9d1d2ccba2003922e883
Parents: 179290e d7ed431
Author: Jonathan Hurley 
Authored: Fri Sep 19 13:18:45 2014 -0400
Committer: Jonathan Hurley 
Committed: Fri Sep 19 13:18:45 2014 -0400

--
 .../clusters/ClustersManageAccessCtrl.js|2 +-
 .../app/scripts/directives/editableList.js  |   18 +-
 .../resources/ui/admin-web/app/styles/main.css  |   14 +-
 .../app/views/directives/editableList.html  |2 +-
 .../ui/admin-web/app/views/groups/list.html |2 +-
 .../ui/admin-web/app/views/leftNavbar.html  |9 +-
 .../resources/ui/admin-web/app/views/main.html  |3 +-
 .../ui/admin-web/app/views/users/list.html  |2 +-
 .../test/python/ambari_agent/TestController.py  |4 +-
 .../TestCustomServiceOrchestrator.py|3 +-
 .../resource_management/TestCopyFromLocal.py|8 +-
 .../TestExecuteHadoopResource.py|   12 +-
 .../resource_management/TestExecuteResource.py  |3 +-
 .../core/providers/system.py|   12 +-
 .../python/resource_management/core/shell.py|   24 +-
 .../libraries/providers/copy_from_local.py  |4 +
 .../libraries/providers/execute_hadoop.py   |6 +-
 .../libraries/providers/hdfs_directory.py   |6 +-
 .../libraries/resources/copy_from_local.py  |1 +
 ambari-server/pom.xml   |8 +
 .../server/api/util/StackExtensionHelper.java   |  122 +-
 .../controller/MaintenanceStateHelper.java  |2 +-
 .../server/upgrade/UpgradeCatalog170.java   |   43 +-
 .../src/main/resources/properties.json  |1 +
 .../1.3.2/hooks/before-START/scripts/params.py  |2 +-
 .../services/HIVE/configuration/hcat-env.xml|   57 +
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml |   19 +-
 .../1.3.2/services/HIVE/package/scripts/hcat.py |   13 +-
 .../services/HIVE/package/scripts/params.py |2 +
 .../HIVE/package/templates/hcat-env.sh.j2   |   44 -
 .../configuration/capacity-scheduler.xml|2 +-
 .../2.0.6/hooks/after-INSTALL/scripts/params.py |   11 +-
 .../scripts/shared_initialization.py|4 +
 .../2.0.6/hooks/before-START/scripts/params.py  |   13 +-
 .../services/FLUME/package/scripts/flume.py |2 +-
 .../services/FLUME/package/scripts/params.py|6 +-
 .../GANGLIA/configuration/ganglia-env.xml   |2 +-
 .../services/GANGLIA/package/scripts/params.py  |8 +-
 .../services/HBASE/package/scripts/params.py|   16 +-
 .../services/HDFS/package/scripts/params.py |   18 +-
 .../HDFS/package/scripts/service_check.py   |2 +-
 .../services/HIVE/configuration/hcat-env.xml|   57 +
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml |   19 +-
 .../2.0.6/services/HIVE/package/scripts/hcat.py |   15 +-
 .../HIVE/package/scripts/hcat_service_check.py  |   10 +-
 .../HIVE/package/scripts/install_jars.py|2 +
 .../services/HIVE/package/scripts/params.py |   71 +-
 .../services/HIVE/package/scripts/webhcat.py|4 +
 .../HIVE/package/templates/hcat-env.sh.j2   |   43 -
 .../services/PIG/package/scripts/params.py  |   12 +-
 .../2.0.6/services/PIG/package/scripts/pig.py   |1 +
 .../services/SQOOP/package/scripts/params.py|   11 +-
 .../YARN/configuration/capacity-scheduler.xml   |2 +-
 .../package/scripts/mapred_service_check.py |4 +
 .../services/YARN/package/scripts/params.py |   24 +-
 .../YARN/package/scripts/service_check.py   |2 +-
 .../ZOOKEEPER/package/scripts/params.py |7 +-
 .../services/FALCON/package/scripts/params.py   |   12 +-
 .../services/STORM/package/scripts/params.py|   11 +-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |2 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |   34 -
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |4 +-
 .../HIVE/configuration/webhcat-site.xml |   14 +-
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |6 +-
 .../services/OOZIE/configuration/oozie-site.xml |   13 -
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |6 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|2 +-
 .../services/SLIDER/package/scripts/params.py   |4 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |2 +-
 .../services/STORM/configuration/storm-env.xml  |   29 -
 .../services/STORM/configuration/storm-site.xml |6 +-
 .../stacks/HDP/2.2/se

[02/29] git commit: AMBARI-7392. HCatalog config downloads Hive config files (aonishuk)

2014-09-19 Thread jonathanhurley
AMBARI-7392. HCatalog config downloads Hive config files (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/35ec
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/35ec
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/35ec

Branch: refs/heads/branch-alerts-dev
Commit: 35ec804bf2a2dadff6348f1fdfa5b64295f1
Parents: 31a4106
Author: Andrew Onishuk 
Authored: Thu Sep 18 20:14:34 2014 +0300
Committer: Andrew Onishuk 
Committed: Thu Sep 18 20:14:34 2014 +0300

--
 .../1.3.2/hooks/before-START/scripts/params.py  |  2 +-
 .../services/HIVE/configuration/hcat-env.xml| 57 
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 19 +--
 .../1.3.2/services/HIVE/package/scripts/hcat.py | 13 ++---
 .../services/HIVE/package/scripts/params.py |  2 +
 .../HIVE/package/templates/hcat-env.sh.j2   | 44 ---
 .../services/HIVE/configuration/hcat-env.xml| 57 
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 19 +--
 .../2.0.6/services/HIVE/package/scripts/hcat.py | 13 ++---
 .../services/HIVE/package/scripts/params.py |  1 +
 .../HIVE/package/templates/hcat-env.sh.j2   | 43 ---
 .../stacks/1.3.2/HIVE/test_hcat_client.py   | 20 +++
 .../python/stacks/1.3.2/configs/default.json|  5 +-
 .../python/stacks/1.3.2/configs/secured.json|  5 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   | 18 ---
 .../python/stacks/2.0.6/configs/default.json|  5 +-
 .../python/stacks/2.0.6/configs/secured.json|  5 +-
 17 files changed, 166 insertions(+), 162 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/35ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
index 51f8d61..a6aff0e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
@@ -94,7 +94,7 @@ ambari_db_rca_driver = 
config['hostLevelParams']['ambari_db_rca_driver']
 ambari_db_rca_username = config['hostLevelParams']['ambari_db_rca_username']
 ambari_db_rca_password = config['hostLevelParams']['ambari_db_rca_password']
 
-if has_namenode and 'rca_enabled' in config['configurations']['mapred-env']:
+if has_namenode and 'mapred-env' in config['configurations']:
   rca_enabled =  config['configurations']['mapred-env']['rca_enabled']
 else:
   rca_enabled = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/35ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
new file mode 100644
index 000..91b402b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+  
+  
+content
+This is the jinja template for hcat-env.sh file
+
+  # 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.
+
+  JAVA_HOME={{java64_home}}
+  HCAT_PID_DIR={{hcat_pid_dir}}/
+  HCAT_LOG_DIR={{hcat_log_dir}}/
+  HCAT_CONF_DIR={{hcat_conf_dir}}
+  HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
+  #DBROOT is the path where the connector jars are downloaded
+  DBROOT={{hcat_dbroot}}
+  USER={{hcat_user}}
+  METASTORE_PORT={{hive_metastore_port}}
+
+  
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/35ec/ambari-server/src/main/resources/stac

[25/29] git commit: AMBARI-7411. Slider View: After starting a stopped view, route to Apps table page. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7411. Slider View: After starting a stopped view, route to Apps table 
page. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/843579eb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/843579eb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/843579eb

Branch: refs/heads/branch-alerts-dev
Commit: 843579eb2926a48572111dec63167de3155b364a
Parents: 69e8e9c
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 18:14:02 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 18:14:02 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js  | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/843579eb/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index b2effa0..f042e38 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -114,11 +114,20 @@ App.SliderAppController = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
   name: model.get('name'),
   state: "RUNNING"
 }
-  }
+  },
+  success: 'thawSuccessCallback'
 });
   },
 
   /**
+   * Redirect to Slider Apps Table page on successful thawing
+   * @method thawSuccessCallback
+   */
+  thawSuccessCallback: function () {
+this.transitionToRoute('slider_apps.index');
+  },
+
+  /**
* Do request to freeze current slider's app
* @returns {$.ajax}
* @method freeze



[04/29] git commit: AMBARI-7005. ambari trunk commit build fails due to unresolvable eclipselink plugin when the first time mvn build. (Jun Aoki via vgogate)

2014-09-19 Thread jonathanhurley
AMBARI-7005. ambari trunk commit build fails due to unresolvable eclipselink 
plugin when the first time mvn build. (Jun Aoki via vgogate)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c24d29a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c24d29a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c24d29a

Branch: refs/heads/branch-alerts-dev
Commit: 5c24d29ad21848707eabd4a3ae3fdedeb7044fca
Parents: 742b718
Author: Vitthal(Suhas) Gogate 
Authored: Thu Sep 18 14:33:49 2014 +
Committer: root 
Committed: Thu Sep 18 19:02:44 2014 +

--
 ambari-server/pom.xml | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c24d29a/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index b07afbf..bbf21fe 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1422,4 +1422,12 @@
   
+
+  
+
+  EclipseLink
+  http://download.eclipse.org/rt/eclipselink/maven.repo
+
+  
+
 



[10/29] git commit: AMBARI-7396. After saving empty property become required only for Custom Properties.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7396. After saving empty property become required only for Custom 
Properties.(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01ff6a79
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01ff6a79
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01ff6a79

Branch: refs/heads/branch-alerts-dev
Commit: 01ff6a79b6d6d4bb4f3d3dc36a0642db350e1b3a
Parents: 6446499
Author: Xi Wang 
Authored: Thu Sep 18 17:57:05 2014 -0700
Committer: Xi Wang 
Committed: Thu Sep 18 18:03:54 2014 -0700

--
 ambari-web/app/utils/config.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/01ff6a79/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 8226811..52f918d 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -350,7 +350,7 @@ App.config = Em.Object.create({
   filename: filename,
   isUserProperty: false,
   isOverridable: true,
-  isRequired: true,
+  isRequired: advancedConfigs.someProperty('name', index),
   isFinal: finalAttributes[index] === "true",
   defaultIsFinal: finalAttributes[index] === "true",
   showLabel: true,



[21/29] git commit: AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)

2014-09-19 Thread jonathanhurley
AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f7dee0b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f7dee0b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f7dee0b

Branch: refs/heads/branch-alerts-dev
Commit: 0f7dee0b4582e277604ab8866dcc9711f3b8643a
Parents: 05f0b40
Author: atkach 
Authored: Fri Sep 19 15:59:18 2014 +0300
Committer: atkach 
Committed: Fri Sep 19 15:59:18 2014 +0300

--
 .../createAppWizard/step4_controller.js | 10 +--
 .../ui/app/controllers/slider_app_controller.js |  2 +-
 .../src/main/resources/ui/app/helpers/ajax.js   | 14 +++-
 .../ui/app/mixins/ajax_error_handler.js | 84 
 .../resources/ui/app/styles/application.less|  6 ++
 .../ui/app/templates/common/ajax_error.hbs  | 24 ++
 .../src/main/resources/ui/app/translations.js   |  9 ++-
 7 files changed, 137 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
index e703c27..6454938 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.CreateAppWizardStep4Controller = Ember.ObjectController.extend({
+App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   needs: "createAppWizard",
 
@@ -95,15 +95,15 @@ App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend({
   typeConfigs: app.get('configs')
 }
   },
-  complete: 'sendAppDataToServerCompleteCallback'
+  success: 'sendAppDataToServerSuccessCallback'
 });
   },
 
   /**
-   * Complete-callback for "create new app"-request
-   * @method sendAppDataToServerCompleteCallback
+   * Success-callback for "create new app"-request
+   * @method sendAppDataToServerSuccessCallback
*/
-  sendAppDataToServerCompleteCallback: function() {
+  sendAppDataToServerSuccessCallback: function() {
 this.get('appWizardController').hidePopup();
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index d1bfccf..b2effa0 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.SliderAppController = Ember.ObjectController.extend({
+App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   /**
* List of Slider App tabs

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js 
b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ba7fbce..ea01d82 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -132,7 +132,8 @@ var urls = {
 format: function (data) {
   return {
 type: 'POST',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -142,7 +143,8 @@ var urls = {
 mock: '',
 format: function () {
   return {
-method: 'DELETE'
+method: 'DELETE',
+showErrorPopup: true
   }
 }
   },
@@ -156,7 +158,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -169,7 +172,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+  

[26/29] git commit: AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)

2014-09-19 Thread jonathanhurley
AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5da5019a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5da5019a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5da5019a

Branch: refs/heads/branch-alerts-dev
Commit: 5da5019a81323dbb3ef2a5699afac28679b138ea
Parents: 843579e
Author: Alex Antonenko 
Authored: Fri Sep 19 18:47:41 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 18:48:08 2014 +0300

--
 .../slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5da5019a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 7312f86..ebff57c 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -59,6 +59,7 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   lastCheck: alert.last_status_time
 });
   });
+  alerts = alerts.sortBy('title');
   App.SliderApp.store.pushMany('sliderAppAlert', alerts);
 }
 return alerts.mapProperty('id');



[28/29] git commit: AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)

2014-09-19 Thread jonathanhurley
AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7ed4316
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7ed4316
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7ed4316

Branch: refs/heads/branch-alerts-dev
Commit: d7ed4316202b6af7e6157ec97f9f137b43ad4eb0
Parents: 5da5019
Author: Dmytro Sen 
Authored: Fri Sep 19 19:12:06 2014 +0300
Committer: Dmytro Sen 
Committed: Fri Sep 19 19:12:06 2014 +0300

--
 .../resource_management/TestCopyFromLocal.py|  8 +--
 .../TestExecuteHadoopResource.py| 12 ++--
 .../resource_management/TestExecuteResource.py  |  3 +-
 .../core/providers/system.py| 12 ++--
 .../python/resource_management/core/shell.py| 24 ---
 .../libraries/providers/copy_from_local.py  |  4 ++
 .../libraries/providers/execute_hadoop.py   |  6 +-
 .../libraries/providers/hdfs_directory.py   |  6 +-
 .../libraries/resources/copy_from_local.py  |  1 +
 .../2.0.6/hooks/after-INSTALL/scripts/params.py | 11 ++-
 .../scripts/shared_initialization.py|  4 ++
 .../2.0.6/hooks/before-START/scripts/params.py  | 13 ++--
 .../services/FLUME/package/scripts/flume.py |  2 +-
 .../services/FLUME/package/scripts/params.py|  6 +-
 .../services/HBASE/package/scripts/params.py| 16 ++---
 .../services/HDFS/package/scripts/params.py | 18 +++--
 .../HDFS/package/scripts/service_check.py   |  2 +-
 .../2.0.6/services/HIVE/package/scripts/hcat.py |  2 +
 .../HIVE/package/scripts/hcat_service_check.py  | 10 ++-
 .../HIVE/package/scripts/install_jars.py|  2 +
 .../services/HIVE/package/scripts/params.py | 70 
 .../services/HIVE/package/scripts/webhcat.py|  4 ++
 .../services/PIG/package/scripts/params.py  | 12 ++--
 .../2.0.6/services/PIG/package/scripts/pig.py   |  1 +
 .../services/SQOOP/package/scripts/params.py| 11 ++-
 .../package/scripts/mapred_service_check.py |  4 ++
 .../services/YARN/package/scripts/params.py | 24 +++
 .../YARN/package/scripts/service_check.py   |  2 +-
 .../ZOOKEEPER/package/scripts/params.py |  7 +-
 .../services/FALCON/package/scripts/params.py   | 12 ++--
 .../services/STORM/package/scripts/params.py| 11 ++-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |  2 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 .../services/HDFS/configuration/hdfs-site.xml   | 34 --
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |  4 +-
 .../HIVE/configuration/webhcat-site.xml | 14 ++--
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |  6 +-
 .../services/OOZIE/configuration/oozie-site.xml | 13 
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |  6 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|  2 +-
 .../services/SLIDER/package/scripts/params.py   |  4 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |  2 +-
 .../services/STORM/configuration/storm-env.xml  | 29 
 .../services/STORM/configuration/storm-site.xml |  6 +-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|  2 +-
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   | 43 
 .../YARN/configuration-mapred/mapred-site.xml   | 11 ++-
 .../services/YARN/configuration/yarn-site.xml   | 11 +--
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |  6 +-
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |  2 +-
 .../stacks/1.3.2/HDFS/test_service_check.py |  2 +-
 .../python/stacks/2.0.6/FLUME/test_flume.py |  4 +-
 .../stacks/2.0.6/HDFS/test_service_check.py |  2 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   |  4 ++
 .../stacks/2.0.6/HIVE/test_hive_metastore.py|  9 ++-
 .../stacks/2.0.6/HIVE/test_hive_server.py   | 12 ++--
 .../2.0.6/HIVE/test_hive_service_check.py   | 17 ++---
 .../stacks/2.0.6/HIVE/test_webhcat_server.py|  8 +++
 .../python/stacks/2.0.6/PIG/test_pig_client.py  |  2 +
 .../2.0.6/YARN/test_mapreduce2_service_check.py |  8 +++
 .../2.0.6/YARN/test_yarn_service_check.py   |  4 +-
 .../stacks/2.1/HIVE/test_hive_metastore.py  |  8 +--
 65 files changed, 249 insertions(+), 356 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py 
b/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
index 6862db3..3991bae 100644
--- a/ambari-agent/src/test/python/resource_management/TestC

[18/29] git commit: AMBARI-7401. Ambari Unit Tests failing on Jenkins.(vbrodetskyi)

2014-09-19 Thread jonathanhurley
AMBARI-7401. Ambari Unit Tests failing on Jenkins.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0eb3937c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0eb3937c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0eb3937c

Branch: refs/heads/branch-alerts-dev
Commit: 0eb3937c208ac650725059356ec909effc367534
Parents: 5c48015
Author: Vitaly Brodetskyi 
Authored: Fri Sep 19 13:41:24 2014 +0300
Committer: Vitaly Brodetskyi 
Committed: Fri Sep 19 13:41:24 2014 +0300

--
 ambari-agent/src/test/python/ambari_agent/TestController.py  | 4 ++--
 .../test/python/ambari_agent/TestCustomServiceOrchestrator.py| 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestController.py
--
diff --git a/ambari-agent/src/test/python/ambari_agent/TestController.py 
b/ambari-agent/src/test/python/ambari_agent/TestController.py
index ad8303f..7ef64cc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestController.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestController.py
@@ -364,7 +364,7 @@ class TestController(unittest.TestCase):
   self.fail("Should throw exception!")
 except IOError, e: # Expected
   self.assertEquals('Response parsing failed! Request data: ' + data +
-'; Response: {invalid_object}', e.message)
+'; Response: {invalid_object}', str(e))
 
 exceptionMessage = "Connection Refused"
 conMock.request.side_effect = Exception(exceptionMessage)
@@ -373,7 +373,7 @@ class TestController(unittest.TestCase):
   self.fail("Should throw exception!")
 except IOError, e: # Expected
   self.assertEquals('Request to ' + url + ' failed due to ' +
-exceptionMessage, e.message)
+exceptionMessage, str(e))
 
 
   @patch.object(threading._Event, "wait")

http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
--
diff --git 
a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
index 92791e2..6a61c0d 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
@@ -486,7 +486,8 @@ class TestCustomServiceOrchestrator(TestCase):
   'taskId' : '13',
   'roleCommand': 'ACTIONEXECUTE',
   'commandType': 'BACKGROUND_EXECUTION_COMMAND',
-  '__handle' : BackgroundCommandExecutionHandle(None,13,MagicMock(), 
MagicMock())
+  '__handle': BackgroundCommandExecutionHandle({'taskId': '13'}, 13,
+   MagicMock(), MagicMock())
 }
 dummy_controller = MagicMock()
 orchestrator = CustomServiceOrchestrator(self.config, dummy_controller)



[13/29] git commit: AMBARI-7385. Slider View: Multiple fixes for failed app (alexantonenko)

2014-09-19 Thread jonathanhurley
AMBARI-7385. Slider View: Multiple fixes for failed app (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7b09b61
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7b09b61
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7b09b61

Branch: refs/heads/branch-alerts-dev
Commit: d7b09b61a996772f1ad44d728b53d4306c1a95c3
Parents: 44fbcce
Author: Alex Antonenko 
Authored: Thu Sep 18 16:04:27 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 11:43:07 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js | 22 ++---
 .../resources/ui/app/styles/application.less| 21 +++-
 .../resources/ui/app/templates/application.hbs  |  2 +-
 .../resources/ui/app/templates/slider_app.hbs   | 26 +++-
 .../ui/app/templates/slider_title_tooltip.hbs   |  4 ++-
 5 files changed, 56 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 2779a57..d1bfccf 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -22,10 +22,24 @@ App.SliderAppController = Ember.ObjectController.extend({
* List of Slider App tabs
* @type {{title: string, linkTo: string}[]}
*/
-  sliderAppTabs: Ember.A([
-Ember.Object.create({title: Ember.I18n.t('common.summary'), linkTo: 
'slider_app.summary'}),
-Ember.Object.create({title: Ember.I18n.t('common.configs'), linkTo: 
'slider_app.configs'})
-  ]),
+  sliderAppTabs: function () {
+var configs = this.get("model.configs");
+var tabs = Ember.A([
+  Ember.Object.create({title: Ember.I18n.t('common.summary'), linkTo: 
'slider_app.summary'})
+]);
+if(typeof configs == "object" && Object.keys(configs).length > 0){
+  tabs.pushObject(Ember.Object.create({title: 
Ember.I18n.t('common.configs'), linkTo: 'slider_app.configs'}));
+}
+return tabs;
+  }.property('model.configs'),
+
+  /**
+   * Do we have quicklinks ?
+   * @type {bool}
+   */
+  weHaveQuicklinks: function () {
+return (Em.get(this.get('model'), 'quickLinks.content.content.length') > 
0);
+  }.property('model.quickLinks.content.content.length'),
 
   /**
* List of available for model actions

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 90f10d7..44c6487 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -562,6 +562,9 @@ a {
 td:first-child {
   text-align: right;
 }
+span{
+  word-break: break-all;
+}
   }
   .panel-components {
 .status {
@@ -852,4 +855,20 @@ a {
 color: #ff;
 background-color: #51a351;
   }
-}
\ No newline at end of file
+}
+.slider-app-title {
+  font-style: italic;
+  cursor: pointer;
+}
+.popover.bottom{
+  .popover-content{
+background: #ff;
+background: -moz-linear-gradient(top,  #f7f7f7 0%, #f7f7f7 18%, #ff 
19%, #ff 100%);
+background: -webkit-gradient(linear, top, top, color-stop(0%,#f7f7f7), 
color-stop(18%,#f7f7f7), color-stop(19%,#ff), color-stop(100%,#ff));
+background: -webkit-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: -o-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: -ms-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: linear-gradient(to bottom,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+filter: progid:DXImageTransform.Microsoft.gradient( 
startColorstr='#f7f7f7', endColorstr='#ff',GradientType=1 );
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index 439c3a3..625eaca 100755
--- a/contri

[06/29] git commit: AMBARI-7394. Recommend properties were changed after cluster install (srimanth)

2014-09-19 Thread jonathanhurley
AMBARI-7394. Recommend properties were changed after cluster install (srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bf5f1c6d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bf5f1c6d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bf5f1c6d

Branch: refs/heads/branch-alerts-dev
Commit: bf5f1c6da72ed46844298a152906fdd77c1fba28
Parents: 1498061
Author: Srimanth Gunturi 
Authored: Thu Sep 18 14:47:58 2014 -0700
Committer: Srimanth Gunturi 
Committed: Thu Sep 18 14:48:03 2014 -0700

--
 ambari-web/app/mixins/common/serverValidator.js | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf5f1c6d/ambari-web/app/mixins/common/serverValidator.js
--
diff --git a/ambari-web/app/mixins/common/serverValidator.js 
b/ambari-web/app/mixins/common/serverValidator.js
index 8d551f8..2a31a4f 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -201,13 +201,22 @@ App.ServerValidatorMixin = Em.Mixin.create({
 var self = this;
 var recommendations = this.get('hostGroups');
 recommendations.blueprint.configurations = 
blueprintUtils.buildConfisJSON(this.get('services'), this.get('stepConfigs'));
+
+var serviceNames = this.get('serviceNames');
+if (!self.get('isInstaller')) {
+  // When editing a service we validate only that service's configs.
+  // However, we should pass the IDs of services installed, or else,
+  // default value calculations will alter.
+  serviceNames = App.Service.find().mapProperty('serviceName');
+}
+
 return App.ajax.send({
   name: 'config.validations',
   sender: this,
   data: {
 stackVersionUrl: App.get('stackVersionURL'),
 hosts: this.get('hostNames'),
-services: this.get('serviceNames'),
+services: serviceNames,
 validate: 'configurations',
 recommendations: recommendations
   },



[16/29] git commit: AMBARI-7399. Slider View: Firefox has Create action inside the table header. (Max Shepel via akovalenko)

2014-09-19 Thread jonathanhurley
AMBARI-7399. Slider View: Firefox has Create action inside the table header. 
(Max Shepel via akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6eda8c66
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6eda8c66
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6eda8c66

Branch: refs/heads/branch-alerts-dev
Commit: 6eda8c66a44189320c2e2270be0f74a33c0a6f68
Parents: d62147e
Author: Aleksandr Kovalenko 
Authored: Fri Sep 19 13:14:22 2014 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Sep 19 13:19:24 2014 +0300

--
 .../src/main/resources/ui/app/styles/application.less  | 13 +
 .../main/resources/ui/app/templates/application.hbs| 13 +++--
 .../main/resources/ui/app/templates/slider_apps.hbs|  7 ---
 .../main/resources/ui/app/views/application_view.js|  5 +
 4 files changed, 25 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 44c6487..7497b6e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -44,11 +44,16 @@ a {
   cursor: pointer;
 }
 
-#slider-apps-table  {
-  .create-app {
-margin-bottom: 20px;
+.slider-header {
+  overflow: hidden;
+  .box-header {
+padding-top: 20px;
   }
-#slider-table {
+}
+
+#slider-apps-table  {
+
+  #slider-table {
 margin-top: 10px;
 margin-bottom: 10px;
 font-size: 13px\9;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index da828bf..f62 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -16,9 +16,18 @@
 * limitations under the License.
 }}
 
-
+
   {{#view view.SliderTitleView}}
-{{t slider.apps.title}} - {{App.instance}}
+{{t slider.apps.title}} - {{App.instance}}
+{{#if view.isIndexPage}}
+  
+
+  
+ {{t 
slider.apps.create}}
+  
+
+  
+{{/if}}
   {{/view}}
   {{outlet bs-tooltip-box}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index aecfb30..ef72291 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -17,13 +17,6 @@
 }}
 
 
-  
-
-  
- {{t slider.apps.create}}
-  
-
-  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js 
b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
index 1860944..7471f04 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
@@ -33,6 +33,11 @@ App.ApplicationView = Ember.View.extend({
   placement: 'bottom'
 }),
 
+isIndexPage: function () {
+  var currentPath = this.get('controller.currentPath');
+  return currentPath && (currentPath == 'slider_apps.index' || 
currentPath.indexOf('slider_apps.createAppWizard') != -1);
+}.property('controller.currentPath'),
+
 /**
  * Set popover template
  * @method sliderConfigsChecker



[24/29] git commit: AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of words. (Max Shepel via atkach)

2014-09-19 Thread jonathanhurley
AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of 
words. (Max Shepel via atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69e8e9cc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69e8e9cc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69e8e9cc

Branch: refs/heads/branch-alerts-dev
Commit: 69e8e9cc44bb55dc14c6625e740b0dc8e39b69fe
Parents: 0255e5d
Author: atkach 
Authored: Fri Sep 19 17:26:02 2014 +0300
Committer: atkach 
Committed: Fri Sep 19 17:26:02 2014 +0300

--
 .../slider/src/main/resources/ui/app/styles/application.less  | 3 +++
 .../src/main/resources/ui/app/templates/slider_app/configs.hbs| 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 2ea4ed8..f0d0bab 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -731,6 +731,9 @@ select {
   cursor: not-allowed;
   background-color: #ee;
 }
+.property-name {
+  word-wrap: break-word;
+}
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
index 6eddc8d..f073a8d 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
@@ -23,7 +23,7 @@
 
   {{#each configCategory.configs}}
 
-  {{formatWordBreak key devider="."}}
+  {{formatWordBreak key 
devider="."}}
   
 {{#if isMultiline}}
   {{textarea disabled=true value=value classNames="col-md-6"}}



[11/29] git commit: AMBARI-7398. Add metrics support to Slider View

2014-09-19 Thread jonathanhurley
AMBARI-7398. Add metrics support to Slider View


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7270881f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7270881f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7270881f

Branch: refs/heads/branch-alerts-dev
Commit: 7270881fbe18f1b115c2551ff86db290ddd406c2
Parents: 01ff6a7
Author: Sumit Mohanty 
Authored: Thu Sep 18 18:59:09 2014 -0700
Committer: Sumit Mohanty 
Committed: Thu Sep 18 18:59:09 2014 -0700

--
 contrib/views/slider/pom.xml|   9 +-
 .../ambari/view/slider/GangliaMetric.java   | 257 +++
 .../ambari/view/slider/MetricsHolder.java   |  44 
 .../apache/ambari/view/slider/SliderApp.java|  16 +-
 .../ambari/view/slider/SliderAppType.java   |  32 +--
 .../slider/SliderAppsViewControllerImpl.java|  87 +--
 .../apache/ambari/view/slider/TemporalInfo.java |  48 
 .../rest/client/SliderAppGangliaHelper.java | 196 ++
 .../rest/client/SliderAppMasterClient.java  | 127 +++--
 9 files changed, 740 insertions(+), 76 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7270881f/contrib/views/slider/pom.xml
--
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index 8c33c93..49348df 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -331,6 +331,13 @@



+   org.apache.httpcomponents
+   httpclient
+   ${httpclient.version}
+   
+   
+   
+   
com.beust
jcommander
${jcommander.version}
@@ -397,7 +404,7 @@
0.7.0

1.6
2.6
-   3.1
+   4.2.5
1.30
2.4.1
3.4.5

http://git-wip-us.apache.org/repos/asf/ambari/blob/7270881f/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/GangliaMetric.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/GangliaMetric.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/GangliaMetric.java
new file mode 100644
index 000..cb51768
--- /dev/null
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/GangliaMetric.java
@@ -0,0 +1,257 @@
+/**
+ * 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.
+ */
+
+package org.apache.ambari.view.slider;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+
+/**
+ * Data structure for temporal data returned from Ganglia Web.
+ */
+public class GangliaMetric {
+
+  // Note that the member names correspond to the names in the JSON returned 
from Ganglia Web.
+
+  /**
+   * The name.
+   */
+  private String ds_name;
+
+  /**
+   * The ganglia cluster name.
+   */
+  private String cluster_name;
+
+  /**
+   * The graph type.
+   */
+  private String graph_type;
+
+  /**
+   * The host name.
+   */
+  private String host_name;
+
+  /**
+   * The metric name.
+   */
+  private String metric_name;
+
+  /**
+   * The temporal data points.
+   */
+  private Number[][] datapoints;
+  
+  
+  private static final Set PERCENTAGE_METRIC;
+
+  //BUG-3386 Cluster CPU Chart is off the charts
+  // Here can be added other percentage metrics
+  static {
+Set temp = new HashSet();
+temp.add("cpu_wio");
+temp.add("cpu_idle");
+temp.add("cpu_nice");
+temp.add("cpu_aidle");
+temp.add("cpu_system");
+temp.add("cpu_user");
+PERCENTAGE_METRIC = Collections.unmodifiableSet(temp);
+  }
+
+
+  // - GangliaMetric ---

git commit: AMBARI-7410. Alerts: add aggregate type and processing (ncole)

2014-09-19 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev ba325d083 -> 179290e0f


AMBARI-7410. Alerts: add aggregate type and processing (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/179290e0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/179290e0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/179290e0

Branch: refs/heads/branch-alerts-dev
Commit: 179290e0fc5370b9d46a18d5ba9d187d6c1112c8
Parents: ba325d0
Author: Nate Cole 
Authored: Fri Sep 19 10:55:54 2014 -0400
Committer: Nate Cole 
Committed: Fri Sep 19 10:56:10 2014 -0400

--
 .../server/api/services/AmbariMetaInfo.java |  22 ++-
 .../AlertDefinitionResourceProvider.java|  11 +-
 .../listeners/AlertAggregateListener.java   | 144 +++
 .../events/listeners/AlertReceivedListener.java |  14 +-
 .../apache/ambari/server/orm/dao/AlertsDAO.java |  52 ++
 .../server/orm/entities/AlertCurrentEntity.java |   1 +
 .../orm/entities/AlertDefinitionEntity.java |  14 +-
 .../state/alert/AlertDefinitionFactory.java |   2 +-
 .../ambari/server/state/alert/MetricSource.java |  46 -
 .../stacks/HDP/2.0.6/services/HBASE/alerts.json |   4 +-
 .../stacks/HDP/2.0.6/services/HDFS/alerts.json  |  30 +++-
 .../server/api/services/AmbariMetaInfoTest.java |   4 +-
 .../AlertDefinitionResourceProviderTest.java|   4 +-
 .../AlertGroupResourceProviderTest.java |   2 +-
 .../apache/ambari/server/orm/OrmTestHelper.java |   3 +-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |   9 +-
 .../server/orm/dao/AlertDispatchDAOTest.java|   3 +-
 .../ambari/server/orm/dao/AlertsDAOTest.java|  83 -
 .../state/cluster/AlertDataManagerTest.java | 174 ++-
 .../stacks/HDP/2.0.5/services/HDFS/alerts.json  |  19 +-
 20 files changed, 592 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/179290e0/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
index e3e5779..ec53afc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
@@ -31,7 +31,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Scanner;
 import java.util.Set;
 import java.util.concurrent.ExecutorService;
@@ -48,6 +47,7 @@ import org.apache.ambari.server.api.util.StackExtensionHelper;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.customactions.ActionDefinition;
 import org.apache.ambari.server.customactions.ActionDefinitionManager;
+import org.apache.ambari.server.events.listeners.AlertAggregateListener;
 import org.apache.ambari.server.orm.dao.AlertDefinitionDAO;
 import org.apache.ambari.server.orm.dao.MetainfoDAO;
 import org.apache.ambari.server.orm.entities.AlertDefinitionEntity;
@@ -66,6 +66,7 @@ import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.StackInfo;
 import org.apache.ambari.server.state.alert.AlertDefinition;
 import org.apache.ambari.server.state.alert.AlertDefinitionFactory;
+import org.apache.ambari.server.state.alert.SourceType;
 import org.apache.ambari.server.state.stack.LatestRepoCallable;
 import org.apache.ambari.server.state.stack.MetricDefinition;
 import org.apache.ambari.server.state.stack.RepositoryXml;
@@ -1205,9 +1206,7 @@ public class AmbariMetaInfo {
 }
 
 // for every cluster
-Set> clusterEntries = clusterMap.entrySet();
-for (Entry clusterEntry : clusterEntries) {
-  Cluster cluster = clusterEntry.getValue();
+for (Cluster cluster : clusterMap.values()) {
   long clusterId = cluster.getClusterId();
   StackId stackId = cluster.getDesiredStackVersion();
   StackInfo stackInfo = getStackInfo(stackId.getStackName(),
@@ -1246,7 +1245,7 @@ public class AmbariMetaInfo {
   List persist = new 
ArrayList();
   List entities = 
alertDefinitionDao.findAll(clusterId);
 
-  // create a map of the enntities for fast extraction
+  // create a map of the entities for fast extraction
   Map mappedEntities = new HashMap(100);
   for (AlertDefinitionEntity entity : entities) {
 mappedEntities.put(entity.getDefinitionName(), entity);
@@ -1279,9 +1278,20 @@ public class AmbariMetaInfo {
   LOG.info("Merging Alert Definition {} into the database",
   entity.getD

git commit: AMBARI-7413. Slider View: Rename Frozen/Thaw to Stop/Start (Max Shepel via alexantonenko)

2014-09-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d7ed43162 -> edce1b29b


AMBARI-7413. Slider View: Rename Frozen/Thaw to Stop/Start (Max Shepel via 
alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/edce1b29
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/edce1b29
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/edce1b29

Branch: refs/heads/trunk
Commit: edce1b29b098a764a6c3da6d8914ff8cb80ce8af
Parents: d7ed431
Author: Alex Antonenko 
Authored: Fri Sep 19 19:47:41 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 19:48:10 2014 +0300

--
 .../src/main/resources/ui/app/mappers/slider_apps_mapper.js | 9 +
 .../slider/src/main/resources/ui/app/models/slider_app.js   | 5 +
 .../main/resources/ui/app/templates/slider_app/summary.hbs  | 2 +-
 .../src/main/resources/ui/app/templates/slider_apps.hbs | 2 +-
 4 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/edce1b29/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index ebff57c..d7853f4 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -23,6 +23,14 @@
 App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
 
   /**
+   * List of app state display names
+   */
+  stateMap: {
+'FROZEN': 'STOPPED',
+'THAWED': 'RUNNING'
+  },
+
+  /**
* Load data from App.urlPrefix + this.urlSuffix one time
* @method load
* @return {$.ajax}
@@ -207,6 +215,7 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   yarnId: app.yarnId,
   name: app.name,
   status: app.state,
+  displayStatus: self.stateMap[app.state] || app.state,
   user: app.user,
   started: app.startTime ? (new Date(app.startTime).toUTCString()) : 
"-",
   ended: app.endTime ? (new Date(app.endTime).toUTCString()) : "-",

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce1b29/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 7c1bb42..0dad13c 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -34,6 +34,11 @@ App.SliderApp = DS.Model.extend({
   status: DS.attr('string'),
 
   /**
+   * @type {displayStatus}
+   */
+  displayStatus: DS.attr('string'),
+
+  /**
* @type {string}
*/
   user: DS.attr('string'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce1b29/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
index 2add6ec..8bf043c 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
@@ -24,7 +24,7 @@
 
 
   {{t common.status}}
-  {{controller.model.status}}
+  {{controller.model.displayStatus}}
 
 
   {{t common.type}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce1b29/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index fc744d1..46f2356 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -48,7 +48,7 @@
 {{/link-to}}
   
 
-  {{slider.status}}
+  {{slider.displayStatus}}
 
   {{slider.appType.displayName}}
 



[2/2] git commit: AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)

2014-09-19 Thread dsen
AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7ed4316
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7ed4316
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7ed4316

Branch: refs/heads/trunk
Commit: d7ed4316202b6af7e6157ec97f9f137b43ad4eb0
Parents: 5da5019
Author: Dmytro Sen 
Authored: Fri Sep 19 19:12:06 2014 +0300
Committer: Dmytro Sen 
Committed: Fri Sep 19 19:12:06 2014 +0300

--
 .../resource_management/TestCopyFromLocal.py|  8 +--
 .../TestExecuteHadoopResource.py| 12 ++--
 .../resource_management/TestExecuteResource.py  |  3 +-
 .../core/providers/system.py| 12 ++--
 .../python/resource_management/core/shell.py| 24 ---
 .../libraries/providers/copy_from_local.py  |  4 ++
 .../libraries/providers/execute_hadoop.py   |  6 +-
 .../libraries/providers/hdfs_directory.py   |  6 +-
 .../libraries/resources/copy_from_local.py  |  1 +
 .../2.0.6/hooks/after-INSTALL/scripts/params.py | 11 ++-
 .../scripts/shared_initialization.py|  4 ++
 .../2.0.6/hooks/before-START/scripts/params.py  | 13 ++--
 .../services/FLUME/package/scripts/flume.py |  2 +-
 .../services/FLUME/package/scripts/params.py|  6 +-
 .../services/HBASE/package/scripts/params.py| 16 ++---
 .../services/HDFS/package/scripts/params.py | 18 +++--
 .../HDFS/package/scripts/service_check.py   |  2 +-
 .../2.0.6/services/HIVE/package/scripts/hcat.py |  2 +
 .../HIVE/package/scripts/hcat_service_check.py  | 10 ++-
 .../HIVE/package/scripts/install_jars.py|  2 +
 .../services/HIVE/package/scripts/params.py | 70 
 .../services/HIVE/package/scripts/webhcat.py|  4 ++
 .../services/PIG/package/scripts/params.py  | 12 ++--
 .../2.0.6/services/PIG/package/scripts/pig.py   |  1 +
 .../services/SQOOP/package/scripts/params.py| 11 ++-
 .../package/scripts/mapred_service_check.py |  4 ++
 .../services/YARN/package/scripts/params.py | 24 +++
 .../YARN/package/scripts/service_check.py   |  2 +-
 .../ZOOKEEPER/package/scripts/params.py |  7 +-
 .../services/FALCON/package/scripts/params.py   | 12 ++--
 .../services/STORM/package/scripts/params.py| 11 ++-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |  2 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 .../services/HDFS/configuration/hdfs-site.xml   | 34 --
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |  4 +-
 .../HIVE/configuration/webhcat-site.xml | 14 ++--
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |  6 +-
 .../services/OOZIE/configuration/oozie-site.xml | 13 
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |  6 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|  2 +-
 .../services/SLIDER/package/scripts/params.py   |  4 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |  2 +-
 .../services/STORM/configuration/storm-env.xml  | 29 
 .../services/STORM/configuration/storm-site.xml |  6 +-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|  2 +-
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   | 43 
 .../YARN/configuration-mapred/mapred-site.xml   | 11 ++-
 .../services/YARN/configuration/yarn-site.xml   | 11 +--
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |  6 +-
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |  2 +-
 .../stacks/1.3.2/HDFS/test_service_check.py |  2 +-
 .../python/stacks/2.0.6/FLUME/test_flume.py |  4 +-
 .../stacks/2.0.6/HDFS/test_service_check.py |  2 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   |  4 ++
 .../stacks/2.0.6/HIVE/test_hive_metastore.py|  9 ++-
 .../stacks/2.0.6/HIVE/test_hive_server.py   | 12 ++--
 .../2.0.6/HIVE/test_hive_service_check.py   | 17 ++---
 .../stacks/2.0.6/HIVE/test_webhcat_server.py|  8 +++
 .../python/stacks/2.0.6/PIG/test_pig_client.py  |  2 +
 .../2.0.6/YARN/test_mapreduce2_service_check.py |  8 +++
 .../2.0.6/YARN/test_yarn_service_check.py   |  4 +-
 .../stacks/2.1/HIVE/test_hive_metastore.py  |  8 +--
 65 files changed, 249 insertions(+), 356 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py 
b/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
index 6862db3..3991bae 100644
--- a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal

[1/2] AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)

2014-09-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 5da5019a8 -> d7ed43162


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py 
b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
index 13f3049..58f3759 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
@@ -157,7 +157,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_default(self):
 
-self.assertResourceCalled('Directory', '/etc/flume/conf')
+self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
 self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 
@@ -180,7 +180,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_many(self):
 
-self.assertResourceCalled('Directory', '/etc/flume/conf')
+self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
 self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
index 01f96c7..38f04ab 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
@@ -56,7 +56,7 @@ class TestServiceCheck(RMFTestCase):
 self.assertResourceCalled('ExecuteHadoop', 'fs -mkdir /tmp',
 conf_dir = '/etc/hadoop/conf',
 logoutput = True,
-not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs 
-test -e /tmp\'',
+not_if = 'su - ambari-qa -c \'/usr/bin/hadoop --config 
/etc/hadoop/conf fs -test -e /tmp\'',
 try_sleep = 3,
 tries = 5,
 bin_dir = '/usr/bin',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
index f1d7ed9..fb4f9c9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
@@ -31,10 +31,12 @@ class TestHcatClient(RMFTestCase):
 self.assertResourceCalled('Directory', '/etc/hive/conf',
   owner = 'hcat',
   group = 'hadoop',
+  recursive = True,
 )
 self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
   owner = 'hcat',
   group = 'hadoop',
+  recursive = True,
 )
 self.assertResourceCalled('Directory', '/var/run/webhcat',
   owner = 'hcat',
@@ -64,10 +66,12 @@ class TestHcatClient(RMFTestCase):
  config_file="secured.json"
 )
 self.assertResourceCalled('Directory', '/etc/hive/conf',
+  recursive = True,
   owner = 'hcat',
   group = 'hadoop',
 )
 self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
+  recursive = True,
   owner = 'hcat',
   group = 'hadoop',
 )

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
index 204e384..1101230 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
@@ -41,7 +41,7 @@ class TestHiveMetastore(RMFTestCase):
 self.assert_configure_default()
 self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_metastore_script 
/var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid 
/etc/hive/conf.server /var/log/hive',
 not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1 && ps `cat 
/var/run/hive/hive.pid` >/dev/null 2>&1',
-environment = {'PATH' : os.environ['PATH'] + os.pathsep + 
"/usr/lib/hive/bin",
+environment = {'PATH' : os.environ['PATH'] + os.pathsep + 
"/usr/lib/hive/bin" + os.pathsep + "/usr/bin",
'HADOOP_HOME' : '/usr'},
 user = 

git commit: AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)

2014-09-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 843579eb2 -> 5da5019a8


AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5da5019a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5da5019a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5da5019a

Branch: refs/heads/trunk
Commit: 5da5019a81323dbb3ef2a5699afac28679b138ea
Parents: 843579e
Author: Alex Antonenko 
Authored: Fri Sep 19 18:47:41 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 18:48:08 2014 +0300

--
 .../slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5da5019a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 7312f86..ebff57c 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -59,6 +59,7 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   lastCheck: alert.last_status_time
 });
   });
+  alerts = alerts.sortBy('title');
   App.SliderApp.store.pushMany('sliderAppAlert', alerts);
 }
 return alerts.mapProperty('id');



git commit: AMBARI-7411. Slider View: After starting a stopped view, route to Apps table page. (onechiporenko)

2014-09-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 69e8e9cc4 -> 843579eb2


AMBARI-7411. Slider View: After starting a stopped view, route to Apps table 
page. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/843579eb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/843579eb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/843579eb

Branch: refs/heads/trunk
Commit: 843579eb2926a48572111dec63167de3155b364a
Parents: 69e8e9c
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 18:14:02 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 18:14:02 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js  | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/843579eb/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index b2effa0..f042e38 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -114,11 +114,20 @@ App.SliderAppController = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
   name: model.get('name'),
   state: "RUNNING"
 }
-  }
+  },
+  success: 'thawSuccessCallback'
 });
   },
 
   /**
+   * Redirect to Slider Apps Table page on successful thawing
+   * @method thawSuccessCallback
+   */
+  thawSuccessCallback: function () {
+this.transitionToRoute('slider_apps.index');
+  },
+
+  /**
* Do request to freeze current slider's app
* @returns {$.ajax}
* @method freeze



git commit: AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of words. (Max Shepel via atkach)

2014-09-19 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 0255e5dac -> 69e8e9cc4


AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of 
words. (Max Shepel via atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69e8e9cc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69e8e9cc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69e8e9cc

Branch: refs/heads/trunk
Commit: 69e8e9cc44bb55dc14c6625e740b0dc8e39b69fe
Parents: 0255e5d
Author: atkach 
Authored: Fri Sep 19 17:26:02 2014 +0300
Committer: atkach 
Committed: Fri Sep 19 17:26:02 2014 +0300

--
 .../slider/src/main/resources/ui/app/styles/application.less  | 3 +++
 .../src/main/resources/ui/app/templates/slider_app/configs.hbs| 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 2ea4ed8..f0d0bab 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -731,6 +731,9 @@ select {
   cursor: not-allowed;
   background-color: #ee;
 }
+.property-name {
+  word-wrap: break-word;
+}
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
index 6eddc8d..f073a8d 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
@@ -23,7 +23,7 @@
 
   {{#each configCategory.configs}}
 
-  {{formatWordBreak key devider="."}}
+  {{formatWordBreak key 
devider="."}}
   
 {{#if isMultiline}}
   {{textarea disabled=true value=value classNames="col-md-6"}}



git commit: AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. (onechiporenko)

2014-09-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 52d8c27aa -> 0255e5dac


AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0255e5da
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0255e5da
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0255e5da

Branch: refs/heads/trunk
Commit: 0255e5dacf6ad02d262969d87edb9639c5bfb9ec
Parents: 52d8c27
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 16:58:39 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 17:01:10 2014 +0300

--
 .../ui-bg_flat_0_aa_40x100.png  | Bin 0 -> 180 bytes
 .../ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes
 .../ui-bg_glass_65_ff_1x400.png | Bin 0 -> 105 bytes
 .../ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes
 .../ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes
 .../ui-bg_glass_75_ff_1x400.png | Bin 0 -> 107 bytes
 .../ui-bg_highlight-soft_75_cc_1x100.png| Bin 0 -> 101 bytes
 .../ui-bg_inset-soft_95_fef1ec_1x100.png| Bin 0 -> 123 bytes
 .../ui-icons_22_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_88_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes
 .../ui-icons_f6cf3b_256x240.png | Bin 0 -> 8884 bytes
 .../resources/ui/app/styles/application.less|  37 +++
 .../resources/ui/app/templates/slider_apps.hbs  |   3 +-
 .../src/main/resources/ui/app/translations.js   |   6 +--
 17 files changed, 41 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
new file mode 100644
index 000..5b5dab2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000..ad3d634
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
new file mode 100644
index 000..42ccba2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000..5a46b47
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
--
diff --git 
a/contrib/views/slide

git commit: AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via akovalenko)

2014-09-19 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 0f7dee0b4 -> 52d8c27aa


AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via 
akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52d8c27a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52d8c27a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52d8c27a

Branch: refs/heads/trunk
Commit: 52d8c27aa5f709074bbf33a2c908dd6ca739b89b
Parents: 0f7dee0
Author: Aleksandr Kovalenko 
Authored: Fri Sep 19 16:07:35 2014 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Sep 19 16:15:09 2014 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 24 
 ambari-web/app/data/site_properties.js  | 24 
 2 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index 8643095..1d2dbb4 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2638,6 +2638,30 @@ module.exports =
   "filename": "webhcat-env.xml",
   "category": "Advanced webhcat-env"
 },
+{
+  "id": "puppet var",
+  "name": "hive_database_name",
+  "displayName": "hive_database_name",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
+{
+  "id": "puppet var",
+  "name": "hive_database_type",
+  "displayName": "hive_database_type",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
   
/**OOZIE***/
 {
   "id": "puppet var",

http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/ambari-web/app/data/site_properties.js
--
diff --git a/ambari-web/app/data/site_properties.js 
b/ambari-web/app/data/site_properties.js
index 14c7045..06bbe09 100644
--- a/ambari-web/app/data/site_properties.js
+++ b/ambari-web/app/data/site_properties.js
@@ -1730,6 +1730,30 @@ module.exports =
   "filename": "hive-env.xml",
   "category": "Advanced hive-env"
 },
+{
+  "id": "puppet var",
+  "name": "hive_database_name",
+  "displayName": "hive_database_name",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
+{
+  "id": "puppet var",
+  "name": "hive_database_type",
+  "displayName": "hive_database_type",
+  "defaultValue": "",
+  "isReconfigurable": false,
+  "isOverridable": false,
+  "isVisible": true,
+  "serviceName": "HIVE",
+  "filename": "hive-env.xml",
+  "category": "Advanced hive-env"
+},
   
/**HIVE***/
 {
   "id": "puppet var",



git commit: AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)

2014-09-19 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 05f0b402f -> 0f7dee0b4


AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f7dee0b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f7dee0b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f7dee0b

Branch: refs/heads/trunk
Commit: 0f7dee0b4582e277604ab8866dcc9711f3b8643a
Parents: 05f0b40
Author: atkach 
Authored: Fri Sep 19 15:59:18 2014 +0300
Committer: atkach 
Committed: Fri Sep 19 15:59:18 2014 +0300

--
 .../createAppWizard/step4_controller.js | 10 +--
 .../ui/app/controllers/slider_app_controller.js |  2 +-
 .../src/main/resources/ui/app/helpers/ajax.js   | 14 +++-
 .../ui/app/mixins/ajax_error_handler.js | 84 
 .../resources/ui/app/styles/application.less|  6 ++
 .../ui/app/templates/common/ajax_error.hbs  | 24 ++
 .../src/main/resources/ui/app/translations.js   |  9 ++-
 7 files changed, 137 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
index e703c27..6454938 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.CreateAppWizardStep4Controller = Ember.ObjectController.extend({
+App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   needs: "createAppWizard",
 
@@ -95,15 +95,15 @@ App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend({
   typeConfigs: app.get('configs')
 }
   },
-  complete: 'sendAppDataToServerCompleteCallback'
+  success: 'sendAppDataToServerSuccessCallback'
 });
   },
 
   /**
-   * Complete-callback for "create new app"-request
-   * @method sendAppDataToServerCompleteCallback
+   * Success-callback for "create new app"-request
+   * @method sendAppDataToServerSuccessCallback
*/
-  sendAppDataToServerCompleteCallback: function() {
+  sendAppDataToServerSuccessCallback: function() {
 this.get('appWizardController').hidePopup();
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index d1bfccf..b2effa0 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.SliderAppController = Ember.ObjectController.extend({
+App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   /**
* List of Slider App tabs

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js 
b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ba7fbce..ea01d82 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -132,7 +132,8 @@ var urls = {
 format: function (data) {
   return {
 type: 'POST',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -142,7 +143,8 @@ var urls = {
 mock: '',
 format: function () {
   return {
-method: 'DELETE'
+method: 'DELETE',
+showErrorPopup: true
   }
 }
   },
@@ -156,7 +158,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -169,7 +172,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.s

git commit: AMBARI-7404. configTypes field for stack service API should provide supports addProperty field. (aonishuk)

2014-09-19 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 201bcb3e8 -> 05f0b402f


AMBARI-7404. configTypes field for stack service API should provide supports 
addProperty field. (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05f0b402
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05f0b402
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05f0b402

Branch: refs/heads/trunk
Commit: 05f0b402fc8ee7d79325985ed4468809455e13ef
Parents: 201bcb3
Author: Andrew Onishuk 
Authored: Fri Sep 19 15:10:30 2014 +0300
Committer: Andrew Onishuk 
Committed: Fri Sep 19 15:10:30 2014 +0300

--
 .../server/api/util/StackExtensionHelper.java   |  3 +-
 .../src/main/resources/properties.json  |  1 +
 .../configuration/capacity-scheduler.xml|  2 +-
 .../YARN/configuration/capacity-scheduler.xml   |  2 +-
 .../api/util/StackExtensionHelperTest.java  | 40 ++--
 .../services/YARN/configuration/yarn-site.xml   |  2 +-
 6 files changed, 42 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index 2c5396b..fe6c6bc 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -916,7 +916,8 @@ public class StackExtensionHelper {
*/
   protected enum Supports {
 
-FINAL("supports_final");
+FINAL("supports_final"),
+ADDING_FORBIDDEN("supports_adding_forbidden");
 
 public static final String KEYWORD = "supports";
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/properties.json
--
diff --git a/ambari-server/src/main/resources/properties.json 
b/ambari-server/src/main/resources/properties.json
index 76797d3..b99ede5 100644
--- a/ambari-server/src/main/resources/properties.json
+++ b/ambari-server/src/main/resources/properties.json
@@ -248,6 +248,7 @@
 "StackConfigurations/property_description",
 "StackConfigurations/type",
 "StackConfigurations/final",
+"StackConfigurations/adding_forbidden",
 "StackConfigurations/property_type",
 "_"
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
index 010a313..574d508 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
@@ -22,7 +22,7 @@
 
 
 
-
+
 
   
 mapred.capacity-scheduler.maximum-system-jobs

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
index 261d872..a8dc5c2 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
@@ -15,7 +15,7 @@
limitations under the License.
 -->
 
-
+
 
   
 yarn.scheduler.capacity.maximum-applications

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
index 2219b6f..74761dd 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHe

git commit: AMBARI-7403. Slider View: AppTypes should be determined only once at view load. (onechiporenko)

2014-09-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 0eb3937c2 -> 201bcb3e8


AMBARI-7403. Slider View: AppTypes should be determined only once at view load. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/201bcb3e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/201bcb3e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/201bcb3e

Branch: refs/heads/trunk
Commit: 201bcb3e81b172d585744c66449d76ca2f1b1d89
Parents: 0eb3937
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 14:12:23 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 14:12:23 2014 +0300

--
 contrib/views/slider/src/main/resources/ui/app/initialize.js   | 2 +-
 .../slider/src/main/resources/ui/app/mappers/application_type.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/initialize.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js 
b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 5428c3d..2a85588 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -112,7 +112,7 @@ App.initializer({
 
 });
 application.SliderController.proto().initResources();
-application.ApplicationTypeMapper.loop('load');
+application.ApplicationTypeMapper.load();
 application.SliderAppsMapper.loop('load');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
index 938412e..e4bdd85 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
@@ -34,7 +34,7 @@
  * 
  * @type {App.Mapper}
  */
-App.ApplicationTypeMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
+App.ApplicationTypeMapper = App.Mapper.create({
 
   /**
* Map for parsing JSON received from server



git commit: AMBARI-7401. Ambari Unit Tests failing on Jenkins.(vbrodetskyi)

2014-09-19 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 5c48015d6 -> 0eb3937c2


AMBARI-7401. Ambari Unit Tests failing on Jenkins.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0eb3937c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0eb3937c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0eb3937c

Branch: refs/heads/trunk
Commit: 0eb3937c208ac650725059356ec909effc367534
Parents: 5c48015
Author: Vitaly Brodetskyi 
Authored: Fri Sep 19 13:41:24 2014 +0300
Committer: Vitaly Brodetskyi 
Committed: Fri Sep 19 13:41:24 2014 +0300

--
 ambari-agent/src/test/python/ambari_agent/TestController.py  | 4 ++--
 .../test/python/ambari_agent/TestCustomServiceOrchestrator.py| 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestController.py
--
diff --git a/ambari-agent/src/test/python/ambari_agent/TestController.py 
b/ambari-agent/src/test/python/ambari_agent/TestController.py
index ad8303f..7ef64cc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestController.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestController.py
@@ -364,7 +364,7 @@ class TestController(unittest.TestCase):
   self.fail("Should throw exception!")
 except IOError, e: # Expected
   self.assertEquals('Response parsing failed! Request data: ' + data +
-'; Response: {invalid_object}', e.message)
+'; Response: {invalid_object}', str(e))
 
 exceptionMessage = "Connection Refused"
 conMock.request.side_effect = Exception(exceptionMessage)
@@ -373,7 +373,7 @@ class TestController(unittest.TestCase):
   self.fail("Should throw exception!")
 except IOError, e: # Expected
   self.assertEquals('Request to ' + url + ' failed due to ' +
-exceptionMessage, e.message)
+exceptionMessage, str(e))
 
 
   @patch.object(threading._Event, "wait")

http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
--
diff --git 
a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
index 92791e2..6a61c0d 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
@@ -486,7 +486,8 @@ class TestCustomServiceOrchestrator(TestCase):
   'taskId' : '13',
   'roleCommand': 'ACTIONEXECUTE',
   'commandType': 'BACKGROUND_EXECUTION_COMMAND',
-  '__handle' : BackgroundCommandExecutionHandle(None,13,MagicMock(), 
MagicMock())
+  '__handle': BackgroundCommandExecutionHandle({'taskId': '13'}, 13,
+   MagicMock(), MagicMock())
 }
 dummy_controller = MagicMock()
 orchestrator = CustomServiceOrchestrator(self.config, dummy_controller)



git commit: AMBARI-7402 Incorrect behavior of filtering by custom date on Config History tab. (ababiichuk)

2014-09-19 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 6eda8c66a -> 5c48015d6


AMBARI-7402 Incorrect behavior of filtering by custom date on Config History 
tab. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c48015d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c48015d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c48015d

Branch: refs/heads/trunk
Commit: 5c48015d6b62e3052b2555fefc0cc4604c74a88a
Parents: 6eda8c6
Author: aBabiichuk 
Authored: Fri Sep 19 13:36:18 2014 +0300
Committer: aBabiichuk 
Committed: Fri Sep 19 13:36:35 2014 +0300

--
 ambari-web/app/views/common/filter_view.js | 8 +++-
 ambari-web/app/views/main/dashboard/config_history_view.js | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c48015d/ambari-web/app/views/common/filter_view.js
--
diff --git a/ambari-web/app/views/common/filter_view.js 
b/ambari-web/app/views/common/filter_view.js
index 93c2d90..f279fd3 100644
--- a/ambari-web/app/views/common/filter_view.js
+++ b/ambari-web/app/views/common/filter_view.js
@@ -495,7 +495,13 @@ module.exports = {
 break;
   case 'range':
 return function (origin, compareValue){
-  //TODO add filter by range value
+  if (compareValue[1] && compareValue[0]) {
+return origin >= compareValue[0] && origin <= compareValue[1];
+  } else if (compareValue[0]){
+return origin >= compareValue[0];
+  } else if (compareValue[1]) {
+return origin <= compareValue[1]
+  }
   return true;
 };
 break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c48015d/ambari-web/app/views/main/dashboard/config_history_view.js
--
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js 
b/ambari-web/app/views/main/dashboard/config_history_view.js
index 436451e..792e31f 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -155,8 +155,8 @@ App.MainConfigHistoryView = App.TableView.extend({
 startTimeBinding: "controller.modifiedFilter.actualValues.startTime",
 endTimeBinding: "controller.modifiedFilter.actualValues.endTime",
 onTimeChange: function () {
-  this.get('parentView').updateFilter(this.get('column'), 
[this.get('startTime'), this.get('endTime')], 'range');
-}.observes('startTime')
+  this.get('parentView').updateFilter(this.get('column'), 
[this.get('controller.modifiedFilter.actualValues.startTime'), 
this.get('controller.modifiedFilter.actualValues.endTime')], 'range');
+}.observes('controller.modifiedFilter.actualValues.startTime', 
'controller.modifiedFilter.actualValues.endTime')
   }),
 
   authorFilterView: filters.createTextView({



git commit: AMBARI-7399. Slider View: Firefox has Create action inside the table header. (Max Shepel via akovalenko)

2014-09-19 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d62147ed3 -> 6eda8c66a


AMBARI-7399. Slider View: Firefox has Create action inside the table header. 
(Max Shepel via akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6eda8c66
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6eda8c66
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6eda8c66

Branch: refs/heads/trunk
Commit: 6eda8c66a44189320c2e2270be0f74a33c0a6f68
Parents: d62147e
Author: Aleksandr Kovalenko 
Authored: Fri Sep 19 13:14:22 2014 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Sep 19 13:19:24 2014 +0300

--
 .../src/main/resources/ui/app/styles/application.less  | 13 +
 .../main/resources/ui/app/templates/application.hbs| 13 +++--
 .../main/resources/ui/app/templates/slider_apps.hbs|  7 ---
 .../main/resources/ui/app/views/application_view.js|  5 +
 4 files changed, 25 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 44c6487..7497b6e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -44,11 +44,16 @@ a {
   cursor: pointer;
 }
 
-#slider-apps-table  {
-  .create-app {
-margin-bottom: 20px;
+.slider-header {
+  overflow: hidden;
+  .box-header {
+padding-top: 20px;
   }
-#slider-table {
+}
+
+#slider-apps-table  {
+
+  #slider-table {
 margin-top: 10px;
 margin-bottom: 10px;
 font-size: 13px\9;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index da828bf..f62 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -16,9 +16,18 @@
 * limitations under the License.
 }}
 
-
+
   {{#view view.SliderTitleView}}
-{{t slider.apps.title}} - {{App.instance}}
+{{t slider.apps.title}} - {{App.instance}}
+{{#if view.isIndexPage}}
+  
+
+  
+ {{t 
slider.apps.create}}
+  
+
+  
+{{/if}}
   {{/view}}
   {{outlet bs-tooltip-box}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index aecfb30..ef72291 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -17,13 +17,6 @@
 }}
 
 
-  
-
-  
- {{t slider.apps.create}}
-  
-
-  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js 
b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
index 1860944..7471f04 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
@@ -33,6 +33,11 @@ App.ApplicationView = Ember.View.extend({
   placement: 'bottom'
 }),
 
+isIndexPage: function () {
+  var currentPath = this.get('controller.currentPath');
+  return currentPath && (currentPath == 'slider_apps.index' || 
currentPath.indexOf('slider_apps.createAppWizard') != -1);
+}.property('controller.currentPath'),
+
 /**
  * Set popover template
  * @method sliderConfigsChecker



[1/2] AMBARI-7400. Slider View: Most view parameters should be made required. (onechiporenko)

2014-09-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d7b09b61a -> d62147ed3


http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js 
b/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
new file mode 100644
index 000..b530ab3
--- /dev/null
+++ b/contrib/views/slider/src/main/resources/ui/vendor/scripts/common/tv4.js
@@ -0,0 +1,1605 @@
+/*
+ Author: Geraint Luff and others
+ Year: 2013
+
+ This code is released into the "public domain" by its author(s).  Anybody may 
use, alter and distribute the code without restriction.  The author makes no 
guarantees, and takes no liability of any kind for use of this code.
+
+ If you find a bug or make an improvement, it would be courteous to let the 
author know, but it is not compulsory.
+ */
+(function (global, factory) {
+  if (typeof define === 'function' && define.amd) {
+// AMD. Register as an anonymous module.
+define([], factory);
+  } else if (typeof module !== 'undefined' && module.exports){
+// CommonJS. Define export.
+module.exports = factory();
+  } else {
+// Browser globals
+global.tv4 = factory();
+  }
+}(this, function () {
+
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fkeys
+  if (!Object.keys) {
+Object.keys = (function () {
+  var hasOwnProperty = Object.prototype.hasOwnProperty,
+hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
+dontEnums = [
+  'toString',
+  'toLocaleString',
+  'valueOf',
+  'hasOwnProperty',
+  'isPrototypeOf',
+  'propertyIsEnumerable',
+  'constructor'
+],
+dontEnumsLength = dontEnums.length;
+
+  return function (obj) {
+if (typeof obj !== 'object' && typeof obj !== 'function' || obj === 
null) {
+  throw new TypeError('Object.keys called on non-object');
+}
+
+var result = [];
+
+for (var prop in obj) {
+  if (hasOwnProperty.call(obj, prop)) {
+result.push(prop);
+  }
+}
+
+if (hasDontEnumBug) {
+  for (var i=0; i < dontEnumsLength; i++) {
+if (hasOwnProperty.call(obj, dontEnums[i])) {
+  result.push(dontEnums[i]);
+}
+  }
+}
+return result;
+  };
+})();
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
+  if (!Object.create) {
+Object.create = (function(){
+  function F(){}
+
+  return function(o){
+if (arguments.length !== 1) {
+  throw new Error('Object.create implementation only accepts one 
parameter.');
+}
+F.prototype = o;
+return new F();
+  };
+})();
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FisArray
+  if(!Array.isArray) {
+Array.isArray = function (vArg) {
+  return Object.prototype.toString.call(vArg) === "[object Array]";
+};
+  }
+// 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FindexOf
+  if (!Array.prototype.indexOf) {
+Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
+  if (this === null) {
+throw new TypeError();
+  }
+  var t = Object(this);
+  var len = t.length >>> 0;
+
+  if (len === 0) {
+return -1;
+  }
+  var n = 0;
+  if (arguments.length > 1) {
+n = Number(arguments[1]);
+if (n !== n) { // shortcut for verifying if it's NaN
+  n = 0;
+} else if (n !== 0 && n !== Infinity && n !== -Infinity) {
+  n = (n > 0 || -1) * Math.floor(Math.abs(n));
+}
+  }
+  if (n >= len) {
+return -1;
+  }
+  var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
+  for (; k < len; k++) {
+if (k in t && t[k] === searchElement) {
+  return k;
+}
+  }
+  return -1;
+};
+  }
+
+// Grungey Object.isFrozen hack
+  if (!Object.isFrozen) {
+Object.isFrozen = function (obj) {
+  var key = "tv4_test_frozen_key";
+  while (obj.hasOwnProperty(key)) {
+key += Math.random();
+  }
+  try {
+obj[key] = true;
+delete obj[key];
+return false;
+  } catch (e) {
+return true;
+  }
+};
+  }
+// Based on: https://github.com/geraintluff/uri-templates, but with all the 
de-substitution stuff removed

[2/2] git commit: AMBARI-7400. Slider View: Most view parameters should be made required. (onechiporenko)

2014-09-19 Thread onechiporenko
AMBARI-7400. Slider View: Most view parameters should be made required. 
(onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d62147ed
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d62147ed
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d62147ed

Branch: refs/heads/trunk
Commit: d62147ed37864f7f9f321448c3036ade0eeb681f
Parents: d7b09b6
Author: Oleg Nechiporenko 
Authored: Fri Sep 19 13:13:34 2014 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Sep 19 13:13:34 2014 +0300

--
 .../app/assets/data/resource/cluster_name.json  |   12 -
 .../assets/data/resource/components_hosts.json  |   16 -
 .../ui/app/assets/data/resource/empty_json.json |1 +
 .../assets/data/resource/service_configs.json   |   38 -
 .../assets/data/resource/service_status.json|   95 --
 .../assets/data/resource/slider-properties.json |7 +-
 .../createAppWizard/step1_controller.js |   90 +-
 .../ui/app/controllers/slider_controller.js |  308 +---
 .../src/main/resources/ui/app/helpers/ajax.js   |  119 +-
 .../src/main/resources/ui/app/initialize.js |9 +-
 .../ui/app/mappers/slider_apps_mapper.js|7 +
 .../resources/ui/app/models/slider_config.js|   51 +
 .../src/main/resources/ui/app/routes/main.js|   16 +
 .../resources/ui/app/templates/application.hbs  |4 +-
 .../ui/app/templates/slider_title_tooltip.hbs   |2 +-
 .../src/main/resources/ui/app/translations.js   |7 +-
 .../resources/ui/app/views/application_view.js  |   13 +-
 .../slider/src/main/resources/ui/config.js  |1 +
 .../resources/ui/vendor/scripts/common/tv4.js   | 1605 ++
 .../views/slider/src/main/resources/view.xml|   21 +-
 20 files changed, 1815 insertions(+), 607 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
deleted file mode 100644
index f559483..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "href" : "http://162.216.151.215:8080/api/v1/clusters?_=1409232826826";,
-  "items" : [
-{
-  "href" : "http://162.216.151.215:8080/api/v1/clusters/mycluster";,
-  "Clusters" : {
-"cluster_name" : "mycluster",
-"version" : "HDP-2.1"
-  }
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
deleted file mode 100644
index eaf72b4..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "items" : [
-{
-  "Hosts" : {
-"host_name" : "myHost"
-  },
-  "host_components" : [
-{
-  "HostRoles" : {
-"component_name" : ""
-  }
-}
-  ]
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
deleted file mode 100644
index 24c1a31..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "items" : [
-{
-  "cluster_name" : "cl",
-  "configurations" : [
-{
-  "Config" : {
-"cluster_name" : "cl"
-  

git commit: AMBARI-7385. Slider View: Multiple fixes for failed app (alexantonenko)

2014-09-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 44fbccef8 -> d7b09b61a


AMBARI-7385. Slider View: Multiple fixes for failed app (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7b09b61
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7b09b61
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7b09b61

Branch: refs/heads/trunk
Commit: d7b09b61a996772f1ad44d728b53d4306c1a95c3
Parents: 44fbcce
Author: Alex Antonenko 
Authored: Thu Sep 18 16:04:27 2014 +0300
Committer: Alex Antonenko 
Committed: Fri Sep 19 11:43:07 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js | 22 ++---
 .../resources/ui/app/styles/application.less| 21 +++-
 .../resources/ui/app/templates/application.hbs  |  2 +-
 .../resources/ui/app/templates/slider_app.hbs   | 26 +++-
 .../ui/app/templates/slider_title_tooltip.hbs   |  4 ++-
 5 files changed, 56 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 2779a57..d1bfccf 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -22,10 +22,24 @@ App.SliderAppController = Ember.ObjectController.extend({
* List of Slider App tabs
* @type {{title: string, linkTo: string}[]}
*/
-  sliderAppTabs: Ember.A([
-Ember.Object.create({title: Ember.I18n.t('common.summary'), linkTo: 
'slider_app.summary'}),
-Ember.Object.create({title: Ember.I18n.t('common.configs'), linkTo: 
'slider_app.configs'})
-  ]),
+  sliderAppTabs: function () {
+var configs = this.get("model.configs");
+var tabs = Ember.A([
+  Ember.Object.create({title: Ember.I18n.t('common.summary'), linkTo: 
'slider_app.summary'})
+]);
+if(typeof configs == "object" && Object.keys(configs).length > 0){
+  tabs.pushObject(Ember.Object.create({title: 
Ember.I18n.t('common.configs'), linkTo: 'slider_app.configs'}));
+}
+return tabs;
+  }.property('model.configs'),
+
+  /**
+   * Do we have quicklinks ?
+   * @type {bool}
+   */
+  weHaveQuicklinks: function () {
+return (Em.get(this.get('model'), 'quickLinks.content.content.length') > 
0);
+  }.property('model.quickLinks.content.content.length'),
 
   /**
* List of available for model actions

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 90f10d7..44c6487 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -562,6 +562,9 @@ a {
 td:first-child {
   text-align: right;
 }
+span{
+  word-break: break-all;
+}
   }
   .panel-components {
 .status {
@@ -852,4 +855,20 @@ a {
 color: #ff;
 background-color: #51a351;
   }
-}
\ No newline at end of file
+}
+.slider-app-title {
+  font-style: italic;
+  cursor: pointer;
+}
+.popover.bottom{
+  .popover-content{
+background: #ff;
+background: -moz-linear-gradient(top,  #f7f7f7 0%, #f7f7f7 18%, #ff 
19%, #ff 100%);
+background: -webkit-gradient(linear, top, top, color-stop(0%,#f7f7f7), 
color-stop(18%,#f7f7f7), color-stop(19%,#ff), color-stop(100%,#ff));
+background: -webkit-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: -o-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: -ms-linear-gradient(top,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+background: linear-gradient(to bottom,  #f7f7f7 0%,#f7f7f7 18%,#ff 
19%,#ff 100%);
+filter: progid:DXImageTransform.Microsoft.gradient( 
startColorstr='#f7f7f7', endColorstr='#ff',GradientType=1 );
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7b09b61/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs 
b/contrib/views/slider/src/main/resources/ui/app