diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 48a010b73..d58a61756 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -778,8 +778,6 @@ datasets = Datasets
datasets.desc = Enable Dataset
cloudbrain_helper=Use GPU/NPU resources to open notebooks, model training tasks, etc.
-model_manager = Model
-
debug=Debug
stop=Stop
delete=Delete
@@ -897,7 +895,7 @@ model.manage.Accuracy = Accuracy
model.manage.F1 = F1
model.manage.Precision = Precision
model.manage.Recall = Recall
-
+model.manage.sava_model = Sava Model
template.items = Template Items
template.git_content = Git Content (Default Branch)
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 1eee752a1..45cabda8f 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -907,6 +907,7 @@ model.manage.Accuracy = 准确率
model.manage.F1 = F1值
model.manage.Precision = 精确率
model.manage.Recall = 召回率
+model.manage.sava_model = 保存模型
template.items=模板选项
template.git_content=Git数据(默认分支)
diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl
index c794e8215..ce6f25287 100644
--- a/templates/repo/modelmanage/index.tmpl
+++ b/templates/repo/modelmanage/index.tmpl
@@ -123,7 +123,7 @@
@@ -169,6 +169,7 @@
$('#choice_model').dropdown('clear')
$('#choice_version').dropdown('clear')
$('.ui.dimmer').css({"background-color":""})
+ $('.ui.error.message').text()
$('.ui.error.message').css('display','none')
}
@@ -211,7 +212,6 @@
}
$("#job-name").append(train_html)
$(".ui.dropdown.selection.search.width83").removeClass("loading")
-
$('#choice_model .default.text').text(data[0].JobName)
$('#choice_model input[name="JobId"]').val(data[0].JobID)
loadTrainVersion()
@@ -227,10 +227,13 @@
train_html += `${data[i].VersionName}
`
train_html += ''
}
- $("#job-version").append(train_html)
- $(".ui.dropdown.selection.search.width70").removeClass("loading")
- $('#choice_version .default.text').text(data[0].VersionName)
- $('#choice_version input[name="VersionName"]').val(data[0].VersionName)
+ if(data.length){
+ $("#job-version").append(train_html)
+ $(".ui.dropdown.selection.search.width70").removeClass("loading")
+ $('#choice_version .default.text').text(data[0].VersionName)
+ $('#choice_version input[name="VersionName"]').val(data[0].VersionName)
+ }
+
})
}
diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl
index f416347d3..0ce08d899 100644
--- a/templates/repo/modelmanage/showinfo.tmpl
+++ b/templates/repo/modelmanage/showinfo.tmpl
@@ -221,6 +221,7 @@ function tranSize(value){
function editorFn(context){
let id= context.dataset.id
let text = context.dataset.desc
+ console.log(id,text)
$('#edit-td').replaceWith("
");
}
diff --git a/web_src/js/components/Model.vue b/web_src/js/components/Model.vue
index f87c78a36..d02c96a1c 100644
--- a/web_src/js/components/Model.vue
+++ b/web_src/js/components/Model.vue
@@ -96,7 +96,7 @@
>
-
+
@@ -141,6 +141,7 @@ export default {
},
data() {
return {
+
currentPage:1,
pageSize:10,
totalNum:0,
@@ -149,29 +150,36 @@ export default {
url:'',
isLoading:true,
loadNodeMap:new Map(),
- submitId:{}
+ submitId:{},
+ defaultAvatar:'/user/avatar/Ghost/-1',
+ data:''
};
},
methods: {
load(tree, treeNode, resolve) {
- this.loadNodeMap.set(tree.cName, {tree,treeNode,resolve})
- this.$axios.get(this.url+'show_model_child_api',{params:{
- name:tree.cName
- }}).then((res)=>{
- let TrainTaskInfo
- let tableData
- tableData= res.data
- for(let i=0;i{
+ let TrainTaskInfo
+ let tableData
+ tableData= res.data
+ for(let i=0;i{
+ // console.log(res)
+ // let initLabel = $("input[name='Label']").val()
+ // let addLabel=res.data[0].Label + ' ' + initLabel
+ // $("input[name='Label']").val(addLabel)
+ // this.data = $("#formId").serialize()
+ // })
+ // },
submit(){
let context = this
let flag= this.check()
if(flag){
- let data = $("#formId").serialize()
let cName = $("input[name='Name']").val()
- let row = {cName:cName}
+ let version = $("input[name='Version']").val()
+ // if(!(version==='0.0.1')){
+ // context.getFirstChildLabel(cName)
+ // }else{
+ // context.data = $("#formId").serialize()
+ // }
+ // console.log(context.data)
+ let data = $("#formId").serialize()
$("#mask").css({"display":"block","z-index":"9999"})
$.ajax({
url:url_href,
type:'POST',
data:data,
success:function(res){
+ // context.loadrefresh1(row)
context.getModelList()
- context.loadrefresh(row)
$('.ui.modal.second').modal('hide')
},
error: function(xhr){
@@ -274,20 +304,32 @@ export default {
}
},
loadrefresh(row){
+ const store = this.$refs.table.store
if(!this.loadNodeMap.get(row.cName)){
- return
+ const parent = store.states.data
+ const index = parent.findIndex(child => child.ID == row.ID)
+ parent.splice(index, 1)
}else{
let {tree,treeNode,resolve} = this.loadNodeMap.get(row.cName)
- this.$set(
- this.$refs.table.store.states.lazyTreeNodeMap,
- tree.ID,
- [])
- this.load(tree,treeNode,resolve)
+ const keys = Object.keys(store.states.lazyTreeNodeMap);
+ if(keys.includes(row.ID)){
+ this.getModelList()
+ }else{
+ let parentRow = store.states.data.find(child => child.cName == row.cName);
+ let childrenIndex = store.states.lazyTreeNodeMap[parentRow.ID].findIndex(child => child.ID == row.ID)
+ parentRow.VersionCount = parentRow.VersionCount-1
+ const parent = store.states.lazyTreeNodeMap[parentRow.ID]
+ if(parent.length===1){
+ this.getModelList()
+ }else{
+ parent.splice(childrenIndex, 1);
+ }
+ }
}
},
deleteModel(id,name){
- let row={cName:name}
+ let row={cName:name,ID:id}
let _this = this
let flag=1
$('.ui.basic.modal.first')
@@ -300,8 +342,8 @@ export default {
params:{
ID:id
}}).then((res)=>{
- _this.getModelList()
_this.loadrefresh(row)
+ // _this.getModelList()
})
flag = true
},
@@ -315,24 +357,29 @@ export default {
})
.modal('show')
},
-
getModelList(){
- this.$axios.get(location.href+'_api',{
- params:this.params
- }).then((res)=>{
- $(".ui.grid").removeAttr("style")
- $("#loadContainer").removeClass("loader")
- let TrainTaskInfo
- this.tableData = res.data.data
- for(let i=0;i{
+ $(".ui.grid").removeAttr("style")
+ $("#loadContainer").removeClass("loader")
+ let TrainTaskInfo
+ this.tableData = res.data.data
+ for(let i=0;i