Browse Source

Merge branch 'V20220801' into issue-zpz-0801

tags/v1.22.7.2^2
zhoupzh 3 years ago
parent
commit
ba3511adce
18 changed files with 115 additions and 41 deletions
  1. +2
    -1
      models/user_business_analysis.go
  2. +2
    -2
      options/locale/locale_en-US.ini
  3. +2
    -2
      options/locale/locale_zh-CN.ini
  4. +8
    -8
      routers/repo/ai_model_manage.go
  5. +2
    -2
      templates/repo/cloudbrain/inference/new.tmpl
  6. +21
    -0
      templates/repo/cloudbrain/new.tmpl
  7. +2
    -2
      templates/repo/cloudbrain/trainjob/new.tmpl
  8. +1
    -0
      templates/repo/debugjob/index.tmpl
  9. +1
    -1
      templates/repo/grampus/trainjob/gpu/new.tmpl
  10. +1
    -1
      templates/repo/grampus/trainjob/npu/new.tmpl
  11. +1
    -1
      templates/repo/migrate.tmpl
  12. +2
    -2
      templates/repo/modelarts/inferencejob/new.tmpl
  13. +22
    -0
      templates/repo/modelarts/notebook/new.tmpl
  14. +1
    -1
      templates/repo/modelarts/trainjob/new.tmpl
  15. +2
    -1
      templates/repo/modelmanage/index.tmpl
  16. +9
    -7
      web_src/js/components/Model.vue
  17. +33
    -7
      web_src/js/components/images/Images.vue
  18. +3
    -3
      web_src/js/index.js

+ 2
- 1
models/user_business_analysis.go View File

@@ -920,7 +920,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time,
CountDate = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 1, 0, 0, currentTimeNow.Location()) CountDate = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 1, 0, 0, currentTimeNow.Location())
} }


