| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.snmp4j.mp.SnmpConstants; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Calendar; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private TokenUtils tokenUtils; |
| | | @Autowired |
| | | private CommonConfig commonConfig; |
| | | @Value("${base.year}") |
| | | private String licenseYear; |
| | | @Value("${base.month}") |
| | | private String licenseMonth; |
| | | |
| | | /** |
| | | * agent查询监控snmp设备监测列表 |
| | |
| | | return "snmp/list"; |
| | | } |
| | | |
| | | Boolean isOctober(){ |
| | | Calendar ca = Calendar.getInstance(); |
| | | int year = ca.get(Calendar.YEAR);//获取年份 |
| | | int month=ca.get(Calendar.MONTH)+1;//获取月份 |
| | | int day=ca.get(Calendar.DATE);//获取日 |
| | | if(year<=Integer.parseInt(licenseYear)){ |
| | | if(month>=Integer.parseInt(licenseMonth)){ |
| | | return false; |
| | | }else { |
| | | return true; |
| | | } |
| | | }else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存snmp设备信息 |