ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-18055. service config page load takes long time on cluster with large number of service config versions. (jaimin)
Date Wed, 10 Aug 2016 16:54:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4e41ec399 -> 073b09f24


AMBARI-18055. service config page load takes long time on cluster with large number of service
config versions. (jaimin)


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

Branch: refs/heads/trunk
Commit: 073b09f24b8aff610a23162b63d76b3cb659688d
Parents: 4e41ec3
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Wed Aug 10 09:52:35 2016 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Wed Aug 10 09:55:53 2016 -0700

----------------------------------------------------------------------
 .../AmbariManagementControllerImpl.java         | 12 ++++-
 .../controller/ServiceConfigVersionRequest.java |  3 +-
 .../ServiceConfigVersionResourceProvider.java   |  3 +-
 .../ambari/server/orm/dao/ServiceConfigDAO.java | 34 +++++++++---
 .../orm/entities/ServiceConfigEntity.java       |  4 +-
 .../org/apache/ambari/server/state/Cluster.java |  7 +++
 .../server/state/cluster/ClusterImpl.java       | 55 ++++++++++++++------
 .../server/orm/dao/ServiceConfigDAOTest.java    | 52 ++++++++++++++++--
 ambari-web/app/utils/ajax/ajax.js               | 16 +-----
 9 files changed, 140 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index ff60863..63c99c6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -3572,9 +3572,17 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     Cluster cluster = clusters.getCluster(request.getClusterName());
 
     Set<ServiceConfigVersionResponse> result = new LinkedHashSet<ServiceConfigVersionResponse>();
+    String serviceName = request.getServiceName();
+    List<ServiceConfigVersionResponse> serviceConfigVersionResponses =  new ArrayList<ServiceConfigVersionResponse>();
+
+    if (Boolean.TRUE.equals(request.getIsCurrent()) && serviceName != null) {
+      serviceConfigVersionResponses.addAll(cluster.getActiveServiceConfigVersionResponse(serviceName));
+    } else {
+      serviceConfigVersionResponses.addAll(cluster.getServiceConfigVersions());
+    }
 
