资源监控模块接口新增,agent下发信息配置
This commit is contained in:
@@ -5,7 +5,6 @@ import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.rocketmq.domain.RmTemplateLinux;
|
||||
import com.ruoyi.rocketmq.domain.RmTemplateSwitch;
|
||||
import com.ruoyi.rocketmq.mapper.RmMonitorTemplateMapper;
|
||||
import com.ruoyi.rocketmq.mapper.RmTemplateLinuxMapper;
|
||||
import com.ruoyi.rocketmq.mapper.RmTemplateSwitchMapper;
|
||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
||||
@@ -13,6 +12,7 @@ import com.ruoyi.system.api.domain.RmResourceGroupRemote;
|
||||
import com.ruoyi.system.api.domain.RmResourceRegistrationRemote;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Collections;
|
||||
@@ -21,20 +21,19 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DataProcessUtil {
|
||||
@Autowired
|
||||
private RmMonitorTemplateMapper rmMonitorTemplateMapper;
|
||||
private RmTemplateLinuxMapper rmTemplateLinuxMapper;
|
||||
@Autowired
|
||||
private static RmTemplateLinuxMapper rmTemplateLinuxMapper;
|
||||
private RmTemplateSwitchMapper rmTemplateSwitchMapper;
|
||||
@Autowired
|
||||
private static RmTemplateSwitchMapper rmTemplateSwitchMapper;
|
||||
@Autowired
|
||||
private static RemoteRevenueConfigService remoteRevenueConfigService;
|
||||
private RemoteRevenueConfigService remoteRevenueConfigService;
|
||||
|
||||
/**
|
||||
* 补充资源组信息
|
||||
*/
|
||||
public static String getResourceGroupNameById(Long resourceGroupId) {
|
||||
public String getResourceGroupNameById(Long resourceGroupId) {
|
||||
try {
|
||||
R<RmResourceGroupRemote> resourceGroupResponse = remoteRevenueConfigService
|
||||
.getResourceGroupMsgById(resourceGroupId, SecurityConstants.INNER);
|
||||
@@ -50,7 +49,7 @@ public class DataProcessUtil {
|
||||
/**
|
||||
* 资源组信息
|
||||
*/
|
||||
public static RmResourceGroupRemote getResourceMsgById(Long resourceGroupId) {
|
||||
public RmResourceGroupRemote getResourceMsgById(Long resourceGroupId) {
|
||||
try {
|
||||
R<RmResourceGroupRemote> resourceGroupResponse = remoteRevenueConfigService
|
||||
.getResourceGroupMsgById(resourceGroupId, SecurityConstants.INNER);
|
||||
@@ -66,7 +65,7 @@ public class DataProcessUtil {
|
||||
/**
|
||||
* 处理Linux模板数据
|
||||
*/
|
||||
public static void processLinuxTemplateData(Long templateId, Map<String, Object> result) {
|
||||
public void processLinuxTemplateData(Long templateId, Map<String, Object> result) {
|
||||
RmTemplateLinux query = new RmTemplateLinux();
|
||||
query.setTemplateId(templateId);
|
||||
List<RmTemplateLinux> linuxItems = rmTemplateLinuxMapper.selectRmTemplateLinuxList(query);
|
||||
@@ -87,7 +86,7 @@ public class DataProcessUtil {
|
||||
/**
|
||||
* 处理Switch模板数据
|
||||
*/
|
||||
public static void processSwitchTemplateData(Long templateId, Map<String, Object> result) {
|
||||
public void processSwitchTemplateData(Long templateId, Map<String, Object> result) {
|
||||
RmTemplateSwitch query = new RmTemplateSwitch();
|
||||
query.setTemplateId(templateId);
|
||||
List<RmTemplateSwitch> switchItems = rmTemplateSwitchMapper.selectRmTemplateSwitchList(query);
|
||||
@@ -123,7 +122,7 @@ public class DataProcessUtil {
|
||||
/**
|
||||
* 获取资源设备列表
|
||||
*/
|
||||
public static List<RmResourceRegistrationRemote> getResourceDevices(Long resourceGroupId) {
|
||||
public List<RmResourceRegistrationRemote> getResourceDevices(Long resourceGroupId) {
|
||||
R<RmResourceGroupRemote> groupResponse = remoteRevenueConfigService
|
||||
.getResourceGroupMsgById(resourceGroupId, SecurityConstants.INNER);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user