@Transactional
	public void approve(String ip, String name, boolean approve) {
		AgentInfo agentInfoInDB = agentManagerRepository.findByIpAndName(ip, name);

		if (agentInfoInDB != null) {
			agentInfoInDB.setApproved(approve);
		} else {
			agentInfoInDB = new AgentInfo();
			agentInfoInDB.setIp(ip);
			agentInfoInDB.setName(name);
			agentInfoInDB.setApproved(approve);
			agentManagerRepository.save(agentInfoInDB);
		}
		agentManagerRepository.flush();

		updateApproveInStore(ip, name, approve);
	}
Approve/disapprove the agent on given id.

@param ip      ip
@param name	  host name
@param approve true/false
ngrinder-controller/src/main/java/org/ngrinder/agent/service/AgentService.java