-    for (ServiceConfigVersionResponse response : cluster.getServiceConfigVersions()) {
-      if (request.getServiceName() != null && !StringUtils.equals(request.getServiceName(),
response.getServiceName())) {
+    for (ServiceConfigVersionResponse response : serviceConfigVersionResponses) {
+      if (serviceName != null && !StringUtils.equals(serviceName, response.getServiceName()))
{
         continue;
       }
       if (request.getVersion() != null && NumberUtils.compare(request.getVersion(),
response.getVersion()) != 0) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
index b32ccdf..c47a5e0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
@@ -31,13 +31,14 @@ public class ServiceConfigVersionRequest {
   public ServiceConfigVersionRequest() {
   }
 
-  public ServiceConfigVersionRequest(String clusterName, String serviceName, Long version,
Long createTime, Long applyTime, String userName) {
+  public ServiceConfigVersionRequest(String clusterName, String serviceName, Long version,
Long createTime, Long applyTime, String userName, Boolean isCurrent) {
     this.clusterName = clusterName;
     this.serviceName = serviceName;
     this.version = version;
     this.createTime = createTime;
     this.applyTime = applyTime;
     this.userName = userName;
+    this.isCurrent = isCurrent;
   }
 
   public String getServiceName() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
index d7287e5..2edbe9b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
@@ -215,10 +215,11 @@ public class ServiceConfigVersionResourceProvider extends
     String clusterName = (String) properties.get(SERVICE_CONFIG_VERSION_CLUSTER_NAME_PROPERTY_ID);
     String serviceName = (String) properties.get(SERVICE_CONFIG_VERSION_SERVICE_NAME_PROPERTY_ID);
     String user = (String) properties.get(SERVICE_CONFIG_VERSION_USER_PROPERTY_ID);
+    Boolean isCurrent = Boolean.valueOf((String) properties.get(SERVICE_CONFIG_VERSION_IS_CURRENT_PROPERTY_ID));
     Object versionObject = properties.get(SERVICE_CONFIG_VERSION_PROPERTY_ID);
     Long version = versionObject == null ? null : Long.valueOf(versionObject.toString());
 
-    return new ServiceConfigVersionRequest(clusterName, serviceName, version, null, null,
user);
+    return new ServiceConfigVersionRequest(clusterName, serviceName, version, null, null,
user, isCurrent);
   }
 
   private List<Map<String, Object>> convertToSubResources(final String clusterName,
List<ConfigurationResponse> configs) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
index 3a73b2d..2cbee8d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
@@ -34,13 +34,13 @@ import org.apache.ambari.server.orm.RequiresSession;
 import org.apache.ambari.server.orm.entities.ServiceConfigEntity;
 import org.apache.ambari.server.orm.entities.StackEntity;
 import org.apache.ambari.server.state.StackId;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.Predicate;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import com.google.inject.persist.Transactional;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.Predicate;
 
 @Singleton
 public class ServiceConfigDAO {
@@ -126,6 +126,26 @@ public class ServiceConfigDAO {
   }
 
   /**
+   *  Gets the latest service config versions of all config groups for a service
+   * @param clusterId
+   *          the cluster (not {@code null}).
+   * @param serviceName
+   *          Name of the service whose latest service config versions needs to be retrieved
.
+   * @return all service configurations for the cluster and service.
+   */
+  @RequiresSession
+  public List<ServiceConfigEntity> getLastServiceConfigsForService(Long clusterId,
String serviceName) {
+    TypedQuery<ServiceConfigEntity> query = entityManagerProvider.get().createNamedQuery(
+        "ServiceConfigEntity.findLatestServiceConfigsByService",
+        ServiceConfigEntity.class);
+
+    query.setParameter("clusterId", clusterId);
+    query.setParameter("serviceName", serviceName);
+
+    return daoUtils.selectList(query);
+  }
+
+  /**
    * Get all service configurations for the specified cluster and stack. This
    * will return different versions of the same configuration (HDFS v1 and v2)
    * if they exist.
@@ -207,12 +227,12 @@ public class ServiceConfigDAO {
    */
   @RequiresSession
   public List<ServiceConfigEntity> getServiceConfigs(Long clusterId) {
-    TypedQuery<ServiceConfigEntity> query = entityManagerProvider.get()
-      .createQuery("SELECT scv FROM ServiceConfigEntity scv " +
-        "WHERE scv.clusterId=?1 " +
-        "ORDER BY scv.createTimestamp DESC", ServiceConfigEntity.class);
+    TypedQuery<ServiceConfigEntity> query = entityManagerProvider.get().createNamedQuery(
+        "ServiceConfigEntity.findAll", ServiceConfigEntity.class);
 
-    return daoUtils.selectList(query, clusterId);
+    query.setParameter("clusterId", clusterId);
+
+    return daoUtils.selectList(query);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
index 22f82fc..7c28835 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
@@ -47,9 +47,11 @@ import javax.persistence.TableGenerator;
   , initialValue = 1
 )
 @NamedQueries({
+    @NamedQuery(name = "ServiceConfigEntity.findAll", query = "SELECT serviceConfig FROM
ServiceConfigEntity serviceConfig WHERE serviceConfig.clusterId=:clusterId ORDER BY serviceConfig.version
DESC"),
     @NamedQuery(name = "ServiceConfigEntity.findNextServiceConfigVersion", query = "SELECT
COALESCE(MAX(serviceConfig.version), 0) + 1 AS nextVersion FROM ServiceConfigEntity serviceConfig
WHERE serviceConfig.serviceName=:serviceName AND serviceConfig.clusterId=:clusterId"),
     @NamedQuery(name = "ServiceConfigEntity.findAllServiceConfigsByStack", query = "SELECT
serviceConfig FROM ServiceConfigEntity serviceConfig WHERE serviceConfig.clusterId=:clusterId
AND serviceConfig.stack=:stack"),
-    @NamedQuery(name = "ServiceConfigEntity.findLatestServiceConfigsByStack", query = "SELECT
serviceConfig FROM ServiceConfigEntity serviceConfig WHERE serviceConfig.clusterId = :clusterId
AND serviceConfig.createTimestamp = (SELECT MAX(serviceConfig2.createTimestamp) FROM ServiceConfigEntity
serviceConfig2 WHERE serviceConfig2.clusterId=:clusterId AND serviceConfig2.stack=:stack AND
serviceConfig2.serviceName = serviceConfig.serviceName)") })
+    @NamedQuery(name = "ServiceConfigEntity.findLatestServiceConfigsByStack", query = "SELECT
serviceConfig FROM ServiceConfigEntity serviceConfig WHERE serviceConfig.clusterId = :clusterId
AND serviceConfig.version = (SELECT MAX(serviceConfig2.version) FROM ServiceConfigEntity serviceConfig2
WHERE serviceConfig2.clusterId=:clusterId AND serviceConfig2.stack=:stack AND serviceConfig2.serviceName
= serviceConfig.serviceName)"),
+    @NamedQuery(name = "ServiceConfigEntity.findLatestServiceConfigsByService", query = "SELECT
scv FROM ServiceConfigEntity scv WHERE scv.clusterId = :clusterId AND scv.serviceName = :serviceName
AND scv.version = (SELECT MAX(scv2.version) FROM ServiceConfigEntity scv2 WHERE (scv2.serviceName
= :serviceName AND scv2.clusterId = :clusterId) AND (scv2.groupId = scv.groupId OR (scv2.groupId
IS NULL AND scv.groupId IS NULL)))")})
 public class ServiceConfigEntity {
   @Id
   @Column(name = "service_config_id")

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
index 0519123..2452df6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
@@ -431,6 +431,13 @@ public interface Cluster {
   Map<String, Collection<ServiceConfigVersionResponse>> getActiveServiceConfigVersions();
 
   /**
+   * Get active service config version responses for all config groups of a service
+   * @param serviceName service name
+   * @return
+   */
+  public List<ServiceConfigVersionResponse> getActiveServiceConfigVersionResponse(String
serviceName);
+
+  /**
    * Get service config version history
    * @return
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
index 0d212a1..e1b9368 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
@@ -2621,9 +2621,6 @@ public class ClusterImpl implements Cluster {
           activeServiceConfigResponseGroups.put(serviceConfigVersionResponse.getGroupName(),
serviceConfigVersionResponse);
           activeServiceConfigResponse = serviceConfigVersionResponse;
         }
-
-        serviceConfigVersionResponse.setConfigurations(new ArrayList<ConfigurationResponse>());
-
         if (serviceConfigEntity.getGroupId() == null) {
           if (serviceConfigVersionResponse.getCreateTime() > activeServiceConfigResponse.getCreateTime())
{
             activeServiceConfigResponseGroups.put(serviceConfigVersionResponse.getGroupName(),
serviceConfigVersionResponse);
@@ -2636,19 +2633,7 @@ public class ClusterImpl implements Cluster {
         }
 
         serviceConfigVersionResponse.setIsCurrent(false);
-
-        List<ClusterConfigEntity> clusterConfigEntities = serviceConfigEntity.getClusterConfigEntities();
-        for (ClusterConfigEntity clusterConfigEntity : clusterConfigEntities) {
-          Config config = allConfigs.get(clusterConfigEntity.getType()).get(
-              clusterConfigEntity.getTag());
-
-          serviceConfigVersionResponse.getConfigurations().add(
-              new ConfigurationResponse(getClusterName(), config.getStackId(),
-                  config.getType(), config.getTag(), config.getVersion(),
-                  config.getProperties(), config.getPropertiesAttributes(), config.getPropertiesTypes()));
-        }
-
-        serviceConfigVersionResponses.add(serviceConfigVersionResponse);
+        serviceConfigVersionResponses.add(getServiceConfigVersionResponseWithConfig(serviceConfigVersionResponse,
serviceConfigEntity));
       }
 
       for (Map<String, ServiceConfigVersionResponse> serviceConfigVersionResponseGroup:
activeServiceConfigResponses.values()) {
@@ -2689,6 +2674,44 @@ public class ClusterImpl implements Cluster {
     return activeServiceConfigVersions;
   }
 
+  @Override
+  public List<ServiceConfigVersionResponse> getActiveServiceConfigVersionResponse(String
serviceName) {
+    clusterGlobalLock.readLock().lock();
+    try {
+      List<ServiceConfigEntity> activeServiceConfigVersionEntities = new ArrayList<ServiceConfigEntity>();
+      List<ServiceConfigVersionResponse> activeServiceConfigVersionResponses = new
ArrayList<ServiceConfigVersionResponse>();
+      activeServiceConfigVersionEntities.addAll(serviceConfigDAO.getLastServiceConfigsForService(getClusterId(),
serviceName));
+      for (ServiceConfigEntity serviceConfigEntity : activeServiceConfigVersionEntities)
{
+        ServiceConfigVersionResponse serviceConfigVersionResponse = getServiceConfigVersionResponseWithConfig(convertToServiceConfigVersionResponse(serviceConfigEntity),
serviceConfigEntity);
+        serviceConfigVersionResponse.setIsCurrent(true);
+        activeServiceConfigVersionResponses.add(serviceConfigVersionResponse);
+      }
+      return activeServiceConfigVersionResponses;
+    } finally {
+      clusterGlobalLock.readLock().unlock();
+    }
+  }
+
+  /**
+   * Adds Configuration data to the serviceConfigVersionResponse
+   * @param serviceConfigVersionResponse
+   * @param serviceConfigEntity
+   * @return serviceConfigVersionResponse
+   */
+  private ServiceConfigVersionResponse getServiceConfigVersionResponseWithConfig(ServiceConfigVersionResponse
serviceConfigVersionResponse, ServiceConfigEntity serviceConfigEntity) {
+    serviceConfigVersionResponse.setConfigurations(new ArrayList<ConfigurationResponse>());
+    List<ClusterConfigEntity> clusterConfigEntities = serviceConfigEntity.getClusterConfigEntities();
+    for (ClusterConfigEntity clusterConfigEntity : clusterConfigEntities) {
+      Config config = allConfigs.get(clusterConfigEntity.getType()).get(
+          clusterConfigEntity.getTag());
+
+      serviceConfigVersionResponse.getConfigurations().add(
+          new ConfigurationResponse(getClusterName(), config));
+    }
+    return serviceConfigVersionResponse;
+  }
+
+
   @RequiresSession
   ServiceConfigVersionResponse getActiveServiceConfigVersion(String serviceName) {
     ServiceConfigEntity lastServiceConfig = serviceConfigDAO.getLastServiceConfig(getClusterId(),
serviceName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
index 78461dc..2388c11 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
@@ -87,6 +87,30 @@ public class ServiceConfigDAOTest {
          String userName, Long version, Long serviceConfigId,
          Long createTimestamp, List<ClusterConfigEntity> clusterConfigEntities)
     throws Exception {
+    ServiceConfigEntity serviceConfigEntity = prepareServiceConfig(serviceName,
+        userName, version, serviceConfigId, createTimestamp, clusterConfigEntities);
+    serviceConfigDAO.create(serviceConfigEntity);
+
+    return serviceConfigEntity;
+  }
+
+  private ServiceConfigEntity createServiceConfigWithGroup(String serviceName,
+                                                  String userName, Long version, Long serviceConfigId,
+                                                  Long createTimestamp, List<ClusterConfigEntity>
clusterConfigEntities, Long groupId)
+      throws Exception {
+    ServiceConfigEntity serviceConfigEntity = prepareServiceConfig(serviceName,
+        userName, version, serviceConfigId, createTimestamp, clusterConfigEntities);
+    serviceConfigEntity.setGroupId(groupId);
+    serviceConfigDAO.create(serviceConfigEntity);
+
+    return serviceConfigEntity;
+  }
+
+
+  private ServiceConfigEntity prepareServiceConfig(String serviceName,
+                                                  String userName, Long version, Long serviceConfigId,
+                                                  Long createTimestamp, List<ClusterConfigEntity>
clusterConfigEntities)
+      throws Exception {
 
     // create an admin resource to represent this cluster
     ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findById(ResourceType.CLUSTER.getId());
@@ -123,12 +147,10 @@ public class ServiceConfigDAOTest {
     serviceConfigEntity.setClusterConfigEntities(clusterConfigEntities);
     serviceConfigEntity.setClusterEntity(clusterEntity);
     serviceConfigEntity.setStack(clusterEntity.getDesiredStack());
-
-    serviceConfigDAO.create(serviceConfigEntity);
-
     return serviceConfigEntity;
   }
 
+
   @Test
   public void testCreateServiceConfigVersion() throws Exception {
 
@@ -239,6 +261,30 @@ public class ServiceConfigDAOTest {
   }
 
   @Test
+  public void testGetLastServiceConfigsForService() throws Exception {
+    String serviceName = "HDFS";
+    createServiceConfig(serviceName, "admin", 1L, 1L, 1111L, null);
+    createServiceConfig(serviceName, "admin", 2L, 2L, 1010L, null);
+    createServiceConfigWithGroup(serviceName, "admin", 3L, 3L, 2222L, null, 1L);
+    createServiceConfigWithGroup(serviceName, "admin", 5L, 5L, 3333L, null, 2L);
+    createServiceConfigWithGroup(serviceName, "admin", 4L, 4L, 3330L, null, 2L);
+
+    List<ServiceConfigEntity> serviceConfigEntities =
+        serviceConfigDAO.getLastServiceConfigsForService(clusterDAO.findByName("c1").getClusterId(),
serviceName);
+
+    Assert.assertNotNull(serviceConfigEntities);
+    Assert.assertEquals(3, serviceConfigEntities.size());
+
+    for (ServiceConfigEntity sce: serviceConfigEntities) {
+     if (sce.getGroupId() != null && sce.getGroupId().equals(2L)) {
+       // Group ID with the highest version should be selected
+       Assert.assertEquals(sce.getVersion(), Long.valueOf(5L));
+     }
+    }
+  }
+
+
+  @Test
   public void testGetLastServiceConfig() throws Exception {
     createServiceConfig("HDFS", "admin", 1L, 1L, 1111L, null);
     createServiceConfig("HDFS", "admin", 2L, 2L, 2222L, null);

http://git-wip-us.apache.org/repos/asf/ambari/blob/073b09f2/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 521ec9a..5538e6d 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -742,16 +742,6 @@ var urls = {
 
   /*************************CONFIG VERSIONS*************************************/
 
-  'configs.config_versions.load.all.min': {
-    'real': '/clusters/{clusterName}/configurations/service_config_versions?fields=service_config_version,user,hosts,group_id,group_name,is_current,createtime,service_name,service_config_version_note&minimal_response=true',
-    'mock': '/data/configurations/config_versions.json'
-  },
-
-  'configs.config_versions.load.service.min': {
-    'real': '/clusters/{clusterName}/configurations/service_config_versions?service_name={serviceName}&fields=service_config_version,user,hosts,group_id,group_name,is_current,createtime,service_name,service_config_version_note&minimal_response=true',
-    'mock': '/data/configurations/config_versions.json'
-  },
-
   'configs.config_versions.load': {
     'real': '/clusters/{clusterName}/configurations/service_config_versions?service_name={serviceName}&service_config_version={configVersion}&fields=*',
     'mock': '/data/configurations/config_versions.json'
@@ -2690,13 +2680,9 @@ var urls = {
   },
 
   'service.serviceConfigVersions.get': {
-    real: '/clusters/{clusterName}/configurations/service_config_versions?service_name={serviceName}&fields=service_config_version,user,hosts,group_id,group_name,is_current,createtime,service_name,service_config_version_note,stack_id,is_cluster_compatible&minimal_response=true',
+    real: '/clusters/{clusterName}/configurations/service_config_versions?service_name={serviceName}&fields=service_config_version,user,hosts,group_id,group_name,is_current,createtime,service_name,service_config_version_note,stack_id,is_cluster_compatible&sortBy=service_config_version.desc&minimal_response=true',
     mock: '/data/configurations/service_versions.json'
   },
-  'service.serviceConfigVersions.get.not.loaded': {
-    real: '/clusters/{clusterName}/configurations/service_config_versions?service_config_version>{lastSavedVersion}&service_name={serviceName}&fields=service_config_version,user,hosts,group_id,group_name,is_current,createtime,service_name,service_config_version_note,stack_id,is_cluster_compatible&minimal_response=true',
-    mock: '/data/configurations/service_versions_total.json'
-  },
   'service.serviceConfigVersions.get.current': {
     real: '/clusters/{clusterName}/configurations/service_config_versions?service_name.in({serviceNames})&is_current=true&fields=*',
     mock: '/data/configurations/service_versions.json'


Mime
View raw message