Browse Source

Resources Management

tags/v1.22.8.2^2
chenshihai 3 years ago
parent
commit
35d77af012
3 changed files with 10 additions and 6 deletions
  1. +2
    -1
      web_src/vuepages/pages/resources/components/SceneDialog.vue
  2. +6
    -4
      web_src/vuepages/pages/resources/scene/index.vue
  3. +2
    -1
      web_src/vuepages/pages/resources/specification/index.vue

+ 2
- 1
web_src/vuepages/pages/resources/components/SceneDialog.vue View File

@@ -177,7 +177,8 @@ export default {
const data = list.map((item) => {
const Queue = item.Queue;
const Spec = item.Spec;
const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
// const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
return {
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')}`,


+ 6
- 4
web_src/vuepages/pages/resources/scene/index.vue View File

@@ -186,11 +186,13 @@ export default {
const data = list.map((item) => {
const Specs = item.Specs;
const specsList = [];
const queues = [], queueIds = [];
const queues = [];
const queueIds = [];
let cluster = '';
for (let i = 0, iLen = Specs.length; i < iLen; i++) {
const Spec = Specs[i];
const NGPU = `${Spec.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Spec.AccCardType)}`;
// const NGPU = `${Spec.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Spec.AccCardType)}`;
const NGPU = `${Spec.ComputeResource}:${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')}`,
@@ -201,8 +203,8 @@ export default {
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)})`,
AiCenterName: Spec.AiCenterName,
QueueStr: `${Spec.QueueCode}(${getListValueWithKey(this.clusterList, Spec.Cluster)} - ${Spec.AiCenterName})`,
});
queueIds.push(Spec.QueueId);
}


+ 2
- 1
web_src/vuepages/pages/resources/specification/index.vue View File

@@ -190,7 +190,8 @@ export default {
const data = list.map((item) => {
const Queue = item.Queue;
const Spec = item.Spec;
const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
// const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
const NGPU = `${Queue.ComputeResource}:${Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Queue.AccCardType)}`;
return {
...Spec,
SourceSpecId: Spec.SourceSpecId || '--',


Loading…
Cancel
Save