Search in sources :

Example 26 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class AppClientDataShowController method doIndex.

/**
     * 应用客户端统计首页
     * 
     * @param appId 应用id
     */
@RequestMapping("/index")
public ModelAndView doIndex(HttpServletRequest request, HttpServletResponse response, Model model) {
    Long appId = NumberUtils.toLong(request.getParameter("appId"));
    if (appId == null || appId <= 0) {
        return new ModelAndView("");
    }
    AppDesc appDesc = appService.getByAppId(appId);
    model.addAttribute("appId", appId);
    model.addAttribute("appDesc", appDesc);
    model.addAttribute("tabTag", request.getParameter("tabTag"));
    model.addAttribute("type", request.getParameter("type"));
    model.addAttribute("startDate", request.getParameter("startDate"));
    model.addAttribute("endDate", request.getParameter("endDate"));
    model.addAttribute("exceptionStartDate", request.getParameter("exceptionStartDate"));
    model.addAttribute("exceptionEndDate", request.getParameter("exceptionEndDate"));
    model.addAttribute("valueDistriStartDate", request.getParameter("valueDistriStartDate"));
    model.addAttribute("valueDistriEndDate", request.getParameter("valueDistriEndDate"));
    model.addAttribute("costDistriStartDate", request.getParameter("costDistriStartDate"));
    model.addAttribute("costDistriEndDate", request.getParameter("costDistriEndDate"));
    model.addAttribute("clientIp", request.getParameter("clientIp"));
    model.addAttribute("pageNo", request.getParameter("pageNo"));
    model.addAttribute("firstCommand", request.getParameter("firstCommand"));
    model.addAttribute("timeDimensionality", request.getParameter("timeDimensionality"));
    return new ModelAndView("client/appClientIndex");
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) AppDesc(com.sohu.cache.entity.AppDesc) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 27 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckSentinelNodeMasterName.

/**
     * 测试sentinel的masterName
     */
@Test
public void testCheckSentinelNodeMasterName() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu10");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:26379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 28 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckEmptyAppInstanceInfo1.

/**
     * 应用实例详情为空
     */
@Test
public void testCheckEmptyAppInstanceInfo1() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu1");
    // 实例信息
    String appInstanceInfo = "";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 29 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckDataNode.

/**
     */
@Test
public void testCheckDataNode() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu9");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:6379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 30 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckSentinelNode.

/**
     * 检测sentinel节点
     */
@Test
public void testCheckSentinelNode() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu11");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:26379:mymaster";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Aggregations

AppDesc (com.sohu.cache.entity.AppDesc)47 BaseTest (com.sohu.test.BaseTest)18 Test (org.junit.Test)18 ImportAppResult (com.sohu.cache.constant.ImportAppResult)15 InstanceInfo (com.sohu.cache.entity.InstanceInfo)11 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 ModelAndView (org.springframework.web.servlet.ModelAndView)7 Date (java.util.Date)5 Jedis (redis.clients.jedis.Jedis)5 AppAudit (com.sohu.cache.entity.AppAudit)4 InstanceStats (com.sohu.cache.entity.InstanceStats)3 IdempotentConfirmer (com.sohu.cache.util.IdempotentConfirmer)3 ParseException (java.text.ParseException)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 AppUser (com.sohu.cache.entity.AppUser)2 AppDetailVO (com.sohu.cache.web.vo.AppDetailVO)2 JSONObject (com.alibaba.fastjson.JSONObject)1 AppClientCostTimeTotalStat (com.sohu.cache.entity.AppClientCostTimeTotalStat)1 AppClientExceptionStat (com.sohu.cache.entity.AppClientExceptionStat)1