import service from "../../utils/request";

/**
 * 获取列表
 * @returns
 */
export function getLogList(mac) {
  return service.request({
    method: "post",
    url: "/log_remote/logcat_list",
    data: {
      mac,
    },
  });
}

/**
 * 获取列表
 * @returns
 */
export function getLogDetails(id) {
  return service.request({
    method: "post",
    url: "/log_remote/logcat_details",
    data: {
      id,
    },
  });
}

/**
 * 设备列表
 * @returns
 */
export function getDeviceList(page, mac) {
  return service.request({
    method: "post",
    url: "/log_remote/device/list",
    data: {
      page,
      mac,
    },
  });
}

/**
 * 添加设备
 * @returns
 */
export function deviceCreate(
  mac,
  auto_flag,
  log_filter,
  time_interval,
  open_flag
) {
  return service.request({
    method: "post",
    url: "/log_remote/device/create",
    data: {
      mac,
      auto_flag,
      log_filter,
      time_interval,
      open_flag,
    },
  });
}

/**
 * 停止抓日志
 * @returns
 */
export function forceStop(
    mac,
  ) {
    return service.request({
      method: "post",
      url: "/log_remote/device/force-stop",
      data: {
        mac,
       
      },
    });
  }


