修改缺陷

main
陈博文 4 days ago
parent f35270865c
commit 1df1771e97

@ -1,12 +1,12 @@
<template>
<div class="home">
<div class="home-left">
<Block title="显卡资源">
<template #extra>
<Block title="资源使用率">
<!-- <template #extra>
<div class="all-btn" @click="sendRouteChange('/admin/vgpu/card/admin')">
全部<svg-icon icon="more" style="margin-left: 4px" />
</div>
</template>
</template> -->
<div class="card-overview">
<div v-for="item in cardGaugeConfig.slice(0, 5)" :key="item.title">
<Gauge v-bind="item" />
@ -19,11 +19,11 @@
</div>
</Block>
<Block title="资源总览">
<template #extra>
<!-- <template #extra>
<div class="all-btn" @click="sendRouteChange('/admin/vgpu/card/admin')">
全部<svg-icon icon="more" style="margin-left: 4px" />
</div>
</template>
</template> -->
<ul class="resourceOverview">
<li v-for="{ title, count, icon, to, unit } in resourceOverview" :key="title"
:style="{ cursor: to ? 'pointer' : 'default' }" @click="sendRouteChange(to)">
@ -156,7 +156,7 @@ const cardGaugeConfig = useInstantVector([
title: '磁盘 使用率',
percent: 0,
query: `(sum(node_filesystem_size_bytes{fstype!~"tmpfs|overlay"})-sum(node_filesystem_free_bytes{fstype!~"tmpfs|overlay"})) / 1024 / 1024 / 1024`,
totalQuery: `avg(node_filesystem_size_bytes{fstype!~"tmpfs|overlay"}) / 1024 / 1024 / 1024`,
totalQuery: `sum(node_filesystem_size_bytes{fstype!~"tmpfs|overlay"}) / 1024 / 1024 / 1024`,
percentQuery: ``,
total: 0,
used: 0,

@ -46,7 +46,7 @@
:title="editId ? '编辑资源池' : '创建资源池'" width="1180" :before-close="handleClose">
<el-row :wrap="false" style="align-items: center;">
<span style="flex-shrink: 0; margin-right: 14px;">资源池名称</span>
<el-input style="flex: 1;" v-model="input" size="large" />
<el-input style="flex: 1;" v-model="input" size="large" maxlength="20" />
</el-row>
<div style="margin-top: 20px; margin-bottom: 10px;">
<span>选择节点</span>

@ -13,7 +13,7 @@
<script setup lang="jsx">
import taskApi from '~/vgpu/api/task';
import { calculateDuration, roundToDecimal, timeParse } from '@/utils';
import { calculateDuration, roundToDecimal, timeParse, bytesToGB } from '@/utils';
import { QuestionFilled } from '@element-plus/icons-vue';
import api from '~/vgpu/api/task';
import { ElMessage, ElMessageBox, ElPopover } from 'element-plus';
@ -126,6 +126,16 @@ const columns = [
title: '所属节点',
dataIndex: 'nodeName',
},
{
title: 'CPU',
dataIndex: 'requestedCpuCores',
render: ({ requestedCpuCores }) => `${requestedCpuCores}`,
},
{
title: '内存',
dataIndex: 'requestedMemory',
render: ({ requestedMemory }) => `${bytesToGB(requestedMemory)}GiB`,
},
{
title: '分配 vGPU',
dataIndex: 'deviceIds',

Loading…
Cancel
Save