import request from '@/utils/request'

/**     --------------资源管理---------------     */
// 查询资源注册列表
export function listHandle(query) {
  return request({
    url: '/system/registration/list',
    method: 'post',
    data: query
  })
}
// 资源全部list
export function listAllResourList(data) {
  return request({
    url: '/system/registration/selectAllResourceNameByType',
    method: 'post',
    data: data
  })
}

// 查询资源注册详细
export function getHandle(Id) {
  return request({
    url: '/system/registration/' + Id,
    method: 'get'
  })
}

// 新增资源注册
export function addHandle(data) {
  return request({
    url: '/system/registration',
    method: 'post',
    data: data
  })
}

// 修改资源注册
export function updateHandle(data) {
  return request({
    url: '/system/registration',
    method: 'put',
    data: data
  })
}
// 修改注册状态
export function updateregisterType(data) {
  return request({
    url: '/system/registration/register',
    method: 'post',
    data: data
  })
}
// 交换机/服务器--节点名称查询
export function resNameBtType(data) {
  return request({
    url: '/system/registration/selectAllResourceNameByType',
    method: 'post',
    data: data
  })
}


/**   ----------------拓扑管理 ------------    */
// 查询列表
export function listTopology(query) {
  return request({
    url: '/system/management/list',
    method: 'post',
    data: query
  })
}
// 查询all列表
export function listAllTopology(query) {
  return request({
    url: '/system/management/getListChart',
    method: 'post',
    data: query
  })
}

// 查询资源注册详细
export function getTopology(Id) {
  return request({
    url: '/system/management/' + Id,
    method: 'get'
  })
}

// 新增资源注册
export function addTopology(data) {
  return request({
    url: '/system/management',
    method: 'post',
    data: data
  })
}

// 修改资源注册
export function updateTopology(data) {
  return request({
    url: '/system/management',
    method: 'put',
    data: data
  })
}
// 删除
export function delTopology(Ids) {
  return request({
    url: '/system/management/' + Ids,
    method: 'delete'
  })
}
// 服务器网口
export function postInterFaceName(data) {
  return request({
    url: '/system/interfaceName/getAllNames',
    method: 'post',
    data: data
  })
}
// 服务器网卡信息查询
export function virNetInterfaceChild(data) {
  return request({
    url: '/rocketmq/networkInterfaceChild/list',
    method: 'post',
    data: data
  })
}

