|
|
|
@ -1,30 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<list-header
|
|
|
|
|
v-if="!hideTitle"
|
|
|
|
|
description="任务管理用于监控物理显卡的状态。它用于监控物理显卡的分配使用情况,以及查看物理显卡上运行的所有任务。"
|
|
|
|
|
/>
|
|
|
|
|
<list-header v-if="!hideTitle" description="任务管理用于监控物理显卡的状态。它用于监控物理显卡的分配使用情况,以及查看物理显卡上运行的所有任务。" />
|
|
|
|
|
|
|
|
|
|
<Top v-if="!hideTitle" />
|
|
|
|
|
|
|
|
|
|
<table-plus
|
|
|
|
|
:api="taskApi.getTaskList({ filters })"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:rowAction="rowAction"
|
|
|
|
|
:searchSchema="searchSchema"
|
|
|
|
|
ref="table"
|
|
|
|
|
:style="style"
|
|
|
|
|
hideTag
|
|
|
|
|
staticPage
|
|
|
|
|
>
|
|
|
|
|
<table-plus :api="taskApi.getTaskList({ filters })" :columns="columns" :rowAction="rowAction"
|
|
|
|
|
:searchSchema="searchSchema" ref="table" :style="{ height: 'auto', ...style }" hideTag staticPage>
|
|
|
|
|
</table-plus>
|
|
|
|
|
|
|
|
|
|
<form-plus-drawer
|
|
|
|
|
v-model="state.visible"
|
|
|
|
|
v-model:form="state.formValues"
|
|
|
|
|
:schema="state.schema"
|
|
|
|
|
:title="state.title"
|
|
|
|
|
@ok="state.ok"
|
|
|
|
|
/>
|
|
|
|
|
<form-plus-drawer v-model="state.visible" v-model:form="state.formValues" :schema="state.schema" :title="state.title"
|
|
|
|
|
@ok="state.ok" />
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="jsx">
|
|
|
|
@ -39,6 +23,9 @@ import { mapValues, isNumber, pick } from 'lodash';
|
|
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
import searchSchema from './searchSchema';
|
|
|
|
|
import Top from './top.vue';
|
|
|
|
|
import useParentAction from '~/vgpu/hooks/useParentAction';
|
|
|
|
|
|
|
|
|
|
const { sendRouteChange, hasParentWindow } = useParentAction();
|
|
|
|
|
|
|
|
|
|
const props = defineProps(['hideTitle', 'filters', 'style']);
|
|
|
|
|
|
|
|
|
@ -62,6 +49,11 @@ const columns = [
|
|
|
|
|
<text-plus text={name} to={`/admin/vgpu/task/admin/detail?name=${name}&podUid=${podUid}`} />
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '类型',
|
|
|
|
|
dataIndex: 'nataskTypeme',
|
|
|
|
|
render: ({ taskType }) => taskType === 'big_model' ? '大模型' : '实训',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '任务状态',
|
|
|
|
|
dataIndex: 'status',
|
|
|
|
@ -110,6 +102,24 @@ const columns = [
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '实训名称',
|
|
|
|
|
dataIndex: 'shixunName',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '使用者角色',
|
|
|
|
|
dataIndex: 'nataskTypeme',
|
|
|
|
|
render: ({ taskType }) => taskType === 'big_model' ? '大模型' : '实训',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '用户名',
|
|
|
|
|
dataIndex: 'role',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '所属资源池',
|
|
|
|
|
dataIndex: 'resourcePools',
|
|
|
|
|
render: ({ resourcePools }) => `${resourcePools.join('、')}`,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '所属节点',
|
|
|
|
|
dataIndex: 'nodeName',
|
|
|
|
@ -166,10 +176,14 @@ const rowAction = [
|
|
|
|
|
{
|
|
|
|
|
title: '查看详情',
|
|
|
|
|
onClick: (row) => {
|
|
|
|
|
router.push({
|
|
|
|
|
path: '/admin/vgpu/task/admin/detail',
|
|
|
|
|
query: pick(row, ['name', 'podUid']),
|
|
|
|
|
});
|
|
|
|
|
sendRouteChange(`/admin/vgpu/task/admin/detail?name=${row.name}&podUid=${row.podUid}`);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '查看实训',
|
|
|
|
|
hidden: (row) => !hasParentWindow || row.taskType === 'big_model',
|
|
|
|
|
onClick: (row) => {
|
|
|
|
|
sendRouteChange(`/admins/running_pods?pod_name=${row.podName}`, 'open');
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|