This commit is contained in:
@@ -298,6 +298,7 @@ $(document).ready(function() {
|
||||
url: url,
|
||||
data: postData,
|
||||
success: function(args) {
|
||||
console.log('mod', args);
|
||||
showAlert("<%= localeMessage.getString("common.saveMsg") %>", {
|
||||
type: 'success',
|
||||
title: '저장 완료',
|
||||
|
||||
+12
-10
@@ -19,7 +19,9 @@ import com.eactive.eai.agent.command.CommonCommand;
|
||||
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
|
||||
import com.eactive.eai.rms.common.combo.ComboService;
|
||||
import com.eactive.eai.rms.common.combo.ComboVo;
|
||||
import com.eactive.eai.rms.common.util.CommonUtil;
|
||||
import com.eactive.eai.rms.common.vo.GridResponse;
|
||||
import com.eactive.eai.rms.common.vo.SimpleResponse;
|
||||
|
||||
@Controller
|
||||
public class InflowClientControlManController extends OnlBaseAnnotationController {
|
||||
@@ -55,22 +57,22 @@ public class InflowClientControlManController extends OnlBaseAnnotationControlle
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=UPDATE")
|
||||
public String save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui)
|
||||
public ResponseEntity<SimpleResponse> save(HttpServletRequest request, HttpServletResponse response, InflowControlManUI ui)
|
||||
throws Exception {
|
||||
service.mergeClient(ui);
|
||||
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand",
|
||||
ui.getName());
|
||||
agentUtilService.broadcast(command);
|
||||
return null;
|
||||
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.ReloadInflowClientControlCommand", ui.getName());
|
||||
HashMap<String, Object> returnMap = agentUtilService.broadcast(command);
|
||||
SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true));
|
||||
return ResponseEntity.ok(simpleResponse);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=DELETE")
|
||||
public String delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception {
|
||||
public ResponseEntity<SimpleResponse> delete(HttpServletRequest request, HttpServletResponse response, String name) throws Exception {
|
||||
service.deleteClient(name);
|
||||
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand",
|
||||
name);
|
||||
agentUtilService.broadcast(command);
|
||||
return null;
|
||||
CommonCommand command = new CommonCommand("com.eactive.eai.agent.inflow.RemoveInflowClientControlCommand", name);
|
||||
HashMap<String, Object> returnMap = agentUtilService.broadcast(command);
|
||||
SimpleResponse simpleResponse = SimpleResponse.of(CommonUtil.getMapString(returnMap, true));
|
||||
return ResponseEntity.ok(simpleResponse);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=LIST_INIT_COMBO")
|
||||
|
||||
+9
@@ -72,6 +72,9 @@ public class InflowControlManService extends BaseService {
|
||||
} else {
|
||||
entity = mapper.toEntity(ui);
|
||||
}
|
||||
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
|
||||
entity.setThreshold(0);
|
||||
}
|
||||
service.save(entity);
|
||||
}
|
||||
|
||||
@@ -102,6 +105,9 @@ public class InflowControlManService extends BaseService {
|
||||
} else {
|
||||
entity = mapper.toEntity(ui);
|
||||
}
|
||||
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
|
||||
entity.setThreshold(0);
|
||||
}
|
||||
service.save(entity);
|
||||
}
|
||||
|
||||
@@ -133,6 +139,9 @@ public class InflowControlManService extends BaseService {
|
||||
} else {
|
||||
entity = mapper.toEntity(ui);
|
||||
}
|
||||
if (entity.getThreshold() == null || StringUtils.isEmpty(entity.getThresholdtimeunit())) {
|
||||
entity.setThreshold(0);
|
||||
}
|
||||
service.save(entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user