DataDate := startTime.Format("2006-01-02")
DataDate := CountDate.Format("2006-01-02")
CodeMergeCountMap := queryPullRequest(start_unix, end_unix) CodeMergeCountMap := queryPullRequest(start_unix, end_unix)
CommitCountMap := queryCommitAction(start_unix, end_unix, 5) CommitCountMap := queryCommitAction(start_unix, end_unix, 5)
IssueCountMap := queryCreateIssue(start_unix, end_unix) IssueCountMap := queryCreateIssue(start_unix, end_unix)
@@ -1103,6 +1103,7 @@ func updateNewUserAcitivity(currentUserActivity map[int64]map[int64]int64, userA
",activate_regist_user=" + fmt.Sprint(useMetrics.ActivateRegistUser) + ",activate_regist_user=" + fmt.Sprint(useMetrics.ActivateRegistUser) +
",not_activate_regist_user=" + fmt.Sprint(useMetrics.CurrentDayRegistUser-useMetrics.ActivateRegistUser) + ",not_activate_regist_user=" + fmt.Sprint(useMetrics.CurrentDayRegistUser-useMetrics.ActivateRegistUser) +
",current_day_regist_user=" + fmt.Sprint(useMetrics.CurrentDayRegistUser) + ",current_day_regist_user=" + fmt.Sprint(useMetrics.CurrentDayRegistUser) +
",data_date='" + time.Unix(key, 0).Format("2006-01-02") + "'" +
" where count_date=" + fmt.Sprint(key) " where count_date=" + fmt.Sprint(key)


statictisSess.Exec(updateSql) statictisSess.Exec(updateSql)


+ 2
- 2
options/locale/locale_en-US.ini View File

@@ -1007,7 +1007,7 @@ cloudbrain.time.starttime=Start run time
cloudbrain.time.endtime=End run time cloudbrain.time.endtime=End run time
cloudbrain.datasetdownload=Dataset download url cloudbrain.datasetdownload=Dataset download url
model_manager = Model model_manager = Model
model_noright=No right
model_noright=You have no right to do the operation.
model_rename=Duplicate model name, please modify model name. model_rename=Duplicate model name, please modify model name.


date=Date date=Date
@@ -1225,7 +1225,7 @@ model.manage.create_new_convert_task=Create Model Transformation Task
modelconvert.manage.create_error1=A model transformation task with the same name already exists. modelconvert.manage.create_error1=A model transformation task with the same name already exists.
modelconvert.manage.create_error2=Only one running model transformation task can be created. modelconvert.manage.create_error2=Only one running model transformation task can be created.
modelconvert.manage.model_not_exist=The model does not exist. modelconvert.manage.model_not_exist=The model does not exist.
modelconvert.manage.no_operate_right=No operation permission.
modelconvert.manage.no_operate_right=You have no right to do the operation.


grampus.train_job.ai_center = AI Center grampus.train_job.ai_center = AI Center
grampus.dataset_path_rule = The code is storaged in /cache/code;the dataset is storaged in /cache/dataset;and please put your model into /cache/output, then you can download it online。 grampus.dataset_path_rule = The code is storaged in /cache/code;the dataset is storaged in /cache/dataset;and please put your model into /cache/output, then you can download it online。


+ 2
- 2
options/locale/locale_zh-CN.ini View File

@@ -1006,7 +1006,7 @@ datasets.desc=数据集功能
cloudbrain_helper=使用GPU/NPU资源,开启Notebook、模型训练任务等 cloudbrain_helper=使用GPU/NPU资源,开启Notebook、模型训练任务等


model_manager = 模型 model_manager = 模型
model_noright=无权限操作
model_noright=您没有操作权限。
model_rename=模型名称重复,请修改模型名称 model_rename=模型名称重复,请修改模型名称




@@ -1237,7 +1237,7 @@ model.manage.create_new_convert_task=创建模型转换任务
modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。 modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。
modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。 modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。
modelconvert.manage.model_not_exist=选择的模型不存在。 modelconvert.manage.model_not_exist=选择的模型不存在。
modelconvert.manage.no_operate_right=操作权限。
modelconvert.manage.no_operate_right=您没有操作权限。


grampus.train_job.ai_center=智算中心 grampus.train_job.ai_center=智算中心
grampus.dataset_path_rule = 训练脚本存储在/cache/code中,数据集存储在/cache/dataset中,训练输出请存储在/cache/output中以供后续下载。 grampus.dataset_path_rule = 训练脚本存储在/cache/code中,数据集存储在/cache/dataset中,训练输出请存储在/cache/output中以供后续下载。


+ 8
- 8
routers/repo/ai_model_manage.go View File

@@ -152,6 +152,10 @@ func saveModelByParameters(jobId string, versionName string, name string, versio
} }


