#2599 解决:#2597,#2369,#1962 相关Bug

Merged
lewis merged 2 commits from zouap into V20220801 1 year ago
  1. +22
    -18
      modules/cloudbrain/cloudbrain.go
  2. +1
    -1
      routers/repo/user_data_analysis.go
  3. +0
    -1
      web_src/js/components/dataset/selectDataset.vue

+ 22
- 18
modules/cloudbrain/cloudbrain.go View File

@@ -466,11 +466,14 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) e
log.Error("no such resourceSpecId(%d)", task.ResourceSpecId, ctx.Data["MsgID"])
return errors.New("no such resourceSpec")
}

datasetInfos, _, err := models.GetDatasetInfo(task.Uuid)
if err != nil {
log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"])
return err
var datasetInfos map[string]models.DatasetInfo
if task.Uuid != "" {
var err error
datasetInfos, _, err = models.GetDatasetInfo(task.Uuid)
if err != nil {
log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"])
return err
}
}

volumes := []models.Volume{
@@ -510,24 +513,25 @@ func RestartTask(ctx *context.Context, task *models.Cloudbrain, newID *string) e
},
},
}

if len(datasetInfos) == 1 {
volumes = append(volumes, models.Volume{
HostPath: models.StHostPath{
Path: datasetInfos[task.Uuid].DataLocalPath,
MountPath: DataSetMountPath,
ReadOnly: true,
},
})
} else {
for _, dataset := range datasetInfos {
if datasetInfos != nil {
if len(datasetInfos) == 1 {
volumes = append(volumes, models.Volume{
HostPath: models.StHostPath{
Path: dataset.DataLocalPath,
MountPath: DataSetMountPath + "/" + dataset.Name,
Path: datasetInfos[task.Uuid].DataLocalPath,
MountPath: DataSetMountPath,
ReadOnly: true,
},
})
} else {
for _, dataset := range datasetInfos {
volumes = append(volumes, models.Volume{
HostPath: models.StHostPath{
Path: dataset.DataLocalPath,
MountPath: DataSetMountPath + "/" + dataset.Name,
ReadOnly: true,
},
})
}
}
}



+ 1
- 1
routers/repo/user_data_analysis.go View File

@@ -896,7 +896,7 @@ func QueryUserLoginInfo(ctx *context.Context) {
xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userLogin.IpAddr)
tmp = tmp + 1
formatTime := userLogin.CreatedUnix.Format("2006-01-02 15:04:05")
xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime[0:len(formatTime)-3])
xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime)
}
//设置默认打开的表单
xlsx.SetActiveSheet(index)


+ 0
- 1
web_src/js/components/dataset/selectDataset.vue View File

@@ -956,7 +956,6 @@ export default {
this.benchmarkNew = true;
}
if (location.href.indexOf("modelarts/notebook/create") !== -1 || location.href.indexOf("/cloudbrain/create") !== -1) {
console.log("required is false;");
this.required = false;
}
window.onresize = () => {


Loading…
Cancel
Save