-
+
{{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}
{{.i18n.Tr "repo.migrate.migrate_items_options"}}
diff --git a/templates/repo/modelarts/inferencejob/new.tmpl b/templates/repo/modelarts/inferencejob/new.tmpl
index 89f4180c0..91d856bf7 100644
--- a/templates/repo/modelarts/inferencejob/new.tmpl
+++ b/templates/repo/modelarts/inferencejob/new.tmpl
@@ -438,7 +438,7 @@
identifier : 'display_job_name',
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"
}
}
+ validate();
$('.ui.create_train_job.green.button').click(function(e) {
send_run_para()
get_name()
- validate()
})
diff --git a/templates/repo/modelarts/notebook/new.tmpl b/templates/repo/modelarts/notebook/new.tmpl
index 6ab16f941..b81bdfdec 100755
--- a/templates/repo/modelarts/notebook/new.tmpl
+++ b/templates/repo/modelarts/notebook/new.tmpl
@@ -110,6 +110,28 @@
$('#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){
let value_task = $("input[name='display_job_name']").val()
diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl
index e89482dc2..26c57327d 100755
--- a/templates/repo/modelarts/trainjob/new.tmpl
+++ b/templates/repo/modelarts/trainjob/new.tmpl
@@ -500,9 +500,9 @@
$("input#trainjob_work_server_num").val(val_server_num_select)
}
+ validate();
$('.ui.create_train_job.green.button').click(function (e) {
get_name()
send_run_para()
- validate()
})
\ No newline at end of file
diff --git a/web_src/js/components/images/Images.vue b/web_src/js/components/images/Images.vue
index 456bf27e9..84f39b752 100755
--- a/web_src/js/components/images/Images.vue
+++ b/web_src/js/components/images/Images.vue
@@ -215,16 +215,16 @@
私有
公开
-
-
+
+
-
-
+
+
-
-
+
+
@@ -473,6 +473,7 @@ export default {
tableDataCustom: [],
starCustom:[],
loadingCustom:false,
+ refreshCustomTimer: null,
currentPageStar:1,
pageSizeStar:10,
@@ -485,6 +486,7 @@ export default {
methods: {
handleClick(tab, event) {
this.search = ''
+ this.stopImageListCustomRefresh();
if(tab.name=="first"){
this.paramsPublic.q = ''
this.getImageListPublic()
@@ -560,9 +562,31 @@ export default {
});
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(){
this.loadingStar = true
this.$axios.get('/explore/images/star',{
@@ -715,8 +739,10 @@ export default {
else{
this.getImageListPublic()
}
+ },
+ beforeDestroy() {
+ this.stopImageListCustomRefresh();
}
-
};
diff --git a/web_src/js/index.js b/web_src/js/index.js
index 53dba8a88..ce859e4df 100755
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -2950,13 +2950,13 @@ $(document).ready(async () => {
}
const $cloneAddr = $("#clone_addr");
- $cloneAddr.on("change", () => {
+ $cloneAddr.on("input change", () => {
const $repoName = $("#alias");
const $owner = $("#ownerDropdown div.text").attr("title");
const $urlAdd =
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];
$repoName.val($cloneAddr.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3]);
$.get(