提交 9a81cf1e authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改实时监控接口地址

上级 c0c04465
......@@ -4,3 +4,8 @@ import httpRequest from '@/utils/axios'
export function getExperimentList(params?: { page?: number; 'per-page'?: number }) {
return httpRequest.get('/api/resource/v1/backend/experiment/monitor-experiments', { params })
}
// 获取实时监控实验列表
export function getCurrentExperimentList(params?: { hour?: number; limit?: number }) {
return httpRequest.get('/api/resource/v1/backend/experiment/current-monitor-experiments', { params })
}
......@@ -100,6 +100,9 @@ const listOptions = computed(() => {
align-items: center;
justify-content: space-evenly;
margin: 90px 0;
&:empty {
display: none;
}
li {
width: 212px;
height: 212px;
......
<script setup lang="ts">
import type { ExperimentItem } from '../types'
import AppList from '@/components/base/AppList.vue'
import { getExperimentList } from '../api'
import { getCurrentExperimentList } from '../api'
import { useAppConfig } from '@/composables/useAppConfig'
const appConfig = useAppConfig()
......@@ -9,7 +9,7 @@ const appList = ref<InstanceType<typeof AppList> | null>(null)
const list = ref<ExperimentItem[]>([])
async function fetchInfo() {
const res = await getExperimentList()
const res = await getCurrentExperimentList()
list.value = res.data.items
}
let timer: null | number = null
......@@ -103,6 +103,9 @@ const listOptions = computed(() => {
align-items: center;
justify-content: space-evenly;
margin: 90px 0;
&:empty {
display: none;
}
li {
width: 212px;
height: 212px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论