diff --git a/modules/normalization/normalization.go b/modules/normalization/normalization.go index c2b545f90..ce616d7f8 100644 --- a/modules/normalization/normalization.go +++ b/modules/normalization/normalization.go @@ -43,7 +43,7 @@ func GetCompleteInitValue(issuesClosed int64, releases int64, developAge int64, return setting.RadarMap.CompletenessIssuesClosed*float64(issuesClosed) + setting.RadarMap.CompletenessReleases*float64(releases) + setting.RadarMap.CompletenessDevelopAge*float64(developAge) + - setting.RadarMap.CompletenessDataset*float64(dataset/(1024*1024)) + + setting.RadarMap.CompletenessDataset*(float64(dataset)/(1024*1024)) + setting.RadarMap.CompletenessModel*float64(model) + setting.RadarMap.CompletenessWiki*float64(wiki) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 18ca21925..ff0cfedea 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -755,6 +755,15 @@ unit_disabled = The site administrator has disabled this repository section. language_other = Other datasets = Datasets datasets.desc = Enable Dataset + +debug=Debug +stop=Stop +delete=Delete +model_download=Model Download +submit_image=Submit Image +download=Download + + cloudbrain=cloudbrain cloudbrain.new=New cloudbrain cloudbrain.desc=cloudbrain @@ -777,15 +786,21 @@ cloudbrain_status_createtime = Status/Createtime cloudbrain_status_runtime = Running Time -modelarts.notebook=Debug Job -modelarts.train_job=Create Job -modelarts.train_job.new=New Job +modelarts.notebook=Debug Task +modelarts.train_job=Create Task +modelarts.train_job.new_debug= New Debug Task +modelarts.train_job.new_train=New Train Task +modelarts.train_job.config=Configuration information +modelarts.train_job.new=New train Task + + + modelarts.train_job.basic_info=Basic Info modelarts.train_job.job_status=Job Status modelarts.train_job.job_name=Job Name modelarts.train_job.version=Job Version modelarts.train_job.start_time=Start Time -modelarts.train_job.dura_time=Duration Time +modelarts.train_job.dura_time=Running Time modelarts.train_job.description=Description modelarts.train_job.parameter_setting=Parameter setting modelarts.train_job.parameter_setting_info=Parameter Info @@ -795,7 +810,7 @@ modelarts.train_job.fast_parameter_setting_config_link=fast_parameter_setting_co modelarts.train_job.frames=frames modelarts.train_job.algorithm_origin=算法来源 modelarts.train_job.AI_driver=AI Engine -modelarts.train_job.start_file=启动文件 +modelarts.train_job.start_file=Start File modelarts.train_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。 modelarts.train_job.dataset=Dataset modelarts.train_job.run_parameter=Run Parameter diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 8ac895ec9..d6ac9f870 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -757,6 +757,14 @@ unit_disabled=站点管理员已禁用此项目单元。 language_other=其它 datasets=数据集 datasets.desc=数据集功能 + +debug=调试 +stop=停止 +delete=删除 +model_download=模型下载 +submit_image=提交镜像 +download=模型下载 + cloudbrain=云脑 cloudbrain.new=新建任务 cloudbrain.desc=云脑功能 @@ -779,15 +787,21 @@ cloudbrain_status_createtime=状态/创建时间 cloudbrain_status_runtime = 运行时长 cloudbrain_jobname_err=只能以小写字母或数字开头且只包含小写字母、数字、_和-,不能以_结尾,最长36个字符。 -modelarts.notebook=调试作业 -modelarts.train_job=训练作业 -modelarts.train_job.new=新建作业 +modelarts.notebook=调试任务 +modelarts.train_job=训练任务 +modelarts.train_job.new_debug=新建调试任务 +modelarts.train_job.new_train=新建训练任务 +modelarts.train_job.config=配置信息 +modelarts.train_job.new=新建训练任务 + + + modelarts.train_job.basic_info=基本信息 modelarts.train_job.job_status=作业状态 modelarts.train_job.job_name=作业名称 modelarts.train_job.version=作业版本 modelarts.train_job.start_time=开始时间 -modelarts.train_job.dura_time=持续时间 +modelarts.train_job.dura_time=运行时长 modelarts.train_job.description=作业描述 modelarts.train_job.parameter_setting=参数设置 modelarts.train_job.parameter_setting_info=参数信息 diff --git a/routers/api/v1/repo/modelarts.go b/routers/api/v1/repo/modelarts.go index f38cb1ad7..2e825d8cc 100755 --- a/routers/api/v1/repo/modelarts.go +++ b/routers/api/v1/repo/modelarts.go @@ -74,6 +74,7 @@ func GetModelArtsTrainJob(ctx *context.APIContext) { ctx.JSON(http.StatusOK, map[string]interface{}{ "JobID": jobID, "JobStatus": job.Status, + "JobDuration": job.Duration, }) } diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 166fe6704..b37af704d 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -357,14 +357,14 @@ func NotebookShow(ctx *context.Context) { task, err := models.GetCloudbrainByJobID(jobID) if err != nil { ctx.Data["error"] = err.Error() - ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) return } result, err := modelarts.GetJob(jobID) if err != nil { ctx.Data["error"] = err.Error() - ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) return } @@ -373,7 +373,7 @@ func NotebookShow(ctx *context.Context) { err = models.UpdateJob(task) if err != nil { ctx.Data["error"] = err.Error() - ctx.RenderWithErr(err.Error(), tplModelArtsNotebookIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsNotebookShow, nil) return } @@ -528,6 +528,15 @@ func TrainJobIndex(ctx *context.Context) { } func TrainJobNew(ctx *context.Context) { + err := trainJobNewDataPrepare(ctx) + if err != nil { + ctx.ServerError("get new train-job info failed", err) + return + } + ctx.HTML(200, tplModelArtsTrainJobNew) +} + +func trainJobNewDataPrepare(ctx *context.Context) error { ctx.Data["PageIsCloudBrain"] = true //can, err := canUserCreateTrainJob(ctx.User.ID) @@ -549,35 +558,35 @@ func TrainJobNew(ctx *context.Context) { attachs, err := models.GetModelArtsUserAttachments(ctx.User.ID) if err != nil { ctx.ServerError("GetAllUserAttachments failed:", err) - return + return err } ctx.Data["attachments"] = attachs var resourcePools modelarts.ResourcePool if err = json.Unmarshal([]byte(setting.ResourcePools), &resourcePools); err != nil { ctx.ServerError("json.Unmarshal failed:", err) - return + return err } ctx.Data["resource_pools"] = resourcePools.Info var engines modelarts.Engine if err = json.Unmarshal([]byte(setting.Engines), &engines); err != nil { ctx.ServerError("json.Unmarshal failed:", err) - return + return err } ctx.Data["engines"] = engines.Info var versionInfos modelarts.VersionInfo if err = json.Unmarshal([]byte(setting.EngineVersions), &versionInfos); err != nil { ctx.ServerError("json.Unmarshal failed:", err) - return + return err } ctx.Data["engine_versions"] = versionInfos.Version var flavorInfos modelarts.Flavor if err = json.Unmarshal([]byte(setting.TrainJobFLAVORINFOS), &flavorInfos); err != nil { ctx.ServerError("json.Unmarshal failed:", err) - return + return err } ctx.Data["flavor_infos"] = flavorInfos.Info @@ -587,12 +596,12 @@ func TrainJobNew(ctx *context.Context) { configList, err := getConfigList(modelarts.PerPage, 1, modelarts.SortByCreateTime, "desc", "", modelarts.ConfigTypeCustom) if err != nil { ctx.ServerError("getConfigList failed:", err) - return + return err } ctx.Data["config_list"] = configList.ParaConfigs - ctx.HTML(200, tplModelArtsTrainJobNew) + return nil } func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) { @@ -614,27 +623,29 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) logObsPath := "/" + setting.Bucket + modelarts.JobPath + jobName + modelarts.LogPath dataPath := "/" + setting.Bucket + "/" + setting.BasePath + path.Join(uuid[0:1], uuid[1:2]) + "/" + uuid + "/" - can, err := canUserCreateTrainJob(ctx.User.ID) - if err != nil { - ctx.ServerError("canUserCreateTrainJob", err) - return - } - - if !can { - log.Error("the user can not create train-job") - ctx.RenderWithErr("the user can not create train-job", tplModelArtsTrainJobNew, &form) - return - } + //can, err := canUserCreateTrainJob(ctx.User.ID) + //if err != nil { + // ctx.ServerError("canUserCreateTrainJob", err) + // return + //} + // + //if !can { + // log.Error("the user can not create train-job") + // ctx.RenderWithErr("the user can not create train-job", tplModelArtsTrainJobNew, &form) + // return + //} //param check if err := paramCheckCreateTrainJob(form); err != nil { log.Error("paramCheckCreateTrainJob failed:(%v)", err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobNew, &form) return } if err := git.Clone(repo.RepoPath(), codeLocalPath, git.CloneRepoOptions{}); err != nil { log.Error("Failed to clone repository: %s (%v)", repo.FullName(), err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("Failed to clone repository", tplModelArtsTrainJobNew, &form) return } @@ -642,18 +653,21 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) //todo: upload code (send to file_server todo this work?) if err := obsMkdir(setting.CodePathPrefix + jobName + modelarts.OutputPath); err != nil { log.Error("Failed to obsMkdir_output: %s (%v)", repo.FullName(), err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("Failed to obsMkdir_output", tplModelArtsTrainJobNew, &form) return } if err := obsMkdir(setting.CodePathPrefix + jobName + modelarts.LogPath); err != nil { log.Error("Failed to obsMkdir_log: %s (%v)", repo.FullName(), err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("Failed to obsMkdir_log", tplModelArtsTrainJobNew, &form) return } if err := uploadCodeToObs(codeLocalPath, jobName, ""); err != nil { log.Error("Failed to uploadCodeToObs: %s (%v)", repo.FullName(), err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("Failed to uploadCodeToObs", tplModelArtsTrainJobNew, &form) return } @@ -673,6 +687,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) err := json.Unmarshal([]byte(params), ¶meters) if err != nil { log.Error("Failed to Unmarshal params: %s (%v)", params, err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("运行参数错误", tplModelArtsTrainJobNew, &form) return } @@ -691,6 +706,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) if isSaveParam == "on" { if form.ParameterTemplateName == "" { log.Error("ParameterTemplateName is empty") + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("保存作业参数时,作业参数名称不能为空", tplModelArtsTrainJobNew, &form) return } @@ -714,6 +730,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) if err != nil { log.Error("Failed to CreateTrainJobConfig: %v", err) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr("保存作业参数失败:"+err.Error(), tplModelArtsTrainJobNew, &form) return } @@ -735,9 +752,10 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) Parameters: param, } - err = modelarts.GenerateTrainJob(ctx, req) + err := modelarts.GenerateTrainJob(ctx, req) if err != nil { log.Error("GenerateTrainJob failed:%v", err.Error()) + trainJobNewDataPrepare(ctx) ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobNew, &form) return } @@ -838,21 +856,21 @@ func TrainJobShow(ctx *context.Context) { task, err := models.GetCloudbrainByJobID(jobID) if err != nil { log.Error("GetCloudbrainByJobID(%s) failed:%v", jobID, err.Error()) - ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) return } attach, err := models.GetAttachmentByUUID(task.Uuid) if err != nil { log.Error("GetAttachmentByUUID(%s) failed:%v", jobID, err.Error()) - ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) return } result, err := modelarts.GetTrainJob(jobID, strconv.FormatInt(task.VersionID, 10)) if err != nil { log.Error("GetJob(%s) failed:%v", jobID, err.Error()) - ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobIndex, nil) + ctx.RenderWithErr(err.Error(), tplModelArtsTrainJobShow, nil) return } diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 795e35aac..2201cd272 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -239,7 +239,7 @@
@@ -255,7 +255,7 @@ - 新建调试任务 + {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}} @@ -323,7 +323,7 @@ {{else}} {{.Status}} {{end}} --> - {{.Status}} + {{.Status}} - - 调试 + + {{$.i18n.Tr "repo.debug"}} -
+ {{$.CsrfTokenHtml}} - - 停止 + + {{$.i18n.Tr "repo.stop"}}
- 模型下载 + {{$.i18n.Tr "repo.download"}} - 提交镜像 + {{$.i18n.Tr "repo.submit_image"}}
-
+ {{$.CsrfTokenHtml}} - - 删除 + + {{$.i18n.Tr "repo.delete"}}
@@ -512,23 +512,52 @@ $(document).ready(loadJobStatus); function loadJobStatus() { $(".job-status").each((index, job) => { - console.log("---------",index,job) const jobID = job.dataset.jobid; const repoPath = job.dataset.repopath; if (job.textContent.trim() == 'STOPPED' || job.textContent.trim() == 'FAILED') { return } - + $.get(`/api/v1/repos/${repoPath}/cloudbrain/${jobID}`, (data) => { const jobID = data.JobID const status = data.JobStatus if (status != job.textContent.trim()) { - //$('#' + jobID).text(status) + console.log("---------") + $('#' + jobID+'-icon').removeClass().addClass(status) + $('#' + jobID+ '-text').text(status) + //if (status == 'STOPPED') { - window.location.reload() + // window.location.reload() //} } + if(status==="RUNNING"){ + $('#model-debug-'+jobID).removeClass('disabled') + $('#model-debug-'+jobID).addClass('blue') + $('#model-image-'+jobID).removeClass('disabled') + $('#model-image-'+jobID).addClass('blue') + + + } + if(status!=="RUNNING"){ + $('#model-debug-'+jobID).removeClass('blue') + $('#model-debug-'+jobID).addClass('disabled') + $('#model-image-'+jobID).removeClass('blue') + $('#model-image-'+jobID).addClass('disabled') + + } + if(status!=="STOPPED" || status!=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('disabled') + $('#stop-model-debug-'+jobID).addClass('blue') + $('#model-delete-'+jobID).removeClass('red') + $('#model-delete-'+jobID).addClass('disabled') + } + if(status=="STOPPED" || status=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('blue') + $('#stop-model-debug-'+jobID).addClass('disabled') + $('#model-delete-'+jobID).removeClass('disabled') + $('#model-delete-'+jobID).addClass('red') + } }).fail(function(err) { console.log(err); }); diff --git a/templates/repo/modelarts/notebook/index.tmpl b/templates/repo/modelarts/notebook/index.tmpl index 29c132580..721089727 100755 --- a/templates/repo/modelarts/notebook/index.tmpl +++ b/templates/repo/modelarts/notebook/index.tmpl @@ -200,6 +200,7 @@ {{template "repo/header" .}}
+ {{template "base/alert" .}} @@ -208,8 +209,8 @@
@@ -224,7 +225,7 @@
- 新建调试任务 + {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}} @@ -254,17 +255,17 @@
-
+
{{$.i18n.Tr "repo.cloudbrain_task"}}
{{$.i18n.Tr "repo.cloudbrain_status_createtime"}}
-
+
{{$.i18n.Tr "repo.cloudbrain_creator"}}
-
- {{$.i18n.Tr "repo.cloudbrain_operate"}} +
+ {{$.i18n.Tr "repo.cloudbrain_operate"}}
@@ -278,7 +279,7 @@
-
+ -
+
{{if .User.Name}} {{else}} @@ -305,39 +306,39 @@ {{end}}
-
+ @@ -436,11 +437,37 @@ const jobID = data.JobID const status = data.JobStatus if (status != job.textContent.trim()) { - //$('#' + jobID).text(status) + + $('#' + jobID+'-icon').removeClass().addClass(status) + $('#' + jobID+ '-text').text(status) + //if (status == 'STOPPED') { - window.location.reload() + // window.location.reload() //} } + if(status==="RUNNING"){ + $('#model-debug-'+jobID).removeClass('disabled') + $('#model-debug-'+jobID).addClass('blue') + + + } + if(status!=="RUNNING"){ + $('#model-debug-'+jobID).removeClass('blue') + $('#model-debug-'+jobID).addClass('disabled') + + } + if(status!=="STOPPED" || status!=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('disabled') + $('#stop-model-debug-'+jobID).addClass('blue') + $('#model-delete-'+jobID).removeClass('red') + $('#model-delete-'+jobID).addClass('disabled') + } + if(status=="STOPPED" || status=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('blue') + $('#stop-model-debug-'+jobID).addClass('disabled') + $('#model-delete-'+jobID).removeClass('disabled') + $('#model-delete-'+jobID).addClass('red') + } }).fail(function(err) { console.log(err); }); diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 4945e4781..eee186b38 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -200,6 +200,7 @@ {{template "repo/header" .}}
+ {{template "base/alert" .}} - {{.Status}} + {{.Status}} {{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}
-
+
- {{.TrainJobDuration}} +
-
+
{{if .User.Name}} {{else}} @@ -343,7 +344,7 @@ {{end}}
-
+ @@ -456,7 +457,31 @@ .modal('show') } } + function runtime(time){ + if(time){ + let hours = time/3600000<10 ? "0"+parseInt(time/3600000):parseInt(time/3600000) + let miuns = time%3600000/60000<10 ? "0"+parseInt(time%3600000/60000):parseInt(time%3600000/60000) + let seconds = time%60000/1000<10 ? "0"+parseInt(time%60000/1000):parseInt(time%60000/1000) + return hours + ":" + miuns + ":" + seconds + }else{ + return "00:00:00" + } + } + function loadJobDuration() { + $(".job-status").each((index, job) => { + const jobID = job.dataset.jobid; + const repoPath = job.dataset.repopath; + $.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}`, (data) => { + const duration = data.JobDuration + const jobID = data.JobID + let train_duration = runtime(duration) + $('#duration-'+jobID).text(train_duration) + }) + + }) + } + $(document).ready(loadJobDuration); // 加载任务状态 var timeid = window.setInterval(loadJobStatus, 15000); $(document).ready(loadJobStatus); @@ -464,6 +489,7 @@ $(".job-status").each((index, job) => { const jobID = job.dataset.jobid; const repoPath = job.dataset.repopath; + if (job.textContent.trim() == 'IMAGE_FAILED' || job.textContent.trim() == 'SUBMIT_FAILED' || job.textContent.trim() == 'DELETE_FAILED' || job.textContent.trim() == 'KILLED' || job.textContent.trim() == 'COMPLETED' || job.textContent.trim() == 'FAILED' || job.textContent.trim() == 'CANCELED' || job.textContent.trim() == 'LOST') { @@ -473,18 +499,42 @@ $.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}`, (data) => { const jobID = data.JobID const status = data.JobStatus + const duration = data.JobDuration if (status != job.textContent.trim()) { - //$('#' + jobID).text(status) - //if (status == 'STOPPED') { - window.location.reload() - //} + $('#' + jobID+'-icon').removeClass().addClass(status) + $('#' + jobID+ '-text').text(status) + + } + if(status==="RUNNING"){ + $('#model-debug-'+jobID).removeClass('disabled') + $('#model-debug-'+jobID).addClass('blue') + let train_duration = runtime(duration) + $('#duration-'+jobID).text(train_duration) + + } + if(status!=="RUNNING"){ + $('#model-debug-'+jobID).removeClass('blue') + $('#model-debug-'+jobID).addClass('disabled') + + } + if(status!=="KILLED" || status!=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('disabled') + $('#stop-model-debug-'+jobID).addClass('blue') + $('#model-delete-'+jobID).removeClass('red') + $('#model-delete-'+jobID).addClass('disabled') + } + if(status=="KILLED" || status=="FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('blue') + $('#stop-model-debug-'+jobID).addClass('disabled') + $('#model-delete-'+jobID).removeClass('disabled') + $('#model-delete-'+jobID).addClass('red') } }).fail(function(err) { console.log(err); }); }); }; - + // 获取弹窗 var modal = document.getElementById('imageModal'); diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index 310ee56b2..3e3e2fc2a 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -49,12 +49,98 @@ text-align: center; color: #C2C7CC;" } +#mask { + position: fixed; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + filter: alpha(opacity=60); + background-color: #777; + z-index: 1000; + display: none; + opacity: 0.8; + -moz-opacity: 0.5; + padding-top: 100px; + color: #000000 + } + /* 加载圈css效果图 */ + +#loadingPage { + margin: 200px auto; + width: 50px; + height: 40px; + text-align: center; + font-size: 10px; + display: block; +} + +#loadingPage>div { + background-color: green; + height: 100%; + width: 6px; + display: inline-block; + -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; + animation: sk-stretchdelay 1.2s infinite ease-in-out; + } + + #loadingPage .rect2 { + -webkit-animation-delay: -1.1s; + animation-delay: -1.1s; + } + + #loadingPage .rect3 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; + } + + #loadingPage .rect4 { + -webkit-animation-delay: -0.9s; + animation-delay: -0.9s; + } + + #loadingPage .rect5 { + -webkit-animation-delay: -0.8s; + animation-delay: -0.8s; + } + + @-webkit-keyframes sk-stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4) + } + 20% { + -webkit-transform: scaleY(1.0) + } + } + + @keyframes sk-stretchdelay { + 0%, + 40%, + 100% { + transform: scaleY(0.4); + -webkit-transform: scaleY(0.4); + } + 20% { + transform: scaleY(1.0); + -webkit-transform: scaleY(1.0); + } +} -
+ +
+
+
+
+
+
+
+
-
{{template "repo/header" .}}
@@ -147,9 +233,9 @@
--> -
+
- + @@ -412,14 +498,19 @@ } }, onSuccess: function(){ - $('.ui.page.dimmer').dimmer('show') + // $('.ui.page.dimmer').dimmer('show') + document.getElementById("mask").style.display = "block" }, onFailure: function(e){ return false; } }) } - + document.onreadystatechange = function() { + if (document.readyState === "complete") { + document.getElementById("mask").style.display = "none" + } + } function send_run_para(){ var run_parameters = [] var msg = {} diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index d1fc781d4..d00ce52b1 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -25,8 +25,8 @@
diff --git a/web_src/less/openi.less b/web_src/less/openi.less index aa9d31d76..56234586e 100644 --- a/web_src/less/openi.less +++ b/web_src/less/openi.less @@ -227,12 +227,12 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;} .STOPPED, .KILLED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -459px -52px;} .RUNNING{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -478px -52px;} .i-bg-orange{background-position: -495px -51px;} -.FAILED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -532px -52px;} +.FAILED,.START_FAILED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -532px -52px;} .i-bg-green{background-position: -441px -52px;} .i-bg-used{background-position: -514px -52px;} .icon-bind{background-position: -550px -52px;} .icon-unbind{background-position: -568px -52px;} -.CREATING, .STOPPING, .DELETING, .STARTING, .WAITING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;} +.CREATING, .STOPPING, .DELETING, .STARTING, .WAITING ,.INIT,.KILLING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;} .COMPLETED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;} .text_over{