@@ -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"]) | log.Error("no such resourceSpecId(%d)", task.ResourceSpecId, ctx.Data["MsgID"]) | ||||
return errors.New("no such resourceSpec") | 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{ | 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{ | volumes = append(volumes, models.Volume{ | ||||
HostPath: models.StHostPath{ | HostPath: models.StHostPath{ | ||||
Path: dataset.DataLocalPath, | |||||
MountPath: DataSetMountPath + "/" + dataset.Name, | |||||
Path: datasetInfos[task.Uuid].DataLocalPath, | |||||
MountPath: DataSetMountPath, | |||||
ReadOnly: true, | ReadOnly: true, | ||||
}, | }, | ||||
}) | }) | ||||
} else { | |||||
for _, dataset := range datasetInfos { | |||||
volumes = append(volumes, models.Volume{ | |||||
HostPath: models.StHostPath{ | |||||
Path: dataset.DataLocalPath, | |||||
MountPath: DataSetMountPath + "/" + dataset.Name, | |||||
ReadOnly: true, | |||||
}, | |||||
}) | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -896,7 +896,7 @@ func QueryUserLoginInfo(ctx *context.Context) { | |||||
xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userLogin.IpAddr) | xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userLogin.IpAddr) | ||||
tmp = tmp + 1 | tmp = tmp + 1 | ||||
formatTime := userLogin.CreatedUnix.Format("2006-01-02 15:04:05") | 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) | xlsx.SetActiveSheet(index) | ||||
@@ -956,7 +956,6 @@ export default { | |||||
this.benchmarkNew = true; | this.benchmarkNew = true; | ||||
} | } | ||||
if (location.href.indexOf("modelarts/notebook/create") !== -1 || location.href.indexOf("/cloudbrain/create") !== -1) { | if (location.href.indexOf("modelarts/notebook/create") !== -1 || location.href.indexOf("/cloudbrain/create") !== -1) { | ||||
console.log("required is false;"); | |||||
this.required = false; | this.required = false; | ||||
} | } | ||||
window.onresize = () => { | window.onresize = () => { | ||||
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》