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