예제 #1
0
  @RequestMapping("/server/remove")
  public String remove(long id) {
    JSONObject result = new JSONObject();

    serverService.remove(id);

    result.put("ret", 0);
    return result.toJSONString();
  }
예제 #2
0
  @RequestMapping("/selectzone")
  public ModelAndView selectzone() {
    ModelAndView view = new ModelAndView("selectzone");

    List<Server> servers = serverService.getByAppId(0);
    view.addObject("servers", servers);

    return view;
  }
예제 #3
0
  @RequestMapping("/server/update")
  public String update(String params) {
    LOG.info("server update: {}", params);

    JSONObject result = new JSONObject();

    Server server = JSON.parseObject(params, Server.class);
    serverService.save(server);

    result.put("ret", 0);
    result.put("data", server);
    return result.toJSONString();
  }