func SaveNewNameModel(ctx *context.Context) { func SaveNewNameModel(ctx *context.Context) {
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) {
ctx.Error(403, ctx.Tr("repo.model_noright"))
return
}
name := ctx.Query("Name") name := ctx.Query("Name")
if name == "" { if name == "" {
ctx.Error(500, fmt.Sprintf("name or version is null.")) ctx.Error(500, fmt.Sprintf("name or version is null."))
@@ -169,6 +173,10 @@ func SaveNewNameModel(ctx *context.Context) {
} }


func SaveModel(ctx *context.Context) { func SaveModel(ctx *context.Context) {
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) {
ctx.Error(403, ctx.Tr("repo.model_noright"))
return
}
log.Info("save model start.") log.Info("save model start.")
JobId := ctx.Query("JobId") JobId := ctx.Query("JobId")
VersionName := ctx.Query("VersionName") VersionName := ctx.Query("VersionName")
@@ -177,16 +185,8 @@ func SaveModel(ctx *context.Context) {
label := ctx.Query("Label") label := ctx.Query("Label")
description := ctx.Query("Description") description := ctx.Query("Description")
engine := ctx.QueryInt("Engine") engine := ctx.QueryInt("Engine")
trainTaskCreate := ctx.QueryBool("trainTaskCreate")
modelSelectedFile := ctx.Query("modelSelectedFile") modelSelectedFile := ctx.Query("modelSelectedFile")
log.Info("engine=" + fmt.Sprint(engine) + " modelSelectedFile=" + modelSelectedFile) log.Info("engine=" + fmt.Sprint(engine) + " modelSelectedFile=" + modelSelectedFile)
if !trainTaskCreate {
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) {
//ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
ctx.JSON(403, ctx.Tr("repo.model_noright"))
return
}
}


if JobId == "" || VersionName == "" { if JobId == "" || VersionName == "" {
ctx.Error(500, fmt.Sprintf("JobId or VersionName is null.")) ctx.Error(500, fmt.Sprintf("JobId or VersionName is null."))


+ 2
- 2
templates/repo/cloudbrain/inference/new.tmpl View File

@@ -421,7 +421,7 @@
identifier : 'display_job_name', identifier : 'display_job_name',
rules: [ rules: [
{ {
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[^-]$/]',
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[a-zA-Z0-9_]$/]',
} }
] ]
}, },
@@ -472,9 +472,9 @@
document.getElementById("mask").style.display = "none" document.getElementById("mask").style.display = "none"
} }
} }
validate();
$('.ui.create_train_job.green.button').click(function(e) { $('.ui.create_train_job.green.button').click(function(e) {
send_run_para() send_run_para()
get_name() get_name()
validate()
}) })
</script> </script>

+ 21
- 0
templates/repo/cloudbrain/new.tmpl View File

@@ -294,6 +294,27 @@
context.value = '' context.value = ''
$(".icon.icons").css("visibility", "hidden") $(".icon.icons").css("visibility", "hidden")
} }
function validate(){
$('.ui.form').form({
on: 'blur',
fields: {
display_job_name:{
identifier : 'display_job_name',
rules: [
{
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]',
}
]
},
},
onSuccess: function(){
},
onFailure: function(e){
return false;
}
})
}
validate();
form.onsubmit = function (e) { form.onsubmit = function (e) {
let value_task = $("input[name='display_job_name']").val() let value_task = $("input[name='display_job_name']").val()
let value_image = $("input[name='image']").val() let value_image = $("input[name='image']").val()


+ 2
- 2
templates/repo/cloudbrain/trainjob/new.tmpl View File

@@ -483,9 +483,9 @@
$("input#ai_flaver_name").val(name2) $("input#ai_flaver_name").val(name2)


} }
validate();
$('.ui.create_train_job.green.button').click(function (e) { $('.ui.create_train_job.green.button').click(function (e) {
get_name() get_name()
send_run_para()
validate()
send_run_para()
}) })
</script> </script>

+ 1
- 0
templates/repo/debugjob/index.tmpl View File

@@ -427,6 +427,7 @@
{{if .CanDebug}} {{if .CanDebug}}
<a id="model-image-{{.Cloudbrain.ID}}" <a id="model-image-{{.Cloudbrain.ID}}"
class='imageBtn ui basic {{if ne .Status "RUNNING"}}disabled {{else}}blue {{end}}button' class='imageBtn ui basic {{if ne .Status "RUNNING"}}disabled {{else}}blue {{end}}button'
target="_blank"
href="{{$.RepoLink}}/cloudbrain/{{.Cloudbrain.ID}}/commit_image">{{$.i18n.Tr "repo.submit_image"}}</a> href="{{$.RepoLink}}/cloudbrain/{{.Cloudbrain.ID}}/commit_image">{{$.i18n.Tr "repo.submit_image"}}</a>
{{else}} {{else}}
<a <a


+ 1
- 1
templates/repo/grampus/trainjob/gpu/new.tmpl View File

