import request from '@/utils/request'

// 查询告警记录列表
export function listRecord(query) {
    return request({
        url: '/alarm/record/list',
        method: 'get',
        params: query
    })
}

// 查询告警记录详细
export function getRecord(alarmId) {
    return request({
        url: '/alarm/record/' + alarmId,
        method: 'get'
    })
}

// 新增告警记录
export function addRecord(data) {
    return request({
        url: '/alarm/record',
        method: 'post',
        data: data
    })
}

// 修改告警记录
export function updateRecord(data) {
    return request({
        url: '/alarm/record',
        method: 'put',
        data: data
    })
}

// 删除告警记录
export function delRecord(alarmId) {
    return request({
        url: '/alarm/record/' + alarmId,
        method: 'delete'
    })
}


// 业务类型统计
export function getBizType(query) {
    return request({
        url: "/alarm/record/list/bizType",
        method: 'get',
        params: query
    })
}

// 应用组件统计
export function getBizSort(query) {
    return request({
        url: "/alarm/record/list/bizSort",
        method: 'get',
        params: query
    })
}

// 系统压力排名
export function getBizAccess(query) {
    return request({
        url: "/alarm/record/list/bizAccess",
        method: 'get',
        params: query
    })
}

