From f2999c8c3dec9adf17880e19bc22081606666619 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 8 Mar 2022 10:35:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=A6=81=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index 78b9d517c..c0082382a 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -114,7 +114,7 @@ socket.onmessage = function (e) { html += " " +getRepotext(record) + "" } else if(record.OpType == "9" || record.OpType == "5"){ - branch = "" + record.RefName + "" + branch = "" + record.RefName + "" actionName = actionName.replace("{branch}",branch); html += recordPrefix + actionName; html += " " + getRepotext(record) + "" @@ -152,20 +152,21 @@ socket.onmessage = function (e) { function getTaskLink(record){ var re = getRepoLink(record); if(record.OpType == 24){ - return re + "/datasets?type=" + record.Content; + re = re + "/datasets?type=" + record.Content; }else if(record.OpType == 25){ - return re + "/cloudbrain/" + record.RefName; + re = re + "/cloudbrain/" + record.RefName; }else if(record.OpType == 26){ - return re + "/modelarts/notebook/" + record.Content; + re = re + "/modelarts/notebook/" + record.Content; }else if(record.OpType == 27){ - return re + "/modelarts/train-job/" + record.Content; + re = re + "/modelarts/train-job/" + record.Content; }else if(record.OpType == 28){ - return re + "/modelarts/inference-job/" + record.Content; + re = re + "/modelarts/inference-job/" + record.Content; }else if(record.OpType == 29){ - return re + "/cloudbrain/benchmark/" + record.RefName; + re = re + "/cloudbrain/benchmark/" + record.RefName; }else if(record.OpType == 30){ - return re + "/modelmanage/show_model_info?name=" + record.RefName; + re = re + "/modelmanage/show_model_info?name=" + record.RefName; } + re = encodeURI(re); return re; } @@ -180,7 +181,7 @@ function getMsg(record){ } html += " \"\"" html += "
" - html += " " + name + "" + html += " " + name + "" return html; } @@ -192,7 +193,7 @@ function getRepotext(record){ } } function getRepoLink(record){ - return record.Repo.OwnerName + "/" + record.Repo.Name; + return encodeURI(record.Repo.OwnerName + "/" + record.Repo.Name); } @@ -224,20 +225,20 @@ function getTime(UpdatedUnix,currentTime){ } function getPRLink(record){ - return "/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/pulls/" + getIssueId(record); + return encodeURI("/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/pulls/" + getIssueId(record)); } function getPRText(record){ if(record.Repo.Alias){ - return record.Repo.OwnerName + "/" + record.Repo.Alias + "#" + getIssueId(record); + return encodeURI(record.Repo.OwnerName + "/" + record.Repo.Alias + "#" + getIssueId(record)); }else{ - return record.Repo.OwnerName + "/" + record.Repo.Name + "#" + getIssueId(record); + return encodeURI(record.Repo.OwnerName + "/" + record.Repo.Name + "#" + getIssueId(record)); } } function getIssueLink(record){ - return "/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/issues/" + getIssueId(record); + return encodeURI("/" + record.Repo.OwnerName + "/" + record.Repo.Name + "/issues/" + getIssueId(record)); } function getIssueId(record){ From c21449fb3237ddd3cde215d5ce2689a2d7efef58 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 8 Mar 2022 10:37:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=A6=81=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index c0082382a..227f5b496 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -229,9 +229,9 @@ function getPRLink(record){ } function getPRText(record){ if(record.Repo.Alias){ - return encodeURI(record.Repo.OwnerName + "/" + record.Repo.Alias + "#" + getIssueId(record)); + return record.Repo.OwnerName + "/" + record.Repo.Alias + "#" + getIssueId(record); }else{ - return encodeURI(record.Repo.OwnerName + "/" + record.Repo.Name + "#" + getIssueId(record)); + return record.Repo.OwnerName + "/" + record.Repo.Name + "#" + getIssueId(record); } }