/**   ----------------资源分组------------    */
// 查询列表
export function listGroup(query) {
  return request({
    url: '/system/group/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getGroup(Id) {
  return request({
    url: '/system/group/' + Id,
    method: 'get'
  })
}

// 新增
export function addGroup(data) {
  return request({
    url: '/system/group',
    method: 'post',
    data: data
  })
}

// 修改
export function updateGroup(data) {
  return request({
    url: '/system/group',
    method: 'put',
    data: data
  })
}
// 删除
export function delGroup(Ids) {
  return request({
    url: '/system/group/' + Ids,
    method: 'delete'
  })
}
// 包含设备向右移动校验
export function exitsResourceById(data) {
  return request({
    url: '/system/group/exitsResourceById',
    method: 'post',
    data: data
  })
}
// 包含设备查询
export function resNameList() {
  return request({
    url: '/system/registration/selectAllResourceName',
    method: 'get'
  })
}
/**   ----------------监控模版管理------------    */
// 查询列表
export function listMonitorTemp(query) {
  return request({
    url: '/rocketmq/template/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getMonitorTemp(Id) {
  return request({
    url: '/rocketmq/template/' + Id,
    method: 'get'
  })
}
// 查询资源监控项
export function getMonitorTempList(query) {
  return request({
    url: '/rocketmq/initialMonitorItem/list',
    method: 'post',
    data: query
  })
}

// 新增
export function addMonitorTemp(data) {
  return request({
    url: '/rocketmq/template',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMonitorTemp(data) {
  return request({
    url: '/rocketmq/template',
    method: 'put',
    data: data
  })
}
// 删除
export function delMonitorTemp(Ids) {
  return request({
    url: '/rocketmq/template/' + Ids,
    method: 'delete'
  })
}

/**   ----------------资源监控策略------------    */
// 查询列表
export function listMonitorPolicy(query) {
  return request({
    url: '/rocketmq/monitorPolicy/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getMonitorPolicy(Id) {
  return request({
    url: '/rocketmq/monitorPolicy/' + Id,
    method: 'get'
  })
}
// 下发策略
export function getMonitorPolicyList(Id) {
  return request({
    url: '/rocketmq/monitorPolicy/issuePolicy?id=' + Id,
    method: 'get'
  })
}

// 新增
export function addMonitorPolicy(data) {
  return request({
    url: '/rocketmq/monitorPolicy',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMonitorPolicy(data) {
  return request({
    url: '/rocketmq/monitorPolicy',
    method: 'put',
    data: data
  })
}
// 删除
export function delMonitorPolicy(Ids) {
  return request({
    url: '/rocketmq/monitorPolicy/' + Ids,
    method: 'delete'
  })
}
// 关联监控模板下拉接口
export function getMonitorPolicyTemp() {
  return request({
    url: '/rocketmq/template/getAllTemplate',
    method: 'get'
  })
}
// 关联资源组下拉接口
export function getResMonitorGroup() {
  return request({
    url: '/system/resourceMonitor/resourceGroupList ',
    method: 'get'
  })
}
/**   ----------------交换机监控策略------------    */
// 新增
export function addResourcePolicy(data) {
  return request({
    url: '/rocketmq/monitorPolicy/addResourcePolicy',
    method: 'post',
    data: data
  })
}
// 修改
export function updateResourcePolicy(data) {
  return request({
    url: '/rocketmq/monitorPolicy/updateResourcePolicy',
    method: 'post',
    data: data
  })
}

/**   ----------------脚本服务器策略------------    */
// 查询列表
export function listPolicy(query) {
  return request({
    url: '/rocketmq/policy/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getPolicy(Id) {
  return request({
    url: '/rocketmq/policy/' + Id,
    method: 'get'
  })
}
// 下发策略
export function getPolicyList(Id) {
  return request({
    url: '/rocketmq/policy/issueDeploymentPolicy?id=' + Id,
    method: 'get'
  })
}

// 新增
export function addPolicy(data) {
  return request({
    url: '/rocketmq/policy',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePolicy(data) {
  return request({
    url: '/rocketmq/policy',
    method: 'put',
    data: data
  })
}
// 删除
export function delPolicy(Ids) {
  return request({
    url: '/rocketmq/policy/' + Ids,
    method: 'delete'
  })
}
/**   ----------------脚本执行结果------------    */
export function getScriptResultBySn(data) {
  return request({
    url: '/rocketmq/remote/getScriptResultBySn',
    method: 'post',
    data: data
  })
}
// 执行结果详情列表
export function getScriptResultList(data) {
  return request({
    url: '/rocketmq/remote/getScriptResultByScriptId',
    method: 'post',
    data: data
  })
}
//  获取资源分组列表
export function getResGroupList() {
  return request({
    url: '/system/resourceMonitor/resourceGroupList',
    method: 'get'
  })
}
// 传参 分页参数和 资源组id
export function listRegisterList(data) {
  return request({
    url: '/system/resourceMonitor/getRegisterListByGroupId',
    method: 'post',
    data: data
  })
}
// 通过资源查包含设备
export function listArrRegisterList(data) {
  return request({
    url: '/system/resourceMonitor/getAllRegisterListByGroupId',
    method: 'post',
    data: data
  })
}
/**   ----------------AGENT更新------------    */
// 查询列表
export function listAgentManage(query) {
  return request({
    url: '/rocketmq/agentManagement/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getAgentManage(Id) {
  return request({
    url: '/rocketmq/agentManagement/' + Id,
    method: 'get'
  })
}

// 新增
export function addAgentManage(data) {
  return request({
    url: '/rocketmq/agentManagement/addUpdatePolicy',
    method: 'post',
    data: data
  })
}

// 修改
export function updateAgentManage(data) {
  return request({
    url: '/rocketmq/agentManagement/updateAgentNow',
    method: 'post',
    data: data
  })
}
// 删除
export function delAgentManage(Ids) {
  return request({
    url: '/rocketmq/agentManagement/' + Ids,
    method: 'delete'
  })
}
// 判断版本是否为最新agent版本---服务器管理详情用到了
export function agentIsNew(query) {
  return request({
    url: '/rocketmq/agentManagement/isNew',
    method: 'post',
    data: query
  })
}

/**     --------------交换机管理---------------     */
// 查询列表
export function listSwitchManage(query) {
  return request({
    url: '/system/switchManagement/list',
    method: 'post',
    data: query
  })
}
// 所有列表
export function listAllSwitchName(query) {
  return request({
    url: '/system/switchManagement/getAllSwitchName',
    method: 'post',
    data: query
  })
}

// 查询详细
export function getSwitchManage(Id) {
  return request({
    url: '/system/switchManagement/' + Id,
    method: 'get'
  })
}

// 新增
export function addSwitchManage(data) {
  return request({
    url: '/system/switchManagement',
    method: 'post',
    data: data
  })
}

// 修改
export function updateSwitchManage(data) {
  return request({
    url: '/system/switchManagement',
    method: 'put',
    data: data
  })
}
// 图形监控-基础信息
export function switchMonitorData(data) {
  return request({
    url: '/rocketmq/switchOtherData/getSwitchMonitorMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-设备cpu使用率
export function switchCpuData(data) {
  return request({
    url: '/rocketmq/switchOtherData/getSwitchCpuUseMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-设备内存使用率
export function switchMemData(data) {
  return request({
    url: '/rocketmq/switchOtherData/getSwitchMemUseMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-功率
export function switchPowerData(data) {
  return request({
    url: '/rocketmq/switchOtherData/getSwitchPowerMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-基础信息
export function switchNetDetails(data) {
  return request({
    url: '/rocketmq/switchInfo/getSwitchNetDetailsMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-丢包
export function switchNetDiscards(data) {
  return request({
    url: '/rocketmq/switchInfo/switchNetDiscardsEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-总流量
export function switchNeTotal(data) {
  return request({
    url: '/rocketmq/switchInfo/switchNetTotalEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-错误丢包
export function switchNetErrDiscard(data) {
  return request({
    url: '/rocketmq/switchInfo/switchNetErrDiscardsEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-实时流量
export function switchNetSpeed(data) {
  return request({
    url: '/rocketmq/switchInfo/switchNetSpeedEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-光模块AllName
export function moduleAllName(data) {
  return request({
    url: '/rocketmq/switchOpticalModule/getAllModuleName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-光模块-基本信息
export function moduleMsg(data) {
  return request({
    url: '/rocketmq/switchOpticalModule/switchOpticalModuleMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-光模块-光衰阈值
export function moduleLowThreshold(data) {
  return request({
    url: '/rocketmq/switchOpticalModule/opticalModuleLowThreshold',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-光模块-功率
export function modulePower(data) {
  return request({
    url: '/rocketmq/switchOpticalModule/opticalModulePower',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-MPU1 AllName
export function mpuAllName(data) {
  return request({
    url: '/rocketmq/switchMpuInfo/getAllMpuName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-MPU1-基本信息
export function mpuMsg(data) {
  return request({
    url: '/rocketmq/switchMpuInfo/getMpuMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-MPU1-cpu使用率
export function mpuCpuUse(data) {
  return request({
    url: '/rocketmq/switchMpuInfo/getMpuCpuUse',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-MPU1-内存使用率
export function mpuMemUse(data) {
  return request({
    url: '/rocketmq/switchMpuInfo/getMpuMemUse',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-MPU1-温度
export function mpuTemperature(data) {
  return request({
    url: '/rocketmq/switchMpuInfo/getMpuTemperature',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-电源AllName
export function pwrAllName(data) {
  return request({
    url: '/rocketmq/switchPowerSupply/getAllPwrName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-电源-基本信息
export function pwrMsg(data) {
  return request({
    url: '/rocketmq/switchPowerSupply/getPwrMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-电源-光衰阈值
export function pwrCurrent(data) {
  return request({
    url: '/rocketmq/switchPowerSupply/getPwrCurrent',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-电源-功率
export function pwrVoltage(data) {
  return request({
    url: '/rocketmq/switchPowerSupply/getPwrVoltage',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-风扇AllName
export function fanAllName(data) {
  return request({
    url: '/rocketmq/switchFanInfo/getAllFanName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-风扇-基本信息
export function fanMsg(data) {
  return request({
    url: '/rocketmq/switchFanInfo/getFanMsg',
    method: 'post',
    data: data
  })
}

/**     --------------接口备注信息---------------     */
// 查询列表
// export function listAllSwitchInterface(query) {
//   return request({
//     url: '/system/switchInterfaceInfo/list',
//     method: 'post',
//     data: query
//   })
// }

// 查询详细
export function getSwitchInterface(Id) {
  return request({
    url: '/system/switchInterfaceInfo/' + Id,
    method: 'get'
  })
}
// 新增
export function addSwitchInterface(data) {
  return request({
    url: '/system/switchInterfaceInfo',
    method: 'post',
    data: data
  })
}
// 修改
export function updateSwitchInterface(data) {
  return request({
    url: '/system/switchInterfaceInfo',
    method: 'put',
    data: data
  })
}
// 删除
export function delSwitchInterface(Ids) {
  return request({
    url: '/system/switchInterfaceInfo/' + Ids,
    method: 'delete'
  })
}


/**     --------------服务器资源注册--------------     */
// 查询列表
export function addMachine(query) {
  return request({
    url: '/system/machine',
    method: 'post',
    data: query
  })
}
export function getLogicalNode() {
  return request({
    url: '/system/registration/getAllLogicalNodeId',
    method: 'get',
  })
}
// 所有资源管理的列表
export function getRegistList(query) {
  return request({
    url: '/system/registration/getRegistList',
    method: 'post',
    data: query
  })
}
// 通过clientId查询流量图
export function getNetTraffic(query) {
  return request({
    url: '/rocketmq/traffic/netBatchTrafficEcharts',
    method: 'post',
    data: query
  })
}
// 查询列表前先查询该数据，用于高亮判断
export function getAlarmFlag() {
  return request({
    url: '/system/registration/getAlarmFlag',
    method: 'get'
  })
}
// 取消高亮
export function removeAlarmFlag(query) {
  return request({
    url: '/system/registration/removeAlarmFlag',
    method: 'post',
    data: query
  })
}
// 下架
export function removeServer(query) {
  return request({
    url: '/system/registration/removeServer',
    method: 'post',
    data: query
  })
}

export function bindBusByClient(query) {
  return request({
    url: 'system/registration/bindBusinessByClientIds',
    method: 'post',
    data: query
  })
}
// 上报带宽值修改
export function repBandwidthSubmit(query) {
  return request({
    url: '/system/registration/addReportedBandwidth',
    method: 'post',
    data: query
  })
}
export function networkList(query) {
  return request({
    url: '/rocketmq/networkInterface/list',
    method: 'post',
    data: query
  })
}
export function bindBusPublic(query) {
  return request({
    url: '/system/registration/bindBusinessPubulicIp',
    method: 'post',
    data: query
  })
}
// 详情顶部四个信息
export function trafficSerDetails(query) {
  return request({
    url: '/rocketmq/traffic/serverDetails',
    method: 'post',
    data: query
  })
}
// HDD磁盘空间使用情况图形
export function usedSpacechartsData(query) {
  return request({
    url: '/rocketmq/diskInfo/usedSpaceEcharts',
    method: 'post',
    data: query
  })
}
// CPU温度
export function cpuTemperatureChartData(query) {
  return request({
    url: '/rocketmq/cpuInfo/cupTemperatureEcharts',
    method: 'post',
    data: query
  })
}
// 硬盘设备监控列表
export function diskNameList(query) {
  return request({
    url: '/rocketmq/allDiskName/list',
    method: 'post',
    data: query
  })
}
// 硬盘设备监控列表的 测试IOPS/卸载
export function diskIssuanceOperat(query) {
  return request({
    url: '/rocketmq/allDiskName/issuanceOperation',
    method: 'post',
    data: query
  })
}
// 硬盘设备监控列表的 删除
export function delDiskName(Ids) {
  return request({
    url: '/rocketmq/allDiskName/' + Ids,
    method: 'delete'
  })
}

// 图形监控-基础信息
export function serverMonitorData(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/getMontiorMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-cpu负载
export function cpuLoadData(data) {
  return request({
    url: '/rocketmq/cpuInfo/cpuLoadEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-cpu时间
export function cpuTimeData(data) {
  return request({
    url: '/rocketmq/cpuInfo/cpuTimeEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-进程
export function procNum(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/procNumEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-登录用户数
export function serverUserNum(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/systemUserNumEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-交换卷/文件的可用空间
export function swapSizeFree(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/systemSwapSizeFreeEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-内存利用率
export function memoryUtilization(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/memoryUtilizationEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-可用交换空间百分比
export function swapSizePercent(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/systemSwapSizePercentEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-可用内存
export function memorySizeAvailable(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/memorySizeAvailableEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-可用内存百分比
export function memorySizePercent(data) {
  return request({
    url: '/rocketmq/systemOtherCollectData/memorySizePercentEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-所有挂载名称
export function mountNameList(data) {
  return request({
    url: '/rocketmq/mountPointInfo/getAllMountName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-挂载的-基础信息
export function pointDetails(data) {
  return request({
    url: '/rocketmq/mountPointInfo/pointDetailsMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-挂载的-空间
export function spaceEcharts(data) {
  return request({
    url: '/rocketmq/mountPointInfo/spaceEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-挂载的-空间利用率
export function spaceRate(data) {
  return request({
    url: '/rocketmq/mountPointInfo/spaceRateEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-网络接口的-基础信息
export function netDetails(data) {
  return request({
    url: '/rocketmq/traffic/netInterfaceDetailsMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-网络接口的-流量
export function trafficEcharts(data) {
  return request({
    url: '/rocketmq/traffic/netInterfaceTrafficEcharts',
    method: 'post',
    data: data
  })
}
// 网络接口的-PING丢包率
export function pingDroppedEchars(data) {
  return request({
    url: '/rocketmq/traffic/pingDroppedEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-网络接口的-IPv4流量
export function trafficIPv4Echarts(data) {
  return request({
    url: '/rocketmq/traffic/netInterfaceIpv4TrafficEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-网络接口的-IPv6流量
export function trafficIPv6Echarts(data) {
  return request({
    url: '/rocketmq/traffic/netInterfaceIpv6TrafficEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-网络接口的-丢数
export function droppedEcharts(data) {
  return request({
    url: '/rocketmq/traffic/netInterfaceDroppedEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-硬盘设备的-所有名称
export function diskAllNames(data) {
  return request({
    url: '/rocketmq/diskInfo/getAllDistName',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-硬盘设备的-基础信息
export function diskDetails(data) {
  return request({
    url: '/rocketmq/diskInfo/getDistDetailsMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-硬盘设备的-读写速率
export function speedEcharts(data) {
  return request({
    url: '/rocketmq/diskInfo/rwSpeedEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-硬盘设备的-读写次数
export function timesEcharts(data) {
  return request({
    url: '/rocketmq/diskInfo/rwTimesEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-硬盘设备的-读写字节
export function bytesEcharts(data) {
  return request({
    url: '/rocketmq/diskInfo/rwBytesEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-容器的-所有名称
export function dockerAllNames(data) {
  return request({
    url: '/rocketmq/dockerInfo/getAllDockerId',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-容器的-基础信息
export function dockerDetails(data) {
  return request({
    url: '/rocketmq/dockerInfo/getDockerDetailsMsg',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-容器的-CPU利用率
export function cpuUtilEcharts(data) {
  return request({
    url: '/rocketmq/dockerInfo/cpuUtilEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-容器的-内存利用率
export function dockerMemEcharts(data) {
  return request({
    url: '/rocketmq/dockerInfo/memUtilEcharts',
    method: 'post',
    data: data
  })
}
// 图形监控-自动发现项-容器的-网络速率
export function dockerSpeedEcharts(data) {
  return request({
    url: '/rocketmq/dockerInfo/netSpeedEcharts',
    method: 'post',
    data: data
  })
}
// 添加标签
export function addRemark(data) {
  return request({
    url: '/system/registration/addRemark',
    method: 'post',
    data: data
  })
}
// 修改标签
export function updateRemark(data) {
  return request({
    url: '/system/registration/updateRemark',
    method: 'post',
    data: data
  })
}


/**   ----------------告警日志 ------------    */
// 查询列表
export function listAlarmLog(query) {
  return request({
    url: '/rocketmq/alarmLog/list',
    method: 'post',
    data: query
  })
}

// 查询详细(未使用)
export function getAlarmLog(Id) {
  return request({
    url: '/rocketmq/alarmLog/' + Id,
    method: 'get'
  })
}
// 查询告警阈值配置列表
export function getAlarmThreshold(Id) {
  return request({
    url: '/rocketmq/rmAlarmThreshold/list',
    method: 'get'
  })
}
// 新增告警阈值配置
export function addAlarmThreshold(query) {
  return request({
    url: '/rocketmq/rmAlarmThreshold',
    method: 'post',
    data: query
  })
}

// 查询详细(跳转到服务器管理的详情) 通过clientId查询服务器管理详情
export function getAlarmLogServerMsg(query) {
  return request({
    url: '/system/registration/getServerMsgByClientId',
    method: 'post',
    data: query
  })
}

/**   ----------------消息推送 ------------    */
// 查询列表
export function listAlarmPush(query) {
  return request({
    url: '/rocketmq/alarmPushConfig/list',
    method: 'post',
    data: query
  })
}

// 查询详细
export function getAlarmPush(Id) {
  return request({
    url: '/rocketmq/alarmPushConfig/' + Id,
    method: 'get'
  })
}

// 新增
export function addAlarmPush(data) {
  return request({
    url: '/rocketmq/alarmPushConfig',
    method: 'post',
    data: data
  })
}
// 修改
export function updateAlarmPush(data) {
  return request({
    url: '/rocketmq/alarmPushConfig',
    method: 'put',
    data: data
  })
}
// 删除
export function delAlarmPush(Ids) {
  return request({
    url: '/rocketmq/alarmPushConfig/' + Ids,
    method: 'delete'
  })
}

/**   ----------------监控看板概览 ------------    */
// 新增
export function addMonitorConfig(data) {
  return request({
    url: '/system/monitorConfig',
    method: 'post',
    data: data
  })
}
// 修改
export function updateMonitorConfig(data) {
  return request({
    url: '/system/monitorConfig',
    method: 'put',
    data: data
  })
}
// 删除
export function delMonitorConfig(Ids) {
  return request({
    url: '/system/monitorConfig/' + Ids,
    method: 'delete'
  })
}
// 配置下拉
export function monitorConfigList(data) {
  return request({
    url: '/system/monitorConfig/list',
    method: 'post',
    data: data
  })
}
// 监控看板流量图
export function monitorViewChart(data) {
  return request({
    url: '/system/monitorConfigDetails/getTrafficByMonitorView',
    method: 'post',
    data: data
  })
}
// 查询分组
export function getMonitorGroup(Id) {
  return request({
    url: '/system/rmMonitorGroup/list',
    method: 'get'
  })
}
// 新增分组
export function addMonitorGroup(data) {
  return request({
    url: '/system/rmMonitorGroup',
    method: 'post',
    data: data
  })
}
// 修改分组
export function updateMonitorGroup(data) {
  return request({
    url: '/system/rmMonitorGroup',
    method: 'put',
    data: data
  })
}
// 删除分组
export function delMonitorGroup(Ids) {
  return request({
    url: '/system/rmMonitorGroup/' + Ids,
    method: 'delete'
  })
}
// 95带宽值列表
export function getBandWidthList(data) {
  return request({
    url: '/system/bandwidth/getListByMonitorView',
    method: 'post',
    data: data
  })
}
// 交换机流量出入列表
export function getSwitchInfoList(data) {
  return request({
    url: '/system/switchInfoDetails/geSwitchListByMonitorView',
    method: 'post',
    data: data
  })
}

/**     --------------MTRAgent管理---------------     */
// 查询列表
export function listMtrAgent(query) {
  return request({
    url: '/mtragent/mtrClientRegistration/list',
    method: 'post',
    data: query
  })
}
// 新增
export function addMtrAgent(data) {
  return request({
    url: '/mtragent/mtrClientRegistration/addAgentUpdatePolicy',
    method: 'post',
    data: data
  })
}
// 查询详细
export function getMtrAgent(Id) {
  return request({
    url: '/mtragent/mtrClientRegistration/' + Id,
    method: 'get'
  })
}
// 丢包率趋势
export function lossRateByMtr(data) {
  return request({
    url: '/mtragent/mtrProbeResult/getLossRateByMtrClientId',
    method: 'post',
    data: data
  })
}
// 根据mtrClientId获取所有clientId
export function mtrCToClientIds(data) {
  return request({
    url: '/mtragent/mtrClientRegistration/getClientIdByMtrClientId',
    method: 'post',
    data: data
  })
}
// 标识
export function logicalNodeAll() {
  return request({
    url: '/mtragent/mtrClientRegistration/getAllLogicalNode',
    method: 'get'
  })
}
// 所有 mtrclientId
export function allMtrClientIdData(data) {
  return request({
    url: '/mtragent/mtrClientRegistration/getAllMtrMsg',
    method: 'post',
    data: data
  })
}

/**     --------------MTR探测策略---------------     */
// 查询列表
export function listMtrPolicy(query) {
  return request({
    url: '/mtragent/mtrPolicyConfig/list',
    method: 'post',
    data: query
  })
}
// 新增  config:展示自定义的接口返回提示
export function addMtrPolicy(data, config) {
  return request({
    url: '/mtragent/mtrPolicyConfig',
    method: 'post',
    data: data,
    ...config
  })
}
// 修改
export function updateMtrPolicy(data, config) {
  return request({
    url: '/mtragent/mtrPolicyConfig',
    method: 'put',
    data: data,
    ...config
  })
}
// 查询详细
export function getMtrPolicyt(Id) {
  return request({
    url: '/mtragent/mtrPolicyConfig/' + Id,
    method: 'get'
  })
}
// 删除
export function delMtrPolicy(Ids) {
  return request({
    url: '/mtragent/mtrPolicyConfig/' + Ids,
    method: 'delete'
  })
}
// 相关Ip查询
export function networkInterList(data) {
  return request({
    url: '/rocketmq/networkInterface/list',
    method: 'post',
    data: data
  })
}
/**     --------------frp管理---------------     */
// 查询列表
export function listFrpcConfig(query) {
  return request({
    url: '/rocketmq/frpcConfigManage/list',
    method: 'post',
    data: query
  })
}
// 查询详细
export function getMFrpcConfig(Id) {
  return request({
    url: '/rocketmq/frpcConfigManage/' + Id,
    method: 'get'
  })
}
// 生成连接
export function frpConnectLink(data) {
  return request({
    url: '/rocketmq/frpcConfigManage/addFrpConnect',
    method: 'post',
    data: data
  })
}
// 修改配置
export function updateFrpcPortMapping(data) {
  return request({
    url: '/rocketmq/frpcPortMapping',
    method: 'post',
    data: data
  })
}
// 查询配置
export function frpcPortMappingList(data) {
  return request({
    url: '/rocketmq/frpcPortMapping/list',
    method: 'post',
    data: data
  })
}
// FRP信息 ---应用于服务器管理详情
export function frpMsgByClient(data) {
  return request({
    url: '/rocketmq/frpcConfigManage/getFrpMsgByClientId',
    method: 'post',
    data: data
  })
}
/**     --------------PPPoE---------------     */
// 查询 ---应用于服务器管理详情
export function getPppoeConfig(data) {
  return request({
    url: '/rocketmq/rmPppoeConfigMain/getPppoeConfigMsg',
    method: 'post',
    data: data
  })
}
// 新增 ---应用于服务器管理详情
export function addPoeConfigMain(data) {
  return request({
    url: '/rocketmq/rmPppoeConfigMain',
    method: 'post',
    data: data
  })
}
/**     --------------查看出省流量---------------     */
// 查询 ---应用于服务器管理详情
export function rmOutTrafficFlow(data) {
  return request({
    url: '/rocketmq/rmOutboundTrafficStatistics/list',
    method: 'post',
    data: data
  })
}
// 探测策略详情
export function getRmTcpdumpConfig(Id) {
  return request({
    url: '/rocketmq/rmTcpdumpConfig/' + Id,
    method: 'get'
  })
}
// 探测策略编辑
export function updateRmTcpdum(data) {
  return request({
    url: '/rocketmq/rmTcpdumpConfig',
    method: 'post',
    data: data
  })
}
