#5373 fix-5359

Merged
chenshihai merged 4 commits from fix-5359 into V20240402 1 month ago
  1. +2
    -1
      manager/client/grampus/grampus.go
  2. +7
    -2
      templates/repo/modelsafety/show.tmpl
  3. +15
    -0
      web_src/vuepages/pages/cloudbrain/detail/index.vue
  4. +15
    -1
      web_src/vuepages/pages/computingpower/components/DemandForm.vue
  5. +1
    -1
      web_src/vuepages/pages/computingpower/components/Resources.vue

+ 2
- 1
manager/client/grampus/grampus.go View File

@@ -458,7 +458,8 @@ func GetGrampusMetrics(jobID string, startTime int64, endTime int64, nodeId ...i
} else {
step = tempStep * 60
}
size = MAX_MATRICS_SIZE
size = int64(math.Ceil(float64(endTime-startTime)/float64(step))) + 1

}

url = url + "?startTime=" + strconv.FormatInt(startTime, 10) + "&step=" + strconv.FormatInt(step, 10) + "&size=" + strconv.FormatInt(size, 10)


+ 7
- 2
templates/repo/modelsafety/show.tmpl View File

@@ -640,7 +640,7 @@
}

var resultData;
function initData() {
function initData(isFirst) {
$.ajax({
url: window.location.href.replace('cloudbrain/benchmark', 'modelsafety'),
type: "get",
@@ -674,6 +674,11 @@
if (res.Status == 'TESTING') {
$(`[vClass="Status"]`).removeClass(res.Status).addClass('RUNNING');
}
if (isFirst && ['RUNNING', 'TESTING'].includes(res.Status)) {
setTimeout(function() {
$('.pointing.secondary.menu .item').eq(1).click();
}, 20);
}
$(`[vdataclipboardtext="Image"]`).attr('data-clipboard-text', imageName);
$(`[vimage="Image"]`).text(imageName);
$(`[vtitle="Image"]`).attr('title', imageName);
@@ -717,7 +722,7 @@
});
}

initData();
initData(true);
$(document).ready(function () {
$('.ui.accordion').accordion({ selector: { trigger: '.icon' } });


+ 15
- 0
web_src/vuepages/pages/cloudbrain/detail/index.vue View File

@@ -219,6 +219,21 @@ export default {
this.tabNameList = tabsName;
this.tabConfigs = tabConfigs;
this.operationList = configs.operations || [];
for (let i = 0, iLen = data.length; i < iLen; i++) {
const _task = data[i].task;
if (['PREPARING', 'CONNECTING', 'CREATING', 'WAITING', 'INIT', 'STARTING'].includes(_task.status)
&& tabsName.indexOf('operationProfile') >= 0) {
data[i].activeName = 'operationProfile-' + _task.id;
}
if (['RUNNING'].includes(_task.status) && tabsName.indexOf('logs') >= 0) {
data[i].activeName = 'logs-' + _task.id;
}
if (data[i].activeName.indexOf('configInfo-') < 0) {
setTimeout(() => {
this.tabChange(data[i]);
}, 80);
}
}
this.mainData = data;
cloudBrainTools.initRefreshData(this.mainData);
} else {


+ 15
- 1
web_src/vuepages/pages/computingpower/components/DemandForm.vue View File

@@ -2,7 +2,8 @@
<div>
<div class="title" v-if="type == 'add'">请在下方填写您的算力使用需求,部分大额或独占资源使用涉及付费,平台运营人员会与您联系沟通详情。</div>
<div class="form-c">
<el-form ref="formRef" class="ignore-dirty" size="default" :model="form" :rules="formRules" label-width="110px">
<el-form ref="formRef" class="ignore-dirty" size="default" :model="form" :rules="formRules" label-width="110px"
@validate="validateEvent">
<el-form-item label="计算资源" prop="compute_resource">
<el-select :disabled="disabledEdit" v-model="form.compute_resource" placeholder="请选择计算资源"
@change="changeComputeResource">
@@ -217,9 +218,13 @@ export default {
timeFormat(unix) {
return formatDate(new Date(unix * 1000), 'yyyy-MM-dd HH:mm:ss');
},
validateEvent() {
this.toggleDirtyForm(true);
},
resetForm() {
this.$refs['formRef'].resetFields();
this.cardTypeList = [];
this.toggleDirtyForm(false);
},
changeComputeResource() {
this.cardTypeList = this.computeResourceCardTypeMap[this.form.compute_resource].map(itm => ({ k: itm, v: getListValueWithKey(ACC_CARD_TYPE, itm) }));
@@ -340,6 +345,15 @@ export default {
this.$emit('error');
})
},
toggleDirtyForm(isDirty) {
if (isDirty) {
this.$refs['formRef'].$el.classList.remove('ignore-dirty');
this.$refs['formRef'].$el.classList.add('dirty');
} else {
this.$refs['formRef'].$el.classList.remove('dirty');
this.$refs['formRef'].$el.classList.add('ignore-dirty');
}
},
},
mounted() {
getDemandCreationRequired().then(res => {


+ 1
- 1
web_src/vuepages/pages/computingpower/components/Resources.vue View File

@@ -142,7 +142,7 @@ export default {
},
_price_start: '',
_price_end: '',
list: [1, 2, 3, 4, 5, 6],
list: [],
paginationInfo: {
pageSizes: [15, 30, 50],
total: 0,


Loading…
Cancel
Save