import request from '@/utils/request'

export function save(data){
    return request({
        url: '/topology/save',
        method: 'post',
        data: data,
    })
}

export function getTopologyId(id){
    return request({
        url: '/topology/getTopology/'+id,
        method: 'get',
    })
}
export function updateTopology(data){
    return request({
        url: '/topology/updateTopology/',
        method: 'post',
        data: data,
    })
}
export function list(query){
    return request({
        url: '/topology/list',
        method: 'get',
        params: query
    })
}

export function listAll(query){
    return request({
        url: '/topology/listAll',
        method: 'get',
        params: query
    })
}
export function deleteTopology(id){
    return request({
        url:'/topology/deleteTopology/'+id,
        method: 'delete'
    })
}
export function deleteTopologyHandle(id){
    return request({
        url:'/topology/deleteTopologyHandle/'+id,
        method: 'delete'
    })
}