diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/KeeperContainerInfoController.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/KeeperContainerInfoController.java index 87555b8612..f2c86c7b34 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/KeeperContainerInfoController.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/KeeperContainerInfoController.java @@ -1,14 +1,13 @@ package com.ctrip.xpipe.redis.console.controller.consoleportal; import com.ctrip.xpipe.redis.checker.controller.result.RetMessage; -import com.ctrip.xpipe.redis.checker.model.DcClusterShard; import com.ctrip.xpipe.redis.checker.model.KeeperContainerUsedInfoModel; import com.ctrip.xpipe.redis.console.controller.AbstractConsoleController; import com.ctrip.xpipe.redis.console.keeper.KeeperContainerUsedInfoAnalyzer; import com.ctrip.xpipe.redis.console.keeper.entity.KeeperContainerDiskType; import com.ctrip.xpipe.redis.console.model.ConfigModel; import com.ctrip.xpipe.redis.console.model.KeeperContainerInfoModel; -import com.ctrip.xpipe.redis.console.model.KeepercontainerTbl; +import com.ctrip.xpipe.redis.console.model.KeeperMsgModel; import com.ctrip.xpipe.redis.console.model.MigrationKeeperContainerDetailModel; import com.ctrip.xpipe.redis.console.service.ConfigService; import com.ctrip.xpipe.redis.console.service.KeeperContainerMigrationService; @@ -132,4 +131,13 @@ public Set getAllDiskTypeName() { } } + @RequestMapping(value = "/keepercontainer/keepers/{ip}") + public List getLocateKeeperContainerByIpAndPort(@PathVariable String ip) { + try { + return keeperContainerService.getAllKeepers(ip); + } catch (Exception e) { + return Collections.emptyList(); + } + } + } diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/ShardController.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/ShardController.java index c12632fa8c..22974cbde6 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/ShardController.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/ShardController.java @@ -1,5 +1,7 @@ package com.ctrip.xpipe.redis.console.controller.consoleportal; +import com.ctrip.xpipe.redis.checker.controller.result.GenericRetMessage; +import com.ctrip.xpipe.redis.checker.controller.result.RetMessage; import com.ctrip.xpipe.redis.console.controller.AbstractConsoleController; import com.ctrip.xpipe.redis.console.model.ShardModel; import com.ctrip.xpipe.redis.console.model.ShardTbl; @@ -62,4 +64,24 @@ public List findAllUnhealthyShards() { return valueOrEmptySet(ShardListModel.class, shardService.findAllUnhealthy()); } + @RequestMapping(value = "/shards/allById/{id}", method = RequestMethod.GET) + public RetMessage findAllShardsById(@PathVariable long id) { + try { + List result = new ArrayList<>(); + result.add(shardService.findByReplId(id)); + return GenericRetMessage.createGenericRetMessage(result); + } catch (Exception e) { + return RetMessage.createFailMessage(e.getMessage()); + } + } + + @RequestMapping(value = "/shards/allByName/{shardName}", method = RequestMethod.GET) + public RetMessage findAllShardsByShardName(@PathVariable String shardName) { + try { + return GenericRetMessage.createGenericRetMessage(shardService.findAllByShardName(shardName)); + } catch (Exception e) { + return RetMessage.createFailMessage(e.getMessage()); + } + } + } diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/KeeperMsgModel.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/KeeperMsgModel.java new file mode 100644 index 0000000000..39f3e38655 --- /dev/null +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/KeeperMsgModel.java @@ -0,0 +1,101 @@ +package com.ctrip.xpipe.redis.console.model; + +public class KeeperMsgModel { + + private String ip; + private int port; + private String clusterName; + private String shardName; + private boolean active; + private String role; + private String err; + + public KeeperMsgModel(String ip, int port, String clusterName, String shardName) { + this.ip = ip; + this.port = port; + this.clusterName = clusterName; + this.shardName = shardName; + } + + public KeeperMsgModel(String clusterName, String shardName) { + this.clusterName = clusterName; + this.shardName = shardName; + } + + public KeeperMsgModel(String err) { + this.err = err; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public String getShardName() { + return shardName; + } + + public void setShardName(String shardName) { + this.shardName = shardName; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getErr() { + return err; + } + + public void setErr(String err) { + this.err = err; + } + + public void addErr(String err) { + this.err += err; + } + + @Override + public String toString() { + return "KeeperMsgModel{" + + "ip='" + ip + '\'' + + ", port=" + port + + ", clusterName='" + clusterName + '\'' + + ", shardName='" + shardName + '\'' + + ", active=" + active + + ", role='" + role + '\'' + + ", err='" + err + '\'' + + '}'; + } +} diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/consoleportal/ShardListModel.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/consoleportal/ShardListModel.java index 7062f4a31b..d0abac5443 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/consoleportal/ShardListModel.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/model/consoleportal/ShardListModel.java @@ -9,6 +9,8 @@ public class ShardListModel extends AbstractClusterModel { private String shardName; + private Long shardId; + private String clusterType; private List dcNames = new ArrayList<>(); @@ -22,6 +24,15 @@ public ShardListModel setShardName(String shardName) { return this; } + public Long getShardId() { + return shardId; + } + + public ShardListModel setShardId(Long shardId) { + this.shardId = shardId; + return this; + } + public List getDcNames() { return dcNames; } diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/DcClusterService.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/DcClusterService.java index e7da0688d7..106f28de78 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/DcClusterService.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/DcClusterService.java @@ -10,6 +10,7 @@ public interface DcClusterService { DcClusterTbl find(long dcId, long clusterId); DcClusterTbl find(String dcName, String clusterName); + DcClusterTbl findByPK(long keyDcClusterId); DcClusterCreateInfo findDcClusterCreateInfo(final String dcName, final String clusterName); void updateDcCluster(DcClusterCreateInfo dcClusterCreateInfo); List findAllDcClusters(); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/KeeperContainerService.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/KeeperContainerService.java index b93ec32df1..33ec1e79e0 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/KeeperContainerService.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/KeeperContainerService.java @@ -2,8 +2,8 @@ import com.ctrip.xpipe.redis.console.controller.api.data.meta.KeeperContainerCreateInfo; import com.ctrip.xpipe.redis.console.model.KeeperContainerInfoModel; +import com.ctrip.xpipe.redis.console.model.KeeperMsgModel; import com.ctrip.xpipe.redis.console.model.KeepercontainerTbl; -import com.ctrip.xpipe.redis.core.entity.KeeperInstanceMeta; import java.util.List; import java.util.Map; @@ -41,4 +41,6 @@ public interface KeeperContainerService { void updateKeeperContainerByInfoModel(KeeperContainerInfoModel keeperContainerInfoModel); Map keeperContainerIdDcMap(); + + List getAllKeepers(String keeperIp); } diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/RedisService.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/RedisService.java index c8767fd3dc..35daa8c7c5 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/RedisService.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/RedisService.java @@ -16,6 +16,8 @@ public interface RedisService { List findAllRedisWithSameIP(String ip); + List findAllRedisByIp(String ip); + List findAllByDcClusterShard(long dcClusterShardId); List findAllRedisesByDcClusterName(String dcId, String clusterId); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/ShardService.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/ShardService.java index bf76dde6a1..ceca868fbd 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/ShardService.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/ShardService.java @@ -15,6 +15,8 @@ public interface ShardService { ShardTbl find(String clusterName, String shardName); List findAllByClusterName(String clusterName); List findAllShardNamesByClusterName(String clusterName); + List findAllByShardName(String shardName); + ShardListModel findByReplId(long replId); ShardTbl createShard(String clusterName, ShardTbl shard, Map sentinels); ShardTbl findOrCreateShardIfNotExist(String clusterName, ShardTbl shard, List dcClusterTbls, Map sentinels); void deleteShard(String clusterName, String shardName); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/DcClusterServiceImpl.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/DcClusterServiceImpl.java index e4547b854e..a053be7421 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/DcClusterServiceImpl.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/DcClusterServiceImpl.java @@ -59,6 +59,16 @@ public DcClusterTbl doQuery() throws DalException { }); } + @Override + public DcClusterTbl findByPK(long keyDcClusterId) { + return queryHandler.handleQuery(new DalQuery() { + @Override + public DcClusterTbl doQuery() throws DalException { + return dao.findByPK(keyDcClusterId, DcClusterTblEntity.READSET_FULL); + } + }); + } + @Override public DcClusterCreateInfo findDcClusterCreateInfo(final String dcName, final String clusterName) { DcClusterTbl dcClusterTbl = find(dcName, clusterName); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceImpl.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceImpl.java index 2d717acda3..92515ace87 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceImpl.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceImpl.java @@ -1,5 +1,6 @@ package com.ctrip.xpipe.redis.console.service.impl; +import com.ctrip.xpipe.command.AbstractCommand; import com.ctrip.xpipe.endpoint.HostPort; import com.ctrip.xpipe.exception.XpipeRuntimeException; import com.ctrip.xpipe.redis.checker.model.KeeperContainerUsedInfoModel; @@ -32,10 +33,14 @@ import org.springframework.web.client.RestOperations; import org.unidal.dal.jdbc.DalException; +import javax.annotation.Resource; import java.util.*; +import java.util.concurrent.ScheduledExecutorService; import java.util.stream.Collectors; import java.util.stream.IntStream; +import static com.ctrip.xpipe.spring.AbstractSpringConfigContext.SCHEDULED_EXECUTOR; + @Service @Conditional(ConsoleDisableDbCondition.class) @DisableDbMode(false) @@ -54,11 +59,21 @@ public class KeeperContainerServiceImpl extends AbstractConsoleService() { @@ -470,6 +485,56 @@ public Map keeperContainerIdDcMap() { return keeperContainerIdDcMap; } + @Override + public List getAllKeepers(String keeperIp) { + List keepers = redisService.findAllRedisByIp(keeperIp); + if (keepers.isEmpty()) return Collections.emptyList(); + List result = new ArrayList<>(); + keepers.forEach(keeper -> { + try { + KeeperMsgModel keeperMsg = getKeeperMsg(keeper.getDcClusterShardId()); + keeperMsg.setIp(keeper.getRedisIp()); + keeperMsg.setPort(keeper.getRedisPort()); + keeperMsg.setRole(keeper.getRedisRole()); + if (XPipeConsoleConstant.ROLE_KEEPER.equals(keeper.getRedisRole())) { + keeperMsg.setActive(keeper.isKeeperActive()); + } else if(XPipeConsoleConstant.ROLE_REDIS.equals(keeper.getRedisRole())) { + keeperMsg.setActive(keeper.isMaster()); + } else { + keeperMsg.setErr("Instance role not in redis and keeper!"); + } + result.add(keeperMsg); + } catch (Exception e) { + KeeperMsgModel keeperMsg = new KeeperMsgModel(e.getMessage()); + keeperMsg.setIp(keeper.getRedisIp()); + keeperMsg.setPort(keeper.getRedisPort()); + keeperMsg.setRole(keeper.getRedisRole()); + if (XPipeConsoleConstant.ROLE_KEEPER.equals(keeper.getRedisRole())) { + keeperMsg.setActive(keeper.isKeeperActive()); + } else if(XPipeConsoleConstant.ROLE_REDIS.equals(keeper.getRedisRole())) { + keeperMsg.setActive(keeper.isMaster()); + } else { + keeperMsg.addErr(" and Instance role not in redis and keeper!"); + } + result.add(keeperMsg); + } + }); + + return result; + } + + private KeeperMsgModel getKeeperMsg(long dcClusterShardId) { + DcClusterShardTbl dcClusterShardTbl = dcClusterShardService.findByPk(dcClusterShardId); + if (dcClusterShardTbl == null) return new KeeperMsgModel("Can't find dcClusterShardTbl by dcClusterShardId:" + dcClusterShardId); + DcClusterTbl dcClusterTbl = dcClusterService.findByPK(dcClusterShardTbl.getDcClusterId()); + if (dcClusterTbl == null) return new KeeperMsgModel("Can't find dcClusterTbl by dcClusterId:" + dcClusterShardTbl.getDcClusterId()); + ClusterTbl clusterTbl = clusterService.find(dcClusterTbl.getClusterId()); + if (clusterTbl == null) return new KeeperMsgModel("Can't find clusterTbl by clusterId:" + dcClusterTbl.getClusterId()); + ShardTbl shardTbl = shardService.find(dcClusterShardTbl.getShardId()); + if (shardTbl == null) return new KeeperMsgModel("Can't find shardTbl by shardId:" + dcClusterShardTbl.getShardId()); + return new KeeperMsgModel(clusterTbl.getClusterName(), shardTbl.getShardName()); + } + @Override public List> divideKeeperContainers(int partsCount) { List all = findAll(); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceWithoutDB.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceWithoutDB.java index 03b73c9978..8780cd8852 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceWithoutDB.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/KeeperContainerServiceWithoutDB.java @@ -6,6 +6,7 @@ import com.ctrip.xpipe.redis.console.config.ConsoleConfig; import com.ctrip.xpipe.redis.console.controller.api.data.meta.KeeperContainerCreateInfo; import com.ctrip.xpipe.redis.console.model.KeeperContainerInfoModel; +import com.ctrip.xpipe.redis.console.model.KeeperMsgModel; import com.ctrip.xpipe.redis.console.model.KeepercontainerTbl; import com.ctrip.xpipe.redis.console.resources.ConsolePortalService; import com.ctrip.xpipe.redis.console.service.KeeperContainerService; @@ -191,4 +192,9 @@ public Map keeperContainerIdDcMap() { return keeperContainerIdDcMap; } + @Override + public List getAllKeepers(String keeperIp) { + throw new UnsupportedOperationException(); + } + } diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceImpl.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceImpl.java index be027a6f9b..cb6c5dc666 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceImpl.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceImpl.java @@ -92,6 +92,16 @@ public List doQuery() throws DalException { }); } + @Override + public List findAllRedisByIp(String ip) { + return queryHandler.handleQuery(new DalQuery>() { + @Override + public List doQuery() throws DalException { + return dao.findByIp(ip, RedisTblEntity.READSET_REDIS_MSG_INFO); + } + }); + } + @Override public List findAllByDcClusterShard(final long dcClusterShardId) { return queryHandler.handleQuery(new DalQuery>() { diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceWithoutDB.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceWithoutDB.java index 97e4ad9bd2..40b213482c 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceWithoutDB.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/RedisServiceWithoutDB.java @@ -14,6 +14,7 @@ import org.springframework.stereotype.Service; import org.unidal.dal.jdbc.DalException; +import java.util.Collections; import java.util.List; @Service @@ -39,6 +40,11 @@ public List findAllRedisWithSameIP(String ip) { throw new UnsupportedOperationException(); } + @Override + public List findAllRedisByIp(String ip) { + throw new UnsupportedOperationException(); + } + @Override public List findAllByDcClusterShard(long dcClusterShardId) { return consolePortalService.findAllByDcClusterShard(dcClusterShardId); diff --git a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/ShardServiceImpl.java b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/ShardServiceImpl.java index eeffe397c3..f56c8e3df2 100644 --- a/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/ShardServiceImpl.java +++ b/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/service/impl/ShardServiceImpl.java @@ -1,6 +1,7 @@ package com.ctrip.xpipe.redis.console.service.impl; import com.ctrip.xpipe.cluster.ClusterType; +import com.ctrip.xpipe.exception.XpipeRuntimeException; import com.ctrip.xpipe.redis.console.cache.AzGroupCache; import com.ctrip.xpipe.redis.console.config.ConsoleConfig; import com.ctrip.xpipe.redis.console.dao.ClusterDao; @@ -143,6 +144,52 @@ public List doQuery() throws DalException { }); } + @Override + public List findAllByShardName(String shardName) { + List shardTbls = queryHandler.handleQuery(new DalQuery>() { + @Override + public List doQuery() throws DalException { + return dao.findAllByShardName(shardName, ShardTblEntity.READSET_FULL); + } + }); + if (shardTbls == null || shardTbls.isEmpty()) throw new XpipeRuntimeException("Shard: " + shardName + " not found"); + List shardListModels = new ArrayList<>(); + shardTbls.forEach(shardTbl -> { + ClusterTbl cluster = clusterService.find(shardTbl.getClusterId()); + if (cluster == null) throw new XpipeRuntimeException("ClusterId: " + shardTbl.getClusterId() + " not found"); + shardListModels.add((ShardListModel) new ShardListModel().setShardName(shardTbl.getShardName()) + .setShardId(shardTbl.getId()) + .setActivedcId(cluster.getActivedcId()) + .setClusterType(cluster.getClusterType()) + .setClusterName(cluster.getClusterName()) + .setClusterAdminEmails(cluster.getClusterAdminEmails()) + .setClusterOrgName(cluster.getClusterOrgName()) + .setClusterDescription(cluster.getClusterDescription())); + }); + return shardListModels; + } + + @Override + public ShardListModel findByReplId(long replId) { + + ShardTbl shardTbl = queryHandler.handleQuery(new DalQuery() { + @Override + public ShardTbl doQuery() throws DalException { + return dao.findAllById(replId, ShardTblEntity.READSET_FULL); + } + }); + if (shardTbl == null) throw new XpipeRuntimeException("Shard: " + replId + " not found"); + ClusterTbl cluster = clusterService.find(shardTbl.getClusterId()); + return (ShardListModel) new ShardListModel().setShardName(shardTbl.getShardName()) + .setShardId(shardTbl.getId()) + .setActivedcId(cluster.getActivedcId()) + .setClusterType(cluster.getClusterType()) + .setClusterName(cluster.getClusterName()) + .setClusterAdminEmails(cluster.getClusterAdminEmails()) + .setClusterOrgName(cluster.getClusterOrgName()) + .setClusterDescription(cluster.getClusterDescription()); + } + private DcClusterShardTbl generateDcClusterShardTbl(ClusterTbl clusterTbl, DcClusterTbl dcClusterTbl, long shardId, Map sentinels) { DcClusterShardTbl dcClusterShardTbl = new DcClusterShardTbl(); diff --git a/redis/redis-console/src/main/resources/META-INF/dal/jdbc/meta-dal.xml b/redis/redis-console/src/main/resources/META-INF/dal/jdbc/meta-dal.xml index 1004b4855a..7718bcab73 100644 --- a/redis/redis-console/src/main/resources/META-INF/dal/jdbc/meta-dal.xml +++ b/redis/redis-console/src/main/resources/META-INF/dal/jdbc/meta-dal.xml @@ -651,6 +651,28 @@ ]]> + + + + + FROM + WHERE = ${shard-name} + AND = 0 + ]]> + + + + + + + FROM
+ WHERE = ${id} + AND = 0 + ]]> + + @@ -1057,6 +1079,14 @@ + + + + + + + + diff --git a/redis/redis-console/src/main/resources/static/dist/bundle.js b/redis/redis-console/src/main/resources/static/dist/bundle.js index 6be3de9f98..42750e69fa 100644 --- a/redis/redis-console/src/main/resources/static/dist/bundle.js +++ b/redis/redis-console/src/main/resources/static/dist/bundle.js @@ -9167,6 +9167,16 @@ eval("angular\n .module('index')\n .controller('IndexCtl', IndexCtl);\nInd /***/ }), +/***/ "./scripts/controllers/KeeperContainerKeeperOverAllCtl.ts": +/*!****************************************************************!*\ + !*** ./scripts/controllers/KeeperContainerKeeperOverAllCtl.ts ***! + \****************************************************************/ +/***/ (() => { + +eval("angular\n .module('index')\n .controller('KeeperContainerKeeperOverAllCtl', KeeperContainerKeeperOverAllCtl);\nfunction KeeperContainerKeeperOverAllCtl($rootScope, $scope, $window, $stateParams, KeeperContainerService, toastr, NgTableParams, $interval) {\n $scope.originData = [];\n $scope.tableParams = new NgTableParams({}, {});\n KeeperContainerService.getAllKeepers($stateParams.ip).then(function (response) {\n if (Array.isArray(response)) {\n $scope.originData = response;\n $scope.tableParams = new NgTableParams({\n page: 1,\n count: 10,\n }, {\n filterDelay: 100,\n counts: [10, 25, 50],\n dataset: $scope.originData\n });\n }\n });\n $scope.getIp = function () {\n return $stateParams.keepercontainerIp;\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/controllers/KeeperContainerKeeperOverAllCtl.ts?"); + +/***/ }), + /***/ "./scripts/controllers/KeeperContainerListCtl.ts": /*!*******************************************************!*\ !*** ./scripts/controllers/KeeperContainerListCtl.ts ***! @@ -9307,6 +9317,16 @@ eval("angular\n .module('index')\n .controller('RouteSwitchCtl', RouteSwit /***/ }), +/***/ "./scripts/controllers/SearchShardCtl.ts": +/*!***********************************************!*\ + !*** ./scripts/controllers/SearchShardCtl.ts ***! + \***********************************************/ +/***/ (() => { + +eval("angular\n .module('index')\n .controller('SearchShardCtl', SearchShardCtl);\nfunction SearchShardCtl($rootScope, $scope, $window, $stateParams, KeeperContainerService, toastr, NgTableParams, $interval, ShardService) {\n $scope.originData = [];\n $scope.tableParams = new NgTableParams({}, {});\n $scope.searchShard = function () {\n $scope.originData = [];\n $scope.tableParams = new NgTableParams({}, {});\n if ($scope.replId !== null && $scope.replId !== \"\" && $scope.replId !== undefined) {\n if (/^\\d+$/.test($scope.replId)) {\n ShardService.findAllByReplId($scope.replId).then(function (response) {\n if (response.state === 0) {\n $scope.originData = response.payload;\n $scope.tableParams = new NgTableParams({\n page: 1,\n count: 10,\n }, {\n filterDelay: 100,\n counts: [10, 25, 50],\n dataset: $scope.originData\n });\n }\n else {\n alert(response.message);\n }\n });\n }\n else {\n alert(\"请输入纯数字!\");\n }\n }\n if ($scope.shardName !== null && $scope.shardName !== \"\" && $scope.shardName !== undefined) {\n ShardService.findAllByShardName($scope.shardName).then(function (response) {\n if (response.state === 0) {\n response.payload.forEach(function (item) {\n if ($scope.originData.length === 0 || $scope.originData[0].shardId !== item.shardId) {\n $scope.originData.push(item);\n }\n });\n $scope.tableParams = new NgTableParams({\n page: 1,\n count: 10,\n }, {\n filterDelay: 100,\n counts: [10, 25, 50],\n dataset: $scope.originData\n });\n }\n else {\n alert(response.message);\n }\n });\n }\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/controllers/SearchShardCtl.ts?"); + +/***/ }), + /***/ "./scripts/controllers/ShardListCtl.ts": /*!*********************************************!*\ !*** ./scripts/controllers/ShardListCtl.ts ***! @@ -9373,7 +9393,7 @@ eval("/** 确认框 */\nangular\n .module('directive')\n .directive('xpip \***************************/ /***/ (() => { -eval("angular\n .module('index')\n .config(router)\n .config(['$locationProvider', function ($locationProvider) {\n $locationProvider.hashPrefix('');\n }]);\nfunction router($stateProvider, $urlRouterProvider) {\n $urlRouterProvider.otherwise(\"/cluster_list\");\n $stateProvider\n .state('cluster_shards', {\n url: '/cluster_shards?clusterName',\n templateUrl: 'views/index/cluster_shards.html',\n controller: 'ClusterShardCtl'\n })\n .state('cluster_dc_shards', {\n url: '/cluster_dc_shards/:clusterName/:currentDcName',\n params: {\n clusterName: {\n value: '',\n squash: false\n },\n currentDcName: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/cluster_dc_shards.html',\n controller: 'ClusterCtl'\n })\n .state('dc_list', {\n url: '/dc_list?dcName',\n templateUrl: 'views/index/dc_list.html',\n controller: 'DcListCtl'\n })\n .state('cluster_dc_proxy_chains', {\n url: '/chain/:clusterName/:currentDcName',\n params: {\n clusterName: {\n value: '',\n squash: false\n },\n currentDcName: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/cluster_proxy_chain.html',\n controller: 'ProxyChainCtl'\n })\n .state('proxy_tunnels', {\n url: '/proxy/:proxyIp/:dcId',\n params: {\n proxyIp: {\n value: '',\n squash: false\n },\n dcId: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/proxy_tunnel.html',\n controller: 'TunnelsCtl'\n })\n .state('proxy_pings', {\n url: '/proxy/pings',\n params: {},\n templateUrl: 'views/index/proxy_ping.html',\n controller: 'ProxyPingCtl'\n })\n .state('proxy_overview', {\n url: '/proxy/overview',\n params: {},\n templateUrl: 'views/index/proxy_list.html',\n controller: 'ProxyListCtl'\n })\n .state('route_overview', {\n url: '/route/overview?srcDcName&dstDcName',\n params: {},\n templateUrl: 'views/index/route_list.html',\n controller: 'RouteListCtl'\n })\n .state('route_form', {\n url: '/route_form?routeId&type',\n templateUrl: 'views/index/route_form.html',\n controller: 'RouteFormCtl'\n })\n .state('route_direction', {\n url: '/route_direction/route',\n templateUrl: 'views/index/route_direction.html',\n controller: 'RouteDirectionCtl'\n })\n .state('route_switch', {\n url: '/route_switch?tag&srcDcName&dstDcName',\n templateUrl: 'views/index/route_switch.html',\n controller: 'RouteSwitchCtl'\n })\n .state('cluster_routes', {\n url: '/cluster_routes?clusterName&dcName',\n templateUrl: 'views/index/cluster_routes.html',\n controller: 'ClusterRoutesCtl'\n })\n .state('cluster_designated_routes_update', {\n url: '/cluster_designated_routes_update?clusterName&srcDcName',\n templateUrl: 'views/index/cluster_designated_routes_update.html',\n controller: 'ClusterDesignatedRoutesUpdateCtl'\n })\n .state('cluster_dc_shard_update', {\n url: '/cluster_dc_shard_update?clusterName&shardName¤tDcName&srcDcName',\n templateUrl: 'views/index/cluster_dc_shard_update.html',\n controller: 'ClusterDcShardUpdateCtl'\n })\n .state('cluster_dc', {\n url: '/cluster_dc?clusterName',\n templateUrl: 'views/index/cluster_dc.html',\n controller: 'ClusterDcCtl'\n })\n .state('cluster_list', {\n url: '/cluster_list?clusterName&dcName&type&clusterType?keepercontainer',\n templateUrl: 'views/index/cluster_list.html',\n controller: 'ClusterListCtl'\n })\n .state('shard_list', {\n url: '/shard_list',\n templateUrl: 'views/index/shard_list.html',\n controller: 'ShardListCtl'\n })\n .state('cluster_form', {\n url: '/cluster_form?clusterName&type',\n templateUrl: 'views/index/cluster_form.html',\n controller: 'ClusterFromCtl'\n })\n .state('migration_index', {\n url: '/active_dc_migration?:clusterName',\n params: {\n clusters: {\n value: [],\n squash: false\n }\n },\n templateUrl: 'views/index/migration_index.html',\n controller: 'ActiveDcMigrationIndexCtl'\n })\n .state('migration_event_list', {\n url: '/migration_event_list?clusterName',\n templateUrl: 'views/index/migration_list.html',\n controller: 'ActiveDcMigrationEventListCtl'\n })\n .state('bi_migration', {\n url: '/bi_migration',\n templateUrl: 'views/index/bi_migration.html',\n controller: 'BiMigrationCtl'\n })\n .state('bi_migration_event_list', {\n url: '/bi_migration_event_list?clusterName',\n templateUrl: 'views/index/bi_migration_list.html',\n controller: 'BiMigrationEventListCtl'\n })\n .state('migration_event_details', {\n url: '/migration_event_details/:eventId',\n params: {\n eventId: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/migration_details.html',\n controller: 'ActiveDcMigrationEventDetailsCtl'\n })\n .state('migration_event_details.details', {\n url: '/details',\n params: {\n migrationCluster: {\n value: {},\n squash: false\n }\n },\n templateUrl: 'views/index/migration_details_content.html',\n controller: 'ActiveDcMigrationEventDetailsContentCtl'\n })\n .state('repl_direction_list', {\n url: '/repl_directions',\n templateUrl: 'views/index/repl_direction_list.html',\n controller: 'ReplDirectionListCtl',\n })\n .state('keepercontainer_list', {\n url: '/keepercontainers',\n templateUrl: 'views/index/keepercontainer_list.html',\n controller: 'KeeperContainerListCtl',\n })\n .state('keepercontainer_form', {\n url: '/keepercontainer_form?id&type',\n templateUrl: 'views/index/keepercontainer_form.html',\n controller: 'KeepercontainerFormCtl'\n })\n .state('keeper_migration', {\n url: '/keeper_migration?keepercontainer',\n templateUrl: 'views/index/keeper_migration.html',\n controller: 'KeeperMigrationCtl'\n })\n .state('keeper_overload', {\n url: '/keepercontainer_overload?type',\n templateUrl: 'views/index/keepercontainer_overload.html',\n controller: 'KeepercontainerOverloadCtl'\n })\n .state('keeper_usedinfo', {\n url: '/keepercontainer_usedinfo',\n templateUrl: 'views/index/keepercontainer_usedinfo.html',\n controller: 'KeepercontainerUsedInfoCtl'\n })\n .state('appliercontainer_list', {\n url: '/appliercontainers',\n templateUrl: 'views/index/appliercontainer_list.html',\n controller: 'AppliercontainerListCtl',\n })\n .state('appliercontainer_form', {\n url: '/appliercontainer_form?id&type',\n templateUrl: 'views/index/appliercontainer_form.html',\n controller: 'AppliercontainerFormCtl'\n })\n .state('keepercontainer_overall', {\n url: '/keepercontainer_overall?keepercontainerIp',\n templateUrl: 'views/index/keepercontainer_overall.html',\n controller: 'KeepercontainerOverallCtl'\n })\n .state('full_link_health_check', {\n url: '/full_link_health_check?currentDcName&clusterName&shardName&shardId',\n templateUrl: 'views/index/full_link_health_check.html',\n controller: 'FullLinkHealthCheckCtl'\n });\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/router.ts?"); +eval("angular\n .module('index')\n .config(router)\n .config(['$locationProvider', function ($locationProvider) {\n $locationProvider.hashPrefix('');\n }]);\nfunction router($stateProvider, $urlRouterProvider) {\n $urlRouterProvider.otherwise(\"/cluster_list\");\n $stateProvider\n .state('cluster_shards', {\n url: '/cluster_shards?clusterName',\n templateUrl: 'views/index/cluster_shards.html',\n controller: 'ClusterShardCtl'\n })\n .state('cluster_dc_shards', {\n url: '/cluster_dc_shards/:clusterName/:currentDcName',\n params: {\n clusterName: {\n value: '',\n squash: false\n },\n currentDcName: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/cluster_dc_shards.html',\n controller: 'ClusterCtl'\n })\n .state('dc_list', {\n url: '/dc_list?dcName',\n templateUrl: 'views/index/dc_list.html',\n controller: 'DcListCtl'\n })\n .state('cluster_dc_proxy_chains', {\n url: '/chain/:clusterName/:currentDcName',\n params: {\n clusterName: {\n value: '',\n squash: false\n },\n currentDcName: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/cluster_proxy_chain.html',\n controller: 'ProxyChainCtl'\n })\n .state('proxy_tunnels', {\n url: '/proxy/:proxyIp/:dcId',\n params: {\n proxyIp: {\n value: '',\n squash: false\n },\n dcId: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/proxy_tunnel.html',\n controller: 'TunnelsCtl'\n })\n .state('proxy_pings', {\n url: '/proxy/pings',\n params: {},\n templateUrl: 'views/index/proxy_ping.html',\n controller: 'ProxyPingCtl'\n })\n .state('proxy_overview', {\n url: '/proxy/overview',\n params: {},\n templateUrl: 'views/index/proxy_list.html',\n controller: 'ProxyListCtl'\n })\n .state('route_overview', {\n url: '/route/overview?srcDcName&dstDcName',\n params: {},\n templateUrl: 'views/index/route_list.html',\n controller: 'RouteListCtl'\n })\n .state('route_form', {\n url: '/route_form?routeId&type',\n templateUrl: 'views/index/route_form.html',\n controller: 'RouteFormCtl'\n })\n .state('route_direction', {\n url: '/route_direction/route',\n templateUrl: 'views/index/route_direction.html',\n controller: 'RouteDirectionCtl'\n })\n .state('route_switch', {\n url: '/route_switch?tag&srcDcName&dstDcName',\n templateUrl: 'views/index/route_switch.html',\n controller: 'RouteSwitchCtl'\n })\n .state('cluster_routes', {\n url: '/cluster_routes?clusterName&dcName',\n templateUrl: 'views/index/cluster_routes.html',\n controller: 'ClusterRoutesCtl'\n })\n .state('cluster_designated_routes_update', {\n url: '/cluster_designated_routes_update?clusterName&srcDcName',\n templateUrl: 'views/index/cluster_designated_routes_update.html',\n controller: 'ClusterDesignatedRoutesUpdateCtl'\n })\n .state('cluster_dc_shard_update', {\n url: '/cluster_dc_shard_update?clusterName&shardName¤tDcName&srcDcName',\n templateUrl: 'views/index/cluster_dc_shard_update.html',\n controller: 'ClusterDcShardUpdateCtl'\n })\n .state('cluster_dc', {\n url: '/cluster_dc?clusterName',\n templateUrl: 'views/index/cluster_dc.html',\n controller: 'ClusterDcCtl'\n })\n .state('cluster_list', {\n url: '/cluster_list?clusterName&dcName&type&clusterType?keepercontainer',\n templateUrl: 'views/index/cluster_list.html',\n controller: 'ClusterListCtl'\n })\n .state('shard_list', {\n url: '/shard_list',\n templateUrl: 'views/index/shard_list.html',\n controller: 'ShardListCtl'\n })\n .state('cluster_form', {\n url: '/cluster_form?clusterName&type',\n templateUrl: 'views/index/cluster_form.html',\n controller: 'ClusterFromCtl'\n })\n .state('migration_index', {\n url: '/active_dc_migration?:clusterName',\n params: {\n clusters: {\n value: [],\n squash: false\n }\n },\n templateUrl: 'views/index/migration_index.html',\n controller: 'ActiveDcMigrationIndexCtl'\n })\n .state('migration_event_list', {\n url: '/migration_event_list?clusterName',\n templateUrl: 'views/index/migration_list.html',\n controller: 'ActiveDcMigrationEventListCtl'\n })\n .state('bi_migration', {\n url: '/bi_migration',\n templateUrl: 'views/index/bi_migration.html',\n controller: 'BiMigrationCtl'\n })\n .state('bi_migration_event_list', {\n url: '/bi_migration_event_list?clusterName',\n templateUrl: 'views/index/bi_migration_list.html',\n controller: 'BiMigrationEventListCtl'\n })\n .state('migration_event_details', {\n url: '/migration_event_details/:eventId',\n params: {\n eventId: {\n value: '',\n squash: false\n }\n },\n templateUrl: 'views/index/migration_details.html',\n controller: 'ActiveDcMigrationEventDetailsCtl'\n })\n .state('migration_event_details.details', {\n url: '/details',\n params: {\n migrationCluster: {\n value: {},\n squash: false\n }\n },\n templateUrl: 'views/index/migration_details_content.html',\n controller: 'ActiveDcMigrationEventDetailsContentCtl'\n })\n .state('repl_direction_list', {\n url: '/repl_directions',\n templateUrl: 'views/index/repl_direction_list.html',\n controller: 'ReplDirectionListCtl',\n })\n .state('search_shard', {\n url: '/search_shard',\n templateUrl: 'views/index/search_shard.html',\n controller: 'SearchShardCtl',\n })\n .state('keepercontainer_list', {\n url: '/keepercontainers',\n templateUrl: 'views/index/keepercontainer_list.html',\n controller: 'KeeperContainerListCtl',\n })\n .state('keepercontainer_form', {\n url: '/keepercontainer_form?id&type',\n templateUrl: 'views/index/keepercontainer_form.html',\n controller: 'KeepercontainerFormCtl'\n })\n .state('keeper_migration', {\n url: '/keeper_migration?keepercontainer',\n templateUrl: 'views/index/keeper_migration.html',\n controller: 'KeeperMigrationCtl'\n })\n .state('keeper_overload', {\n url: '/keepercontainer_overload?type',\n templateUrl: 'views/index/keepercontainer_overload.html',\n controller: 'KeepercontainerOverloadCtl'\n })\n .state('keeper_usedinfo', {\n url: '/keepercontainer_usedinfo',\n templateUrl: 'views/index/keepercontainer_usedinfo.html',\n controller: 'KeepercontainerUsedInfoCtl'\n })\n .state('appliercontainer_list', {\n url: '/appliercontainers',\n templateUrl: 'views/index/appliercontainer_list.html',\n controller: 'AppliercontainerListCtl',\n })\n .state('appliercontainer_form', {\n url: '/appliercontainer_form?id&type',\n templateUrl: 'views/index/appliercontainer_form.html',\n controller: 'AppliercontainerFormCtl'\n })\n .state('keepercontainer_overall', {\n url: '/keepercontainer_overall?keepercontainerIp',\n templateUrl: 'views/index/keepercontainer_overall.html',\n controller: 'KeepercontainerOverallCtl'\n })\n .state('keepercontainer_keeper_overall', {\n url: '/keepercontainer_keeper_overall?ip',\n templateUrl: 'views/index/keepercontainer_keeper_overall.html',\n controller: 'KeeperContainerKeeperOverAllCtl'\n })\n .state('full_link_health_check', {\n url: '/full_link_health_check?currentDcName&clusterName&shardName&shardId',\n templateUrl: 'views/index/full_link_health_check.html',\n controller: 'FullLinkHealthCheckCtl'\n });\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/router.ts?"); /***/ }), @@ -9463,7 +9483,7 @@ eval("angular\n .module('services')\n .service('HealthCheckService', Healt \****************************************************/ /***/ (() => { -eval("angular\n .module('services')\n .service('KeeperContainerService', ['$resource', '$q', function ($resource, $q) {\n var resource = $resource('', {}, {\n find_availablekeepers_by_dc: {\n method: 'POST',\n url: '/console/dcs/:dcName/availablekeepers',\n isArray: true\n },\n find_active_kcs_by_dc_and_cluster: {\n method: 'GET',\n url: '/console/dcs/:dcName/cluster/:clusterName/activekeepercontainers',\n isArray: true\n },\n find_keepercontainer_by_id: {\n method: 'GET',\n url: '/console/keepercontainer/:id',\n },\n find_available_keepers_by_dc_az_and_org: {\n method: 'GET',\n url: '/console/keepercontainers/dc/:dcName/az/:azName/org/:orgName',\n isArray: true\n },\n get_all_infos: {\n method: 'GET',\n url: '/console/keepercontainer/infos/all',\n isArray: true\n },\n get_all_diskTypes: {\n method: 'GET',\n url: '/console/keepercontainer/diskType',\n isArray: true\n },\n get_all_organizations: {\n method: 'GET',\n url: '/console/organizations',\n isArray: true\n },\n add_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer'\n },\n update_keepercontainer: {\n method: 'PUT',\n url: '/console/keepercontainer'\n },\n get_all_overload_keepercontainer: {\n method: 'GET',\n url: '/console/keepercontainers/overload/all',\n isArray: true\n },\n get_all_overload_lasted_used_info: {\n method: 'GET',\n url: '/console/keepercontainer/overload/info/lasted',\n isArray: true\n },\n get_overload_keepercontainer_migration_process: {\n method: 'GET',\n url: '/console/keepercontainer/overload/migration/process',\n isArray: true\n },\n get_all_available_zone_info_models_by_dc: {\n method: 'GET',\n url: '/console/az/dcs/tbl/:dcId',\n isArray: true\n },\n begin_to_migrate_overload_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/begin'\n },\n migrate_keeper_task_terminate: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/terminate'\n },\n stop_to_migrate_overload_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/stop'\n },\n reset_election: {\n method: 'POST',\n url: '/api/keepers/election/reset/:ip/:port/:shardId'\n },\n release_rdb: {\n method: 'POST',\n url: '/api/keepers/release/rdb/:ip/:port/:shardId'\n }\n });\n function findActiveKeeperContainersByDc(dcName) {\n var d = $q.defer();\n resource.find_activekeepercontainers_by_dc({\n dcName: dcName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDc(dcName, shard) {\n var d = $q.defer();\n resource.find_availablekeepers_by_dc({\n dcName: dcName\n }, shard, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findKeepercontainerById(id) {\n var d = $q.defer();\n resource.find_keepercontainer_by_id({\n id: id\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDcAzAndOrg(dcName, azName, orgName) {\n var d = $q.defer();\n resource.find_available_keepers_by_dc_az_and_org({\n dcName: dcName,\n azName: azName,\n orgName: orgName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllAvailableZoneInfoModelsByDc(dcId) {\n var d = $q.defer();\n resource.get_all_available_zone_info_models_by_dc({\n dcId: dcId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDcAndCluster(dcName, clusterName) {\n var d = $q.defer();\n resource.find_active_kcs_by_dc_and_cluster({\n dcName: dcName,\n clusterName: clusterName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllInfos() {\n var d = $q.defer();\n resource.get_all_infos({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllOrganizations() {\n var d = $q.defer();\n resource.get_all_organizations({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllDiskTypes() {\n var d = $q.defer();\n resource.get_all_diskTypes({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function addKeepercontainer(addr, dcName, orgName, azName, active, diskType) {\n var d = $q.defer();\n resource.add_keepercontainer({}, {\n addr: addr,\n dcName: dcName,\n orgName: orgName,\n azName: azName,\n active: active,\n diskType: diskType\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function updateKeepercontainer(addr, dcName, orgName, azName, active, diskType) {\n var d = $q.defer();\n resource.update_keepercontainer({}, {\n addr: addr,\n dcName: dcName,\n orgName: orgName,\n azName: azName,\n active: active,\n diskType: diskType\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllOverloadKeepercontainer() {\n var d = $q.defer();\n resource.get_all_overload_keepercontainer({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllKeepercontainerUsedInfo() {\n var d = $q.defer();\n resource.get_all_overload_lasted_used_info({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getOverloadKeeperContainerMigrationProcess() {\n var d = $q.defer();\n resource.get_overload_keepercontainer_migration_process({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function beginToMigrateOverloadKeeperContainers() {\n var d = $q.defer();\n resource.begin_to_migrate_overload_keepercontainer(Array.from(arguments), function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function migrateKeeperTaskTerminate() {\n var d = $q.defer();\n resource.migrate_keeper_task_terminate({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function resetElection(ip, port, shardId) {\n var d = $q.defer();\n resource.reset_election({\n ip: ip,\n port: port,\n shardId: shardId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function releaseRdb(ip, port, shardId) {\n var d = $q.defer();\n resource.release_rdb({\n ip: ip,\n port: port,\n shardId: shardId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n return {\n findAvailableKeepersByDc: findAvailableKeepersByDc,\n findAvailableKeepersByDcAndCluster: findAvailableKeepersByDcAndCluster,\n findKeepercontainerById: findKeepercontainerById,\n getAllAvailableZoneInfoModelsByDc: getAllAvailableZoneInfoModelsByDc,\n findAvailableKeepersByDcAzAndOrg: findAvailableKeepersByDcAzAndOrg,\n getAllInfos: getAllInfos,\n getAllOrganizations: getAllOrganizations,\n getAllDiskTypes: getAllDiskTypes,\n addKeepercontainer: addKeepercontainer,\n updateKeepercontainer: updateKeepercontainer,\n getAllOverloadKeepercontainer: getAllOverloadKeepercontainer,\n getAllKeepercontainerUsedInfo: getAllKeepercontainerUsedInfo,\n getOverloadKeeperContainerMigrationProcess: getOverloadKeeperContainerMigrationProcess,\n beginToMigrateOverloadKeeperContainers: beginToMigrateOverloadKeeperContainers,\n migrateKeeperTaskTerminate: migrateKeeperTaskTerminate,\n resetElection: resetElection,\n releaseRdb: releaseRdb\n };\n }]);\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/services/KeeperContainerService.ts?"); +eval("angular\n .module('services')\n .service('KeeperContainerService', ['$resource', '$q', function ($resource, $q) {\n var resource = $resource('', {}, {\n find_availablekeepers_by_dc: {\n method: 'POST',\n url: '/console/dcs/:dcName/availablekeepers',\n isArray: true\n },\n find_active_kcs_by_dc_and_cluster: {\n method: 'GET',\n url: '/console/dcs/:dcName/cluster/:clusterName/activekeepercontainers',\n isArray: true\n },\n find_keepercontainer_by_id: {\n method: 'GET',\n url: '/console/keepercontainer/:id',\n },\n find_available_keepers_by_dc_az_and_org: {\n method: 'GET',\n url: '/console/keepercontainers/dc/:dcName/az/:azName/org/:orgName',\n isArray: true\n },\n get_all_infos: {\n method: 'GET',\n url: '/console/keepercontainer/infos/all',\n isArray: true\n },\n get_all_diskTypes: {\n method: 'GET',\n url: '/console/keepercontainer/diskType',\n isArray: true\n },\n get_all_organizations: {\n method: 'GET',\n url: '/console/organizations',\n isArray: true\n },\n add_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer'\n },\n update_keepercontainer: {\n method: 'PUT',\n url: '/console/keepercontainer'\n },\n get_all_overload_keepercontainer: {\n method: 'GET',\n url: '/console/keepercontainers/overload/all',\n isArray: true\n },\n get_all_overload_lasted_used_info: {\n method: 'GET',\n url: '/console/keepercontainer/overload/info/lasted',\n isArray: true\n },\n get_all_keepers: {\n method: 'GET',\n url: '/console/keepercontainer/keepers/:ip',\n isArray: true\n },\n get_overload_keepercontainer_migration_process: {\n method: 'GET',\n url: '/console/keepercontainer/overload/migration/process',\n isArray: true\n },\n get_all_available_zone_info_models_by_dc: {\n method: 'GET',\n url: '/console/az/dcs/tbl/:dcId',\n isArray: true\n },\n begin_to_migrate_overload_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/begin'\n },\n migrate_keeper_task_terminate: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/terminate'\n },\n stop_to_migrate_overload_keepercontainer: {\n method: 'POST',\n url: '/console/keepercontainer/overload/migration/stop'\n },\n reset_election: {\n method: 'POST',\n url: '/api/keepers/election/reset/:ip/:port/:shardId'\n },\n release_rdb: {\n method: 'POST',\n url: '/api/keepers/release/rdb/:ip/:port/:shardId'\n }\n });\n function findActiveKeeperContainersByDc(dcName) {\n var d = $q.defer();\n resource.find_activekeepercontainers_by_dc({\n dcName: dcName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDc(dcName, shard) {\n var d = $q.defer();\n resource.find_availablekeepers_by_dc({\n dcName: dcName\n }, shard, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findKeepercontainerById(id) {\n var d = $q.defer();\n resource.find_keepercontainer_by_id({\n id: id\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDcAzAndOrg(dcName, azName, orgName) {\n var d = $q.defer();\n resource.find_available_keepers_by_dc_az_and_org({\n dcName: dcName,\n azName: azName,\n orgName: orgName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllAvailableZoneInfoModelsByDc(dcId) {\n var d = $q.defer();\n resource.get_all_available_zone_info_models_by_dc({\n dcId: dcId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAvailableKeepersByDcAndCluster(dcName, clusterName) {\n var d = $q.defer();\n resource.find_active_kcs_by_dc_and_cluster({\n dcName: dcName,\n clusterName: clusterName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllInfos() {\n var d = $q.defer();\n resource.get_all_infos({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllOrganizations() {\n var d = $q.defer();\n resource.get_all_organizations({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllDiskTypes() {\n var d = $q.defer();\n resource.get_all_diskTypes({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function addKeepercontainer(addr, dcName, orgName, azName, active, diskType) {\n var d = $q.defer();\n resource.add_keepercontainer({}, {\n addr: addr,\n dcName: dcName,\n orgName: orgName,\n azName: azName,\n active: active,\n diskType: diskType\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function updateKeepercontainer(addr, dcName, orgName, azName, active, diskType) {\n var d = $q.defer();\n resource.update_keepercontainer({}, {\n addr: addr,\n dcName: dcName,\n orgName: orgName,\n azName: azName,\n active: active,\n diskType: diskType\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllOverloadKeepercontainer() {\n var d = $q.defer();\n resource.get_all_overload_keepercontainer({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllKeepercontainerUsedInfo() {\n var d = $q.defer();\n resource.get_all_overload_lasted_used_info({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getAllKeepers(ip) {\n var d = $q.defer();\n resource.get_all_keepers({\n ip: ip\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function getOverloadKeeperContainerMigrationProcess() {\n var d = $q.defer();\n resource.get_overload_keepercontainer_migration_process({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function beginToMigrateOverloadKeeperContainers() {\n var d = $q.defer();\n resource.begin_to_migrate_overload_keepercontainer(Array.from(arguments), function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function migrateKeeperTaskTerminate() {\n var d = $q.defer();\n resource.migrate_keeper_task_terminate({}, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function resetElection(ip, port, shardId) {\n var d = $q.defer();\n resource.reset_election({\n ip: ip,\n port: port,\n shardId: shardId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function releaseRdb(ip, port, shardId) {\n var d = $q.defer();\n resource.release_rdb({\n ip: ip,\n port: port,\n shardId: shardId\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n return {\n findAvailableKeepersByDc: findAvailableKeepersByDc,\n findAvailableKeepersByDcAndCluster: findAvailableKeepersByDcAndCluster,\n findKeepercontainerById: findKeepercontainerById,\n getAllAvailableZoneInfoModelsByDc: getAllAvailableZoneInfoModelsByDc,\n findAvailableKeepersByDcAzAndOrg: findAvailableKeepersByDcAzAndOrg,\n getAllInfos: getAllInfos,\n getAllOrganizations: getAllOrganizations,\n getAllDiskTypes: getAllDiskTypes,\n addKeepercontainer: addKeepercontainer,\n updateKeepercontainer: updateKeepercontainer,\n getAllOverloadKeepercontainer: getAllOverloadKeepercontainer,\n getAllKeepercontainerUsedInfo: getAllKeepercontainerUsedInfo,\n getAllKeepers: getAllKeepers,\n getOverloadKeeperContainerMigrationProcess: getOverloadKeeperContainerMigrationProcess,\n beginToMigrateOverloadKeeperContainers: beginToMigrateOverloadKeeperContainers,\n migrateKeeperTaskTerminate: migrateKeeperTaskTerminate,\n resetElection: resetElection,\n releaseRdb: releaseRdb\n };\n }]);\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/services/KeeperContainerService.ts?"); /***/ }), @@ -9543,7 +9563,7 @@ eval("angular\n .module('services')\n .service('SentinelService', Sentinel \******************************************/ /***/ (() => { -eval("angular\n .module('services')\n .service('ShardService', ShardService);\nShardService.$inject = ['$resource', '$q'];\nfunction ShardService($resource, $q) {\n var resource = $resource('', {}, {\n find_cluster_dc_shards: {\n method: 'GET',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards',\n isArray: true\n },\n find_cluster_dc_shard: {\n method: 'GET',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName'\n },\n find_cluster_dc_source_shard: {\n method: 'GET',\n url: '/console/clusters/:clusterName/src-dc/:srcDcName/to-dc/:toDcName/shards/:shardName'\n },\n find_cluster_shards: {\n method: 'GET',\n url: '/console/clusters/:clusterName/shards',\n isArray: true\n },\n createShard: {\n method: 'POST',\n url: '/console/clusters/:clusterName/shards'\n },\n delete_shard: {\n method: 'DELETE',\n url: '/console/clusters/:clusterName/shards/:shardName'\n },\n bind_redis: {\n method: 'POST',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises'\n },\n unbind_redis: {\n method: 'DELETE',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises/:redisName'\n },\n update_redis: {\n method: 'PUT',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises/:redisName'\n }\n });\n function findClusterDcShards(clusterName, dcName) {\n var d = $q.defer();\n resource.find_cluster_dc_shards({\n clusterName: clusterName,\n dcName: dcName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterDcShard(clusterName, dcName, shardName) {\n var d = $q.defer();\n resource.find_cluster_dc_shard({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterDcSourceShard(clusterName, srcDcName, toDcName, shardName) {\n var d = $q.defer();\n resource.find_cluster_dc_source_shard({\n clusterName: clusterName,\n srcDcName: srcDcName,\n toDcName: toDcName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterShards(clusterName) {\n var d = $q.defer();\n resource.find_cluster_shards({\n clusterName: clusterName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function create_shard(clusterName, shard) {\n var d = $q.defer();\n resource.createShard({\n clusterName: clusterName\n }, shard, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function delete_shard(clusterName, shardName) {\n var d = $q.defer();\n resource.delete_shard({\n clusterName: clusterName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function bind_redis(clusterName, dcName, shardName, redis) {\n var d = $q.defer();\n resource.bind_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName\n }, redis, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function unbind_redis(clusterName, dcName, shardName, redisName) {\n var d = $q.defer();\n resource.unbind_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName,\n redisName: redisName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function update_redis(clusterName, dcName, shardName, redisName, redis) {\n var d = $q.defer();\n resource.update_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName,\n redisName: redisName\n }, redis, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n return {\n findClusterDcShards: findClusterDcShards,\n findClusterDcShard: findClusterDcShard,\n findClusterDcSourceShard: findClusterDcSourceShard,\n findClusterShards: findClusterShards,\n createShard: create_shard,\n deleteShard: delete_shard,\n bindRedis: bind_redis,\n unbindRedis: unbind_redis,\n updateRedis: update_redis\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/services/ShardService.ts?"); +eval("angular\n .module('services')\n .service('ShardService', ShardService);\nShardService.$inject = ['$resource', '$q'];\nfunction ShardService($resource, $q) {\n var resource = $resource('', {}, {\n find_cluster_dc_shards: {\n method: 'GET',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards',\n isArray: true\n },\n find_cluster_dc_shard: {\n method: 'GET',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName'\n },\n find_cluster_dc_source_shard: {\n method: 'GET',\n url: '/console/clusters/:clusterName/src-dc/:srcDcName/to-dc/:toDcName/shards/:shardName'\n },\n find_cluster_shards: {\n method: 'GET',\n url: '/console/clusters/:clusterName/shards',\n isArray: true\n },\n find_all_by_repl_id: {\n method: 'GET',\n url: '/console/shards/allById/:id',\n },\n find_all_by_shard_name: {\n method: 'GET',\n url: '/console/shards/allByName/:shardName',\n },\n createShard: {\n method: 'POST',\n url: '/console/clusters/:clusterName/shards'\n },\n delete_shard: {\n method: 'DELETE',\n url: '/console/clusters/:clusterName/shards/:shardName'\n },\n bind_redis: {\n method: 'POST',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises'\n },\n unbind_redis: {\n method: 'DELETE',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises/:redisName'\n },\n update_redis: {\n method: 'PUT',\n url: '/console/clusters/:clusterName/dcs/:dcName/shards/:shardName/redises/:redisName'\n }\n });\n function findClusterDcShards(clusterName, dcName) {\n var d = $q.defer();\n resource.find_cluster_dc_shards({\n clusterName: clusterName,\n dcName: dcName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterDcShard(clusterName, dcName, shardName) {\n var d = $q.defer();\n resource.find_cluster_dc_shard({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterDcSourceShard(clusterName, srcDcName, toDcName, shardName) {\n var d = $q.defer();\n resource.find_cluster_dc_source_shard({\n clusterName: clusterName,\n srcDcName: srcDcName,\n toDcName: toDcName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findClusterShards(clusterName) {\n var d = $q.defer();\n resource.find_cluster_shards({\n clusterName: clusterName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAllByReplId(id) {\n var d = $q.defer();\n resource.find_all_by_repl_id({\n id: id\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function findAllByShardName(shardName) {\n var d = $q.defer();\n resource.find_all_by_shard_name({\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function create_shard(clusterName, shard) {\n var d = $q.defer();\n resource.createShard({\n clusterName: clusterName\n }, shard, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function delete_shard(clusterName, shardName) {\n var d = $q.defer();\n resource.delete_shard({\n clusterName: clusterName,\n shardName: shardName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function bind_redis(clusterName, dcName, shardName, redis) {\n var d = $q.defer();\n resource.bind_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName\n }, redis, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function unbind_redis(clusterName, dcName, shardName, redisName) {\n var d = $q.defer();\n resource.unbind_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName,\n redisName: redisName\n }, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n function update_redis(clusterName, dcName, shardName, redisName, redis) {\n var d = $q.defer();\n resource.update_redis({\n clusterName: clusterName,\n dcName: dcName,\n shardName: shardName,\n redisName: redisName\n }, redis, function (result) {\n d.resolve(result);\n }, function (result) {\n d.reject(result);\n });\n return d.promise;\n }\n return {\n findClusterDcShards: findClusterDcShards,\n findClusterDcShard: findClusterDcShard,\n findClusterDcSourceShard: findClusterDcSourceShard,\n findClusterShards: findClusterShards,\n findAllByReplId: findAllByReplId,\n findAllByShardName: findAllByShardName,\n createShard: create_shard,\n deleteShard: delete_shard,\n bindRedis: bind_redis,\n unbindRedis: unbind_redis,\n updateRedis: update_redis\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/services/ShardService.ts?"); /***/ }), @@ -9604,7 +9624,7 @@ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n* @ \******************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { -eval("var map = {\n\t\"./ActiveDcMigrationEventDetailsContentCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventDetailsContentCtl.ts\",\n\t\"./ActiveDcMigrationEventDetailsCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventDetailsCtl.ts\",\n\t\"./ActiveDcMigrationEventListCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventListCtl.ts\",\n\t\"./ActiveDcMigrationIndexCtl.ts\": \"./scripts/controllers/ActiveDcMigrationIndexCtl.ts\",\n\t\"./AppliercontainerFormCtl.ts\": \"./scripts/controllers/AppliercontainerFormCtl.ts\",\n\t\"./AppliercontainerListCtl.ts\": \"./scripts/controllers/AppliercontainerListCtl.ts\",\n\t\"./BiMigrationCtl.ts\": \"./scripts/controllers/BiMigrationCtl.ts\",\n\t\"./BiMigrationEventListCtl.ts\": \"./scripts/controllers/BiMigrationEventListCtl.ts\",\n\t\"./ClusterDcCtl.ts\": \"./scripts/controllers/ClusterDcCtl.ts\",\n\t\"./ClusterDcShardCtl.ts\": \"./scripts/controllers/ClusterDcShardCtl.ts\",\n\t\"./ClusterDcShardUpdateCtl.ts\": \"./scripts/controllers/ClusterDcShardUpdateCtl.ts\",\n\t\"./ClusterDesignatedRoutesUpdateCtl.ts\": \"./scripts/controllers/ClusterDesignatedRoutesUpdateCtl.ts\",\n\t\"./ClusterFormCtl.ts\": \"./scripts/controllers/ClusterFormCtl.ts\",\n\t\"./ClusterListCtl.ts\": \"./scripts/controllers/ClusterListCtl.ts\",\n\t\"./ClusterRoutesCtl.ts\": \"./scripts/controllers/ClusterRoutesCtl.ts\",\n\t\"./ClusterShardsCtl.ts\": \"./scripts/controllers/ClusterShardsCtl.ts\",\n\t\"./DcListCtl.ts\": \"./scripts/controllers/DcListCtl.ts\",\n\t\"./FullLinkHealthCheckCtl.ts\": \"./scripts/controllers/FullLinkHealthCheckCtl.ts\",\n\t\"./IndexCtl.ts\": \"./scripts/controllers/IndexCtl.ts\",\n\t\"./KeeperContainerListCtl.ts\": \"./scripts/controllers/KeeperContainerListCtl.ts\",\n\t\"./KeeperMigrationCtl.ts\": \"./scripts/controllers/KeeperMigrationCtl.ts\",\n\t\"./KeepercontainerFormCtl.ts\": \"./scripts/controllers/KeepercontainerFormCtl.ts\",\n\t\"./KeepercontainerOverallCtl.ts\": \"./scripts/controllers/KeepercontainerOverallCtl.ts\",\n\t\"./KeepercontainerOverloadCtl.ts\": \"./scripts/controllers/KeepercontainerOverloadCtl.ts\",\n\t\"./KeepercontainerUsedInfoCtl.ts\": \"./scripts/controllers/KeepercontainerUsedInfoCtl.ts\",\n\t\"./ProxyChainCtl.ts\": \"./scripts/controllers/ProxyChainCtl.ts\",\n\t\"./ProxyListCtl.ts\": \"./scripts/controllers/ProxyListCtl.ts\",\n\t\"./ProxyPingCtl.ts\": \"./scripts/controllers/ProxyPingCtl.ts\",\n\t\"./ReplDirectionListCtl.ts\": \"./scripts/controllers/ReplDirectionListCtl.ts\",\n\t\"./RouteDirectionCtl.ts\": \"./scripts/controllers/RouteDirectionCtl.ts\",\n\t\"./RouteFormCtl.ts\": \"./scripts/controllers/RouteFormCtl.ts\",\n\t\"./RouteListCtl.ts\": \"./scripts/controllers/RouteListCtl.ts\",\n\t\"./RouteSwitchCtl.ts\": \"./scripts/controllers/RouteSwitchCtl.ts\",\n\t\"./ShardListCtl.ts\": \"./scripts/controllers/ShardListCtl.ts\",\n\t\"./TunnelsCtl.ts\": \"./scripts/controllers/TunnelsCtl.ts\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./scripts/controllers sync \\\\.ts$\";\n\n//# sourceURL=webpack://XPipe-Console/./scripts/controllers/_sync_nonrecursive_\\.ts$?"); +eval("var map = {\n\t\"./ActiveDcMigrationEventDetailsContentCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventDetailsContentCtl.ts\",\n\t\"./ActiveDcMigrationEventDetailsCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventDetailsCtl.ts\",\n\t\"./ActiveDcMigrationEventListCtl.ts\": \"./scripts/controllers/ActiveDcMigrationEventListCtl.ts\",\n\t\"./ActiveDcMigrationIndexCtl.ts\": \"./scripts/controllers/ActiveDcMigrationIndexCtl.ts\",\n\t\"./AppliercontainerFormCtl.ts\": \"./scripts/controllers/AppliercontainerFormCtl.ts\",\n\t\"./AppliercontainerListCtl.ts\": \"./scripts/controllers/AppliercontainerListCtl.ts\",\n\t\"./BiMigrationCtl.ts\": \"./scripts/controllers/BiMigrationCtl.ts\",\n\t\"./BiMigrationEventListCtl.ts\": \"./scripts/controllers/BiMigrationEventListCtl.ts\",\n\t\"./ClusterDcCtl.ts\": \"./scripts/controllers/ClusterDcCtl.ts\",\n\t\"./ClusterDcShardCtl.ts\": \"./scripts/controllers/ClusterDcShardCtl.ts\",\n\t\"./ClusterDcShardUpdateCtl.ts\": \"./scripts/controllers/ClusterDcShardUpdateCtl.ts\",\n\t\"./ClusterDesignatedRoutesUpdateCtl.ts\": \"./scripts/controllers/ClusterDesignatedRoutesUpdateCtl.ts\",\n\t\"./ClusterFormCtl.ts\": \"./scripts/controllers/ClusterFormCtl.ts\",\n\t\"./ClusterListCtl.ts\": \"./scripts/controllers/ClusterListCtl.ts\",\n\t\"./ClusterRoutesCtl.ts\": \"./scripts/controllers/ClusterRoutesCtl.ts\",\n\t\"./ClusterShardsCtl.ts\": \"./scripts/controllers/ClusterShardsCtl.ts\",\n\t\"./DcListCtl.ts\": \"./scripts/controllers/DcListCtl.ts\",\n\t\"./FullLinkHealthCheckCtl.ts\": \"./scripts/controllers/FullLinkHealthCheckCtl.ts\",\n\t\"./IndexCtl.ts\": \"./scripts/controllers/IndexCtl.ts\",\n\t\"./KeeperContainerKeeperOverAllCtl.ts\": \"./scripts/controllers/KeeperContainerKeeperOverAllCtl.ts\",\n\t\"./KeeperContainerListCtl.ts\": \"./scripts/controllers/KeeperContainerListCtl.ts\",\n\t\"./KeeperMigrationCtl.ts\": \"./scripts/controllers/KeeperMigrationCtl.ts\",\n\t\"./KeepercontainerFormCtl.ts\": \"./scripts/controllers/KeepercontainerFormCtl.ts\",\n\t\"./KeepercontainerOverallCtl.ts\": \"./scripts/controllers/KeepercontainerOverallCtl.ts\",\n\t\"./KeepercontainerOverloadCtl.ts\": \"./scripts/controllers/KeepercontainerOverloadCtl.ts\",\n\t\"./KeepercontainerUsedInfoCtl.ts\": \"./scripts/controllers/KeepercontainerUsedInfoCtl.ts\",\n\t\"./ProxyChainCtl.ts\": \"./scripts/controllers/ProxyChainCtl.ts\",\n\t\"./ProxyListCtl.ts\": \"./scripts/controllers/ProxyListCtl.ts\",\n\t\"./ProxyPingCtl.ts\": \"./scripts/controllers/ProxyPingCtl.ts\",\n\t\"./ReplDirectionListCtl.ts\": \"./scripts/controllers/ReplDirectionListCtl.ts\",\n\t\"./RouteDirectionCtl.ts\": \"./scripts/controllers/RouteDirectionCtl.ts\",\n\t\"./RouteFormCtl.ts\": \"./scripts/controllers/RouteFormCtl.ts\",\n\t\"./RouteListCtl.ts\": \"./scripts/controllers/RouteListCtl.ts\",\n\t\"./RouteSwitchCtl.ts\": \"./scripts/controllers/RouteSwitchCtl.ts\",\n\t\"./SearchShardCtl.ts\": \"./scripts/controllers/SearchShardCtl.ts\",\n\t\"./ShardListCtl.ts\": \"./scripts/controllers/ShardListCtl.ts\",\n\t\"./TunnelsCtl.ts\": \"./scripts/controllers/TunnelsCtl.ts\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./scripts/controllers sync \\\\.ts$\";\n\n//# sourceURL=webpack://XPipe-Console/./scripts/controllers/_sync_nonrecursive_\\.ts$?"); /***/ }), diff --git a/redis/redis-console/src/main/resources/static/index.html b/redis/redis-console/src/main/resources/static/index.html index ed7a93a826..9183133380 100644 --- a/redis/redis-console/src/main/resources/static/index.html +++ b/redis/redis-console/src/main/resources/static/index.html @@ -76,6 +76,11 @@ Cluster列表 +
  • + + Shard查询 + +
  • 问题Shard列表 diff --git a/redis/redis-console/src/main/resources/static/scripts/controllers/KeeperContainerKeeperOverAllCtl.ts b/redis/redis-console/src/main/resources/static/scripts/controllers/KeeperContainerKeeperOverAllCtl.ts new file mode 100644 index 0000000000..3980023e0d --- /dev/null +++ b/redis/redis-console/src/main/resources/static/scripts/controllers/KeeperContainerKeeperOverAllCtl.ts @@ -0,0 +1,28 @@ +angular + .module('index') + .controller('KeeperContainerKeeperOverAllCtl', KeeperContainerKeeperOverAllCtl); + +function KeeperContainerKeeperOverAllCtl($rootScope, $scope, $window, $stateParams, KeeperContainerService, + toastr, NgTableParams, $interval) { + $scope.originData = [] + + $scope.tableParams = new NgTableParams({}, {}); + KeeperContainerService.getAllKeepers($stateParams.ip).then(function (response) { + if (Array.isArray(response)) { + $scope.originData = response + $scope.tableParams = new NgTableParams({ + page : 1, + count : 10, + }, { + filterDelay: 100, + counts: [10, 25, 50], + dataset: $scope.originData + }); + } + }) + + $scope.getIp = function () { + return $stateParams.keepercontainerIp; + } + +} \ No newline at end of file diff --git a/redis/redis-console/src/main/resources/static/scripts/controllers/SearchShardCtl.ts b/redis/redis-console/src/main/resources/static/scripts/controllers/SearchShardCtl.ts new file mode 100644 index 0000000000..921d001f37 --- /dev/null +++ b/redis/redis-console/src/main/resources/static/scripts/controllers/SearchShardCtl.ts @@ -0,0 +1,60 @@ +angular + .module('index') + .controller('SearchShardCtl', SearchShardCtl); + +function SearchShardCtl($rootScope, $scope, $window, $stateParams, KeeperContainerService, + toastr, NgTableParams, $interval, ShardService) { + + $scope.originData = [] + + $scope.tableParams = new NgTableParams({}, {}); + + $scope.searchShard = function () { + $scope.originData = [] + $scope.tableParams = new NgTableParams({}, {}); + if ($scope.replId !== null && $scope.replId !== "" && $scope.replId !== undefined) { + if (/^\d+$/.test($scope.replId)) { + ShardService.findAllByReplId($scope.replId).then(function (response) { + if (response.state === 0) { + $scope.originData = response.payload + $scope.tableParams = new NgTableParams({ + page : 1, + count : 10, + }, { + filterDelay: 100, + counts: [10, 25, 50], + dataset: $scope.originData + }); + } else { + alert(response.message); + } + }) + } else { + alert("请输入纯数字!"); + } + } + + if ($scope.shardName !== null && $scope.shardName !== "" && $scope.shardName !== undefined) { + ShardService.findAllByShardName($scope.shardName).then(function (response) { + if (response.state === 0) { + response.payload.forEach(item => { + if ($scope.originData.length === 0 || $scope.originData[0].shardId !== item.shardId) { + $scope.originData.push(item); + } + }) + $scope.tableParams = new NgTableParams({ + page : 1, + count : 10, + }, { + filterDelay: 100, + counts: [10, 25, 50], + dataset: $scope.originData + }); + } else { + alert(response.message); + } + }) + } + } + +} \ No newline at end of file diff --git a/redis/redis-console/src/main/resources/static/scripts/router.ts b/redis/redis-console/src/main/resources/static/scripts/router.ts index 19d397c2f5..45e0019a0e 100644 --- a/redis/redis-console/src/main/resources/static/scripts/router.ts +++ b/redis/redis-console/src/main/resources/static/scripts/router.ts @@ -194,6 +194,11 @@ function router($stateProvider, $urlRouterProvider) { templateUrl: 'views/index/repl_direction_list.html', controller : 'ReplDirectionListCtl', }) + .state('search_shard', { + url: '/search_shard', + templateUrl: 'views/index/search_shard.html', + controller : 'SearchShardCtl', + }) .state('keepercontainer_list', { url: '/keepercontainers', templateUrl: 'views/index/keepercontainer_list.html', @@ -234,6 +239,11 @@ function router($stateProvider, $urlRouterProvider) { templateUrl: 'views/index/keepercontainer_overall.html', controller: 'KeepercontainerOverallCtl' }) + .state('keepercontainer_keeper_overall',{ + url: '/keepercontainer_keeper_overall?ip', + templateUrl: 'views/index/keepercontainer_keeper_overall.html', + controller: 'KeeperContainerKeeperOverAllCtl' + }) .state('full_link_health_check',{ url: '/full_link_health_check?currentDcName&clusterName&shardName&shardId', templateUrl: 'views/index/full_link_health_check.html', diff --git a/redis/redis-console/src/main/resources/static/scripts/services/KeeperContainerService.ts b/redis/redis-console/src/main/resources/static/scripts/services/KeeperContainerService.ts index 1e14554b18..406e85c304 100644 --- a/redis/redis-console/src/main/resources/static/scripts/services/KeeperContainerService.ts +++ b/redis/redis-console/src/main/resources/static/scripts/services/KeeperContainerService.ts @@ -55,6 +55,11 @@ angular url: '/console/keepercontainer/overload/info/lasted', isArray: true }, + get_all_keepers: { + method: 'GET', + url: '/console/keepercontainer/keepers/:ip', + isArray: true + }, get_overload_keepercontainer_migration_process: { method: 'GET', url: '/console/keepercontainer/overload/migration/process', @@ -259,6 +264,19 @@ angular return d.promise; } + function getAllKeepers(ip) { + var d = $q.defer(); + resource.get_all_keepers({ + ip:ip + }, + function (result) { + d.resolve(result); + }, function (result) { + d.reject(result); + }); + return d.promise; + } + function getOverloadKeeperContainerMigrationProcess() { var d = $q.defer(); resource.get_overload_keepercontainer_migration_process({}, @@ -336,6 +354,7 @@ angular updateKeepercontainer: updateKeepercontainer, getAllOverloadKeepercontainer : getAllOverloadKeepercontainer, getAllKeepercontainerUsedInfo : getAllKeepercontainerUsedInfo, + getAllKeepers:getAllKeepers, getOverloadKeeperContainerMigrationProcess : getOverloadKeeperContainerMigrationProcess, beginToMigrateOverloadKeeperContainers : beginToMigrateOverloadKeeperContainers, migrateKeeperTaskTerminate : migrateKeeperTaskTerminate, diff --git a/redis/redis-console/src/main/resources/static/scripts/services/ShardService.ts b/redis/redis-console/src/main/resources/static/scripts/services/ShardService.ts index 29a324ca76..5a5d40df20 100644 --- a/redis/redis-console/src/main/resources/static/scripts/services/ShardService.ts +++ b/redis/redis-console/src/main/resources/static/scripts/services/ShardService.ts @@ -24,6 +24,14 @@ function ShardService($resource, $q) { url: '/console/clusters/:clusterName/shards', isArray: true }, + find_all_by_repl_id: { + method: 'GET', + url: '/console/shards/allById/:id', + }, + find_all_by_shard_name: { + method: 'GET', + url: '/console/shards/allByName/:shardName', + }, createShard: { method: 'POST', url: '/console/clusters/:clusterName/shards' @@ -104,6 +112,32 @@ function ShardService($resource, $q) { return d.promise; } + function findAllByReplId(id) { + var d = $q.defer(); + resource.find_all_by_repl_id({ + id: id + }, + function (result) { + d.resolve(result); + }, function (result) { + d.reject(result); + }); + return d.promise; + } + + function findAllByShardName(shardName) { + var d = $q.defer(); + resource.find_all_by_shard_name({ + shardName: shardName + }, + function (result) { + d.resolve(result); + }, function (result) { + d.reject(result); + }); + return d.promise; + } + function create_shard(clusterName,shard) { var d = $q.defer(); resource.createShard({ @@ -184,6 +218,8 @@ function ShardService($resource, $q) { findClusterDcShard: findClusterDcShard, findClusterDcSourceShard: findClusterDcSourceShard, findClusterShards: findClusterShards, + findAllByReplId: findAllByReplId, + findAllByShardName: findAllByShardName, createShard: create_shard, deleteShard: delete_shard, bindRedis: bind_redis, diff --git a/redis/redis-console/src/main/resources/static/views/index/keepercontainer_keeper_overall.html b/redis/redis-console/src/main/resources/static/views/index/keepercontainer_keeper_overall.html new file mode 100644 index 0000000000..298627e4c9 --- /dev/null +++ b/redis/redis-console/src/main/resources/static/views/index/keepercontainer_keeper_overall.html @@ -0,0 +1,29 @@ +
    +
    +
    +
    +
    + {{getIp()}} +
    +
    +
    + +
  • + + + + + + + + +
    {{info.port}} + {{ info.clusterName }} + {{info.shardName}}{{info.active}}{{info.role}}{{info.err}}
    + + + + + + + \ No newline at end of file diff --git a/redis/redis-console/src/main/resources/static/views/index/keepercontainer_list.html b/redis/redis-console/src/main/resources/static/views/index/keepercontainer_list.html index 69043c340a..cb1f572f79 100644 --- a/redis/redis-console/src/main/resources/static/views/index/keepercontainer_list.html +++ b/redis/redis-console/src/main/resources/static/views/index/keepercontainer_list.html @@ -31,6 +31,7 @@ 迁移  修改  + 详情 diff --git a/redis/redis-console/src/main/resources/static/views/index/search_shard.html b/redis/redis-console/src/main/resources/static/views/index/search_shard.html new file mode 100644 index 0000000000..662e86cdc4 --- /dev/null +++ b/redis/redis-console/src/main/resources/static/views/index/search_shard.html @@ -0,0 +1,39 @@ +
    +
    +
    +
    +
    + Shard查询 +
    +
    +
    +
    + + + + + + + + + 搜索 +
    + + + + + + + + + +
    {{info.shardId}}{{info.shardName}} + {{ info.clusterName }} + {{info.clusterType}}{{info.clusterAdminEmails}}{{info.clusterDescription}}
    + +
    +
    + + + + \ No newline at end of file