@@ -764,6 +764,7 @@ func trainJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModelArts | |||
ctx.Data["bootFile"] = form.BootFile | |||
ctx.Data["uuid"] = form.Attachment | |||
ctx.Data["branch_name"] = form.BranchName | |||
ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||
return nil | |||
} | |||
@@ -954,6 +955,7 @@ func versionErrorDataPrepare(ctx *context.Context, form auth.CreateModelArtsTrai | |||
return err | |||
} | |||
ctx.Data["config_list"] = configList.ParaConfigs | |||
ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||
return nil | |||
} | |||
@@ -2175,6 +2177,7 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel | |||
ctx.Data["model_version"] = form.ModelVersion | |||
ctx.Data["ckpt_name"] = form.CkptName | |||
ctx.Data["train_url"] = form.TrainUrl | |||
ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo | |||
return nil | |||
} | |||
@@ -118,6 +118,20 @@ | |||
.diy-popper { | |||
max-width: 400px; | |||
} | |||
.ascending { | |||
width: 0; | |||
height: 0; | |||
border: 5px solid transparent; | |||
border-bottom-color: #c0c4cc; | |||
} | |||
.descending { | |||
width: 0; | |||
height: 0; | |||
border: 5px solid transparent; | |||
border-top-color: #c0c4cc; | |||
} | |||
</style> | |||
<div class="repository"> | |||
{{template "repo/header" .}} | |||
@@ -213,21 +227,24 @@ | |||
<div class="ui grid stackable" style="background: #f0f0f0;;"> | |||
<div class="row"> | |||
<!-- 数据集名称 --> | |||
<div class="four wide column name_sort" @click="sortAble('name')" style="width: 24% !important;"> | |||
<div class="four wide column name_sort" @click="sortAble('name')" | |||
style="width: 24% !important;cursor: pointer;"> | |||
{{$.i18n.Tr "dataset.dataset_file_name"}} | |||
<span class="caret-wrapper"> | |||
<i class='ri-arrow-up-s-fill sort-caret-up {{if eq .SortType "nameAsc"}} active-sort {{end}}'></i> | |||
<i | |||
class='ri-arrow-down-s-fill sort-caret-down {{if eq .SortType "nameDesc"}} active-sort {{end}}'></i> | |||
<i class='ascending sort-caret-up {{if eq .SortType "nameAsc"}} active-up-sort {{end}}' | |||
@click.stop="sortIcon('name','up')"></i> | |||
<i class='descending sort-caret-down {{if eq .SortType "nameDesc"}} active-down-sort {{end}}' | |||
@click.stop="sortIcon('name','down')"></i> | |||
</span> | |||
</div> | |||
<div class="one wide column text center size_sort" @click="sortAble('size')" | |||
style="width: 7.25% !important;"> | |||
style="width: 7.25% !important;cursor: pointer;"> | |||
{{$.i18n.Tr "repo.model.manage.size"}} | |||
<span class="caret-wrapper"> | |||
<i class='ri-arrow-up-s-fill sort-caret-up {{if eq .SortType "sizeAsc"}} active-sort {{end}}'></i> | |||
<i | |||
class='ri-arrow-down-s-fill sort-caret-down {{if eq .SortType "sizeDesc"}} active-sort {{end}}'></i> | |||
<i class='ascending sort-caret-up {{if eq .SortType "sizeAsc"}} active-up-sort {{end}}' | |||
@click.stop="sortIcon('size','up')"></i> | |||
<i class='descending sort-caret-down {{if eq .SortType "sizeDesc"}} active-down-sort {{end}}' | |||
@click.stop="sortIcon('size','down')"></i> | |||
</span> | |||
</div> | |||
<div class="two wide column text center"> | |||
@@ -239,12 +256,13 @@ | |||
<div class="one wide column text center"> | |||
{{$.i18n.Tr "repo.cloudbrain_creator"}} | |||
</div> | |||
<div class="three wide column text center" @click="sortAble('time')"> | |||
<div class="three wide column text center" @click="sortAble('time')" style="cursor: pointer;"> | |||
{{$.i18n.Tr "dataset.dataset_upload_time"}} | |||
<span class="caret-wrapper"> | |||
<i class='ri-arrow-up-s-fill sort-caret-up {{if eq .SortType "timeAsc"}} active-sort {{end}}'></i> | |||
<i | |||
class='ri-arrow-down-s-fill sort-caret-down {{if eq .SortType "timeDesc"}} active-sort {{end}}'></i> | |||
<i class='ascending sort-caret-up {{if eq .SortType "timeAsc"}} active-up-sort {{end}}' | |||
@click.stop="sortIcon('time','up')"></i> | |||
<i class='descending sort-caret-down {{if eq .SortType "timeDesc"}} active-down-sort {{end}}' | |||
@click.stop="sortIcon('time','down')"></i> | |||
</span> | |||
</div> | |||
<div class="four wide column text center"> | |||
@@ -1,86 +1,93 @@ | |||
<template> | |||
<div style="width: 100%;"> | |||
<div id = "pro_main"> | |||
<div id="pro_main"> | |||
<div style="margin-top: 10px;"> | |||
<b class="pro_item">云脑分析</b> <span class="update_time">数据更新时间:</span> <span style="font-size: 12px;">{{lastUpdatedTime}} / 从有记录起开始统计</span> | |||
<b class="pro_item">云脑分析</b> <span class="update_time">数据更新时间:</span> <span | |||
style="font-size: 12px;">{{lastUpdatedTime}} / 从有记录起开始统计</span> | |||
</div> | |||
<bar-label :width="'95%'" :height="'500px'"></bar-label> | |||
<div style="margin-top: 20px;"> | |||
<span class="sta_iterm">统计周期:</span> | |||
<button type="button" class='btnLast' id = "all" v-bind:class="{colorChange:7==dynamic}" @click="resetPage(),getAllProList('all',7)">所有</button> | |||
<span class="sta_iterm">统计周期:</span> | |||
<button type="button" class='btnLast' id="all" v-bind:class="{colorChange:7==dynamic}" | |||
@click="resetPage(),getAllProList('all',7)">所有</button> | |||
<span style="float:right; margin-right: 20px;"> | |||
<div style="display:inline-block;margin-left: 40px; "> | |||
<a class="el-icon-download" v-if="tableData!=''" :href= "'../api/v1/cloudbrainboard/downloadAll'"></a> | |||
<i class="el-icon-download" v-else="tableData=''" href="#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'></i> | |||
<a class="el-icon-download" v-if="tableData!=''" | |||
:href="'/api/v1/cloudbrainboard/downloadAll'"></a> | |||
<i class="el-icon-download" v-else="tableData=''" href="#" | |||
style="color:rgba(187, 187, 187, 100);" @click='popMark()'></i> | |||
<!-- <span ><a id = "download_file" :href= "'../api/v1/projectboard/downloadAll'" >下载报告</a> </span> --> | |||
<span > | |||
<a id = "download_file" v-if="tableData!=''" :href= "'../api/v1/cloudbrainboard/downloadAll'">下载报告</a> | |||
<a id = "download_file" v-else="tableData=''" href= "#" style="color:rgba(187, 187, 187, 100);" @click='popMark()'>下载报告</a> | |||
<span> | |||
<a id="download_file" v-if="tableData!=''" | |||
:href="'/api/v1/cloudbrainboard/downloadAll'">下载报告</a> | |||
<a id="download_file" v-else="tableData=''" href="#" style="color:rgba(187, 187, 187, 100);" | |||
@click='popMark()'>下载报告</a> | |||
</span> | |||
</div> | |||
</div> | |||
</span> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
// import barLabel from './basic/barLabel.vue'; | |||
const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | |||
</template> | |||
<script> | |||
// import barLabel from './basic/barLabel.vue'; | |||
const { AppSubUrl, StaticUrlPrefix, csrf } = window.config; | |||
import { export2Excel } from '../excel/util.js' | |||
export default{ | |||
name:'ProAnalysis', | |||
components: { | |||
// barLabel, | |||
import { export2Excel } from '../excel/util.js' | |||
export default { | |||
name: 'ProAnalysis', | |||
components: { | |||
// barLabel, | |||
}, | |||
methods: { | |||
popMark() { | |||
alert("数据为空时,不能下载!") | |||
}, | |||
methods: { | |||
popMark(){ | |||
exportData() { | |||
// this.getOneProList(this.pro_id,'all',true,7) | |||
// this.getOneProList(this.pro_id,'all',false,7) | |||
// this.fileName() | |||
if (this.tableDataID != '') { | |||
this.currentPage = 1 | |||
var saveFileName = this.getFileName() | |||
export2Excel(this.columns, this.tableDataID, saveFileName) | |||
} else { | |||
alert("数据为空时,不能下载!") | |||
}, | |||
exportData(){ | |||
// this.getOneProList(this.pro_id,'all',true,7) | |||
// this.getOneProList(this.pro_id,'all',false,7) | |||
// this.fileName() | |||
if (this.tableDataID!=''){ | |||
this.currentPage=1 | |||
var saveFileName = this.getFileName() | |||
export2Excel(this.columns,this.tableDataID,saveFileName) | |||
}else{ | |||
alert("数据为空时,不能下载!") | |||
} | |||
}, | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped> | |||
.pro_item{ | |||
font-size: 16px; | |||
color: rgba(16, 16, 16, 100); | |||
font-family: SourceHanSansSC-bold; | |||
} | |||
.update_time{ | |||
line-height: 17px; | |||
font-size: 12px; | |||
color:rgba(187, 187, 187, 100); | |||
margin-left: 10px; | |||
} | |||
.btnLast{ | |||
line-height: 1.5; | |||
margin: -3.5px; | |||
border: 1px solid rgba(22, 132, 252, 100); | |||
/* border-right: none; */ | |||
background: #FFFF; | |||
color: #1684FC; | |||
width: 60px; | |||
height: 30px; | |||
border-radius:0px 4px 4px 0px; | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped> | |||
.pro_item { | |||
font-size: 16px; | |||
color: rgba(16, 16, 16, 100); | |||
font-family: SourceHanSansSC-bold; | |||
} | |||
.update_time { | |||
line-height: 17px; | |||
font-size: 12px; | |||
color: rgba(187, 187, 187, 100); | |||
margin-left: 10px; | |||
} | |||
</style> | |||
.btnLast { | |||
line-height: 1.5; | |||
margin: -3.5px; | |||
border: 1px solid rgba(22, 132, 252, 100); | |||
/* border-right: none; */ | |||
background: #FFFF; | |||
color: #1684FC; | |||
width: 60px; | |||
height: 30px; | |||
border-radius: 0px 4px 4px 0px; | |||
} | |||
</style> |
@@ -4080,16 +4080,53 @@ function initVueDataset() { | |||
location.href = `${location.href}&sort=${dom}Asc` | |||
} | |||
else if (params.get('sort') === `${dom}Desc` || params.get('sort').indexOf(`${dom}`) === -1) { | |||
params.delete('sort') | |||
let asc = params.toString() + `&sort=${dom}Asc` | |||
params.set("sort", `${dom}Asc`) | |||
let asc = params.toString() | |||
location.search = asc | |||
} | |||
else { | |||
params.delete('sort') | |||
let desc = params.toString() + `&sort=${dom}Desc` | |||
params.set("sort", `${dom}Desc`) | |||
let desc = params.toString() | |||
location.search = desc | |||
} | |||
}, | |||
sortIcon(dom, sort) { | |||
const params = new URLSearchParams(location.search) | |||
if (sort === "up") { | |||
if (params.toString() === '') { | |||
location.href = `${location.href}?sort=${dom}Asc` | |||
} | |||
else if (!params.get('sort')) { | |||
location.href = `${location.href}&sort=${dom}Asc` | |||
} else if (params.get('sort') && params.get('sort').indexOf(`${dom}Asc`) !== -1) { | |||
params.delete('sort') | |||
location.search = params.toString() | |||
} else { | |||
params.set("sort", `${dom}Asc`) | |||
let asc = params.toString() | |||
location.search = asc | |||
} | |||
} | |||
else if (sort === "down") { | |||
if (params.toString() === '') { | |||
location.href = `${location.href}?sort=${dom}Desc` | |||
} | |||
else if (!params.get('sort')) { | |||
location.href = `${location.href}&sort=${dom}Desc` | |||
} | |||
else if (params.get('sort') && params.get('sort').indexOf(`${dom}Desc`) !== -1) { | |||
params.delete('sort') | |||
location.search = params.toString() | |||
} else { | |||
params.set("sort", `${dom}Desc`) | |||
let asc = params.toString() | |||
location.search = asc | |||
} | |||
} | |||
}, | |||
setPrivate(uuid, privateFlag, index) { | |||
const params = { _csrf: csrf, file: uuid, is_private: privateFlag } | |||
this.$axios.post('/attachments/private', this.qs.stringify(params)).then((res) => { | |||
@@ -1079,17 +1079,19 @@ display: block; | |||
.row .sort-caret-up { | |||
position: absolute; | |||
top: 5px; | |||
color: #c0c4cc; | |||
font-size: 18px; | |||
} | |||
.row .sort-caret-down { | |||
position: absolute; | |||
bottom: 3px; | |||
color: #c0c4cc; | |||
font-size: 18px; | |||
bottom: 5px; | |||
} | |||
.row .active-up-sort { | |||
border-bottom-color: #409eff; | |||
} | |||
.row .active-sort { | |||
color: #409eff !important; | |||
.row .active-down-sort { | |||
border-top-color: #409eff; | |||
} |