|
|
@@ -43,9 +43,23 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="AiCenterStr" :label="$t('resourcesManagement.aiCenter')" align="center" |
|
|
|
header-align="center"></el-table-column> |
|
|
|
header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="!scope.row.Queues.length">--</div> |
|
|
|
<div v-for="item in scope.row.Queues" :key="item.QueueId"> |
|
|
|
<span>{{ item.AiCenterName }}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="QueueStr" :label="$t('resourcesManagement.resQueue')" align="center" |
|
|
|
header-align="center"></el-table-column> |
|
|
|
header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="!scope.row.Queues.length">--</div> |
|
|
|
<div v-for="item in scope.row.Queues" :key="item.QueueId"> |
|
|
|
<span>{{ item.QueueStr }}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="SpecsList" :label="$t('resourcesManagement.resourceSpecification')" align="left" |
|
|
|
header-align="center" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
@@ -172,13 +186,26 @@ export default { |
|
|
|
const data = list.map((item) => { |
|
|
|
const Specs = item.Specs; |
|
|
|
const specsList = []; |
|
|
|
const queues = [], queueIds = []; |
|
|
|
let cluster = ''; |
|
|
|
for (let i = 0, iLen = Specs.length; i < iLen; i++) { |
|
|
|
const Spec = Specs[i]; |
|
|
|
const NGPU = `${item.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, item.AccCardType)}`; |
|
|
|
const NGPU = `${Spec.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Spec.AccCardType)}`; |
|
|
|
specsList.push({ |
|
|
|
k: Spec.ID, |
|
|
|
v: `${NGPU}, CPU:${Spec.CpuCores}, ${this.$t('resourcesManagement.gpuMem')}:${Spec.GPUMemGiB}GB, ${this.$t('resourcesManagement.mem')}:${Spec.MemGiB}GB, ${this.$t('resourcesManagement.shareMem')}:${Spec.ShareMemGiB}GB, ${this.$t('resourcesManagement.unitPrice')}:${Spec.UnitPrice}${this.$t('resourcesManagement.point_hr')}`, |
|
|
|
}) |
|
|
|
}); |
|
|
|
cluster = Spec.Cluster; |
|
|
|
if (queueIds.indexOf(Spec.QueueId) < 0) { |
|
|
|
queues.push({ |
|
|
|
QueueId: Spec.QueueId, |
|
|
|
QueueCode: Spec.QueueCode, |
|
|
|
AiCenterCode: Spec.AiCenterCode, |
|
|
|
AiCenterName: getListValueWithKey(this.aiCenterList, Spec.AiCenterCode), |
|
|
|
QueueStr: `${Spec.QueueCode}(${getListValueWithKey(this.clusterList, Spec.Cluster)} - ${getListValueWithKey(this.aiCenterList, Spec.AiCenterCode)})`, |
|
|
|
}); |
|
|
|
queueIds.push(Spec.QueueId); |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
ID: item.ID, |
|
|
@@ -188,11 +215,9 @@ export default { |
|
|
|
IsExclusive: item.IsExclusive, |
|
|
|
IsExclusiveStr: getListValueWithKey(this.isExclusiveList, item.IsExclusive ? '1' : '2'), |
|
|
|
ExclusiveOrg: item.ExclusiveOrg, |
|
|
|
AiCenterCode: item.AiCenterCode, |
|
|
|
AiCenterStr: getListValueWithKey(this.aiCenterList, item.AiCenterCode), |
|
|
|
Cluster: item.Cluster, |
|
|
|
QueueId: item.QueueId, |
|
|
|
QueueStr: item.QueueCode ? `${item.QueueCode}(${getListValueWithKey(this.clusterList, item.Cluster)} - ${getListValueWithKey(this.aiCenterList, item.AiCenterCode)})` : '--', |
|
|
|
Cluster: cluster, |
|
|
|
QueueIds: queueIds, |
|
|
|
Queues: queues, |
|
|
|
SpecsList: specsList, |
|
|
|
} |
|
|
|
}); |
|
|
@@ -253,7 +278,7 @@ export default { |
|
|
|
IsExclusive: data.IsExclusive ? '1' : '2', |
|
|
|
ExclusiveOrg: data.ExclusiveOrg, |
|
|
|
Cluster: data.Cluster, |
|
|
|
QueueId: data.QueueId, |
|
|
|
QueueIds: data.QueueIds, |
|
|
|
SpecIds: data.SpecsList.map((item) => item.k), |
|
|
|
} : {}; |
|
|
|
this.sceneDialogShow = true; |
|
|
|