
import request from '@/utils/request'


//dashboard http://{grafana_url}/api/dashboards/uid/{uid}
// export function listOtPlugins(query) {
//   return request({
//     url: '/api/v1/ot-plugins',
//     method: 'get',
//     params: query
//   })
// }

//创建dashboard /api/v1/ot-apps/{app_id}/dashboard/add  post
export function addDashBoard(id) {
  return request({
    url: `/api/v1/ot-apps/${id}/dashboard/add`,
    method: 'post',
  })
}


// 5.4 进入app空间，获取该app对应的dashboard_id
// http://observe-server.cestong.com.cn/api/v1/ot-app-dashboard/byapp/:appid

export function otAppDashboard(id) {
  return request({
    url: '/api/v1/ot-app-dashboard/byapp/'+ id,
    method: 'get',
  })
}