@@ -433,9 +433,9 @@
$("input#ai_flavor_name").val(name2) $("input#ai_flavor_name").val(name2)


} }
validate();
$('.ui.create_train_job.green.button').click(function(e) { $('.ui.create_train_job.green.button').click(function(e) {
get_name() get_name()
send_run_para() send_run_para()
validate()
}) })
</script> </script>

+ 1
- 1
templates/repo/grampus/trainjob/npu/new.tmpl View File

@@ -425,9 +425,9 @@
$("input#trainjob_work_server_num").val(val_server_num_select) $("input#trainjob_work_server_num").val(val_server_num_select)


} }
validate();
$('.ui.create_train_job.green.button').click(function(e) { $('.ui.create_train_job.green.button').click(function(e) {
get_name() get_name()
send_run_para() send_run_para()
validate()
}) })
</script> </script>

+ 1
- 1
templates/repo/migrate.tmpl View File

@@ -11,7 +11,7 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}"> <div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
<label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label> <label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required autocomplete="off" />
<span class="help"> <span class="help">
{{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}} {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}
<br/>{{.i18n.Tr "repo.migrate.migrate_items_options"}} <br/>{{.i18n.Tr "repo.migrate.migrate_items_options"}}


+ 2
- 2
templates/repo/modelarts/inferencejob/new.tmpl View File

@@ -438,7 +438,7 @@
identifier : 'display_job_name', identifier : 'display_job_name',
rules: [ rules: [
{ {
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[^-]$/]',
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[a-zA-Z0-9_]$/]',
} }
] ]
}, },
@@ -489,9 +489,9 @@
document.getElementById("mask").style.display = "none" document.getElementById("mask").style.display = "none"
} }
} }
validate();
$('.ui.create_train_job.green.button').click(function(e) { $('.ui.create_train_job.green.button').click(function(e) {
send_run_para() send_run_para()
get_name() get_name()
validate()
}) })
</script> </script>

+ 22
- 0
templates/repo/modelarts/notebook/new.tmpl View File

@@ -110,6 +110,28 @@


$('#messageInfo').css('display','none') $('#messageInfo').css('display','none')


function validate(){
$('.ui.form').form({
on: 'blur',
fields: {
display_job_name:{
identifier : 'display_job_name',
rules: [
{
type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,36}$/]',
}
]
},
},
onSuccess: function(){
},
onFailure: function(e){
return false;
}
})
}
validate();

form.onsubmit = function(e){ form.onsubmit = function(e){
let value_task = $("input[name='display_job_name']").val() let value_task = $("input[name='display_job_name']").val()




+ 1
- 1
templates/repo/modelarts/trainjob/new.tmpl View File

@@ -500,9 +500,9 @@
$("input#trainjob_work_server_num").val(val_server_num_select) $("input#trainjob_work_server_num").val(val_server_num_select)


} }
validate();
$('.ui.create_train_job.green.button').click(function (e) { $('.ui.create_train_job.green.button').click(function (e) {
get_name() get_name()
send_run_para() send_run_para()
validate()
}) })
</script> </script>

+ 2
- 1
templates/repo/modelmanage/index.tmpl View File

@@ -6,7 +6,8 @@
text-align: right; text-align: right;
} }
.inline .ui.dropdown .text { .inline .ui.dropdown .text {
color: rgba(0, 0, 0, .87) !important
color: rgba(0, 0, 0, .87) !important;
max-width: 360px;
} }
.newtext{ .newtext{
left: 15px !important left: 15px !important


+ 9
- 7
web_src/js/components/Model.vue View File

@@ -6,7 +6,7 @@
ref="table" ref="table"
:data="tableData" :data="tableData"
style="min-width: 100%" style="min-width: 100%"
row-key="ID"
row-key="rowKey"
lazy lazy
:load="load" :load="load"
:tree-props="{children: 'Children', hasChildren: 'hasChildren'}" :tree-props="{children: 'Children', hasChildren: 'hasChildren'}"
@@ -171,6 +171,7 @@ export default {
tableData[i].EngineName = this.getEngineName(tableData[i]) tableData[i].EngineName = this.getEngineName(tableData[i])
tableData[i].ComputeResource = TrainTaskInfo.ComputeResource tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
tableData[i].cName=tableData[i].Name tableData[i].cName=tableData[i].Name
tableData[i].rowKey = tableData[i].ID + Math.random()
tableData[i].Name='' tableData[i].Name=''
tableData[i].VersionCount = '' tableData[i].VersionCount = ''
tableData[i].Children = true tableData[i].Children = true
@@ -310,18 +311,18 @@ export default {
const store = this.$refs.table.store const store = this.$refs.table.store
if(!this.loadNodeMap.get(row.cName)){ if(!this.loadNodeMap.get(row.cName)){
const parent = store.states.data const parent = store.states.data
const index = parent.findIndex(child => child.ID == row.ID)
const index = parent.findIndex(child => child.rowKey == row.rowKey)
this.getModelList() this.getModelList()
}else{ }else{
let {tree,treeNode,resolve} = this.loadNodeMap.get(row.cName) let {tree,treeNode,resolve} = this.loadNodeMap.get(row.cName)
const keys = Object.keys(store.states.lazyTreeNodeMap); const keys = Object.keys(store.states.lazyTreeNodeMap);
if(keys.includes(row.ID)){
if(keys.includes(row.rowKey)){
this.getModelList() this.getModelList()
}else{ }else{
let parentRow = store.states.data.find(child => child.cName == row.cName); let parentRow = store.states.data.find(child => child.cName == row.cName);
let childrenIndex = store.states.lazyTreeNodeMap[parentRow.ID].findIndex(child => child.ID == row.ID)
let childrenIndex = store.states.lazyTreeNodeMap[parentRow.rowKey].findIndex(child => child.rowKey == row.rowKey)
parentRow.VersionCount = parentRow.VersionCount-1 parentRow.VersionCount = parentRow.VersionCount-1
const parent = store.states.lazyTreeNodeMap[parentRow.ID]
const parent = store.states.lazyTreeNodeMap[parentRow.rowKey]
if(parent.length===1){ if(parent.length===1){
this.getModelList() this.getModelList()
}else{ }else{
@@ -379,8 +380,8 @@ export default {
} }
}, },
getModelList(){ getModelList(){
try {
this.$refs.table.store.states.lazyTreeNodeMap = {}
try {
this.loadNodeMap.clear();
this.$axios.get(location.href+'_api',{ this.$axios.get(location.href+'_api',{
params:this.params params:this.params
}).then((res)=>{ }).then((res)=>{
@@ -391,6 +392,7 @@ export default {
for(let i=0;i<this.tableData.length;i++){ for(let i=0;i<this.tableData.length;i++){
TrainTaskInfo = JSON.parse(this.tableData[i].TrainTaskInfo) TrainTaskInfo = JSON.parse(this.tableData[i].TrainTaskInfo)
this.tableData[i].cName=this.tableData[i].Name this.tableData[i].cName=this.tableData[i].Name
this.tableData[i].rowKey=this.tableData[i].ID + Math.random()
this.tableData[i].EngineName = this.getEngineName(this.tableData[i]) this.tableData[i].EngineName = this.getEngineName(this.tableData[i])
this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource this.tableData[i].ComputeResource = TrainTaskInfo.ComputeResource
this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true this.tableData[i].hasChildren = res.data.data[i].VersionCount===1 ? false : true


+ 33
- 7
web_src/js/components/images/Images.vue View File

@@ -215,16 +215,16 @@
<div style="display:flex;align-items: center;justify-content: center;"> <div style="display:flex;align-items: center;justify-content: center;">
<span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">私有</span> <span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">私有</span>
<span v-else style="color: rgb(19, 194, 141);">公开</span> <span v-else style="color: rgb(19, 194, 141);">公开</span>
<el-tooltip class="item" effect="dark" content="镜像提交中..." placement="top">
<i v-if="scope.row.status===0" class="CREATING" style="margin-left:0.3rem"></i>
<el-tooltip v-if="scope.row.status===0" class="item" effect="dark" content="镜像提交中..." placement="top">
<i class="CREATING" style="margin-left:0.3rem"></i>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="检测提交镜像是否大小超过20G!" placement="top">
<i v-if="scope.row.status===2" class="FAILED" style="margin-left:0.3rem"></i>
<el-tooltip v-if="scope.row.status===2" class="item" effect="dark" content="检测提交镜像是否大小超过20G!" placement="top">
<i class="FAILED" style="margin-left:0.3rem"></i>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="镜像提交成功" placement="top">
<i v-if="scope.row.status===1" class="SUCCEEDED" style="margin-left:0.3rem"></i>
<el-tooltip v-if="scope.row.status===1" class="item" effect="dark" content="镜像提交成功" placement="top">
<i class="SUCCEEDED" style="margin-left:0.3rem"></i>
</el-tooltip> </el-tooltip>
</div> </div>
@@ -473,6 +473,7 @@ export default {
tableDataCustom: [], tableDataCustom: [],
starCustom:[], starCustom:[],
loadingCustom:false, loadingCustom:false,
refreshCustomTimer: null,


currentPageStar:1, currentPageStar:1,
pageSizeStar:10, pageSizeStar:10,
@@ -485,6 +486,7 @@ export default {
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
this.search = '' this.search = ''
this.stopImageListCustomRefresh();
if(tab.name=="first"){ if(tab.name=="first"){
this.paramsPublic.q = '' this.paramsPublic.q = ''
this.getImageListPublic() this.getImageListPublic()
@@ -560,9 +562,31 @@ export default {
}); });
this.loadingCustom = false this.loadingCustom = false
this.getImageListCustomRefresh()
}) })
}, },


getImageListCustomRefresh() {
this.stopImageListCustomRefresh();
this.refreshCustomTimer = setInterval(() => {
this.tableDataCustom.forEach(item => {
if (item.status === 0) {
this.$axios.get(`/image/${item.id}`, {}).then((res) => {
const newData = res.data;
this.tableDataCustom.forEach(it => {
if (it.id === newData.id) {
it.status = newData.status;
}
});
})
}
});
}, 5000);
},

stopImageListCustomRefresh() {
this.refreshCustomTimer && clearInterval(this.refreshCustomTimer);
},
getImageListStar(){ getImageListStar(){
this.loadingStar = true this.loadingStar = true
this.$axios.get('/explore/images/star',{ this.$axios.get('/explore/images/star',{
@@ -715,8 +739,10 @@ export default {
else{ else{
this.getImageListPublic() this.getImageListPublic()
} }
},
beforeDestroy() {
this.stopImageListCustomRefresh();
} }

}; };
</script> </script>




+ 3
- 3
web_src/js/index.js View File

@@ -2950,13 +2950,13 @@ $(document).ready(async () => {
} }


const $cloneAddr = $("#clone_addr"); const $cloneAddr = $("#clone_addr");
$cloneAddr.on("change", () => {
$cloneAddr.on("input change", () => {
const $repoName = $("#alias"); const $repoName = $("#alias");
const $owner = $("#ownerDropdown div.text").attr("title"); const $owner = $("#ownerDropdown div.text").attr("title");
const $urlAdd = const $urlAdd =
location.href.split("/")[0] + "//" + location.href.split("/")[2]; location.href.split("/")[0] + "//" + location.href.split("/")[2];
if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) {
// Only modify if repo_name input is blank
if ($cloneAddr.val().length > 0 /* && $repoName.val().length === 0 */) {
// modify when clone address change
const repoValue = $cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]; const repoValue = $cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3];
$repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]); $repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]);
$.get( $.get(


Loading…
Cancel
Save