|
|
|
@@ -1,98 +1,49 @@ |
|
|
|
<style> |
|
|
|
.active{ |
|
|
|
color: #0087f5!important; |
|
|
|
border: 1px solid #0087f5!important; |
|
|
|
/* margin: -1px!important; */ |
|
|
|
background: #fff!important; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
{{template "base/head" .}} |
|
|
|
<div class="repository"> |
|
|
|
{{template "repo/header" .}} |
|
|
|
<div class="ui container"> |
|
|
|
<input type="hidden" id="postPath" value="{{.Link}}"> |
|
|
|
<div style="width: 80%;margin: auto;"> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
上传数据集文件 |
|
|
|
</h4> |
|
|
|
<div class="ui attached segment" style="padding: 2em 3em;"> |
|
|
|
<div class="ui form" id="dataset-base"> |
|
|
|
<el-form label-width="140px"> |
|
|
|
{{.CsrfTokenHtml}} |
|
|
|
<el-form-item label="存储位置:" prop="title"> |
|
|
|
<el-button :class="{active:type==0}" size="small" style="margin: 0;border-radius: 0.28571429rem 0 0 0.28571429rem;" @click="uploadGpu">CPU/GPU</el-button> |
|
|
|
<el-button :class="{active:type==1}" size="small" style="margin: 0 0 0 -4px;border-radius: 0 0.28571429rem 0.28571429rem 0;" @click="uploadNpu">NPU</el-button> |
|
|
|
<!-- <span>请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span> --> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="文件描述:" prop="description"> |
|
|
|
<el-input type="textarea" :rows="3" maxlength="255" v-model="desc"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="数据上传:" prop="category"> |
|
|
|
<minio-uploader :uploadtype="type" :desc="desc"></minio-uploader> |
|
|
|
<!-- <obs-uploader v-if="type==1"></obs-uploader> --> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<!-- <el-form-item label="研究方向/应用领域" prop="task"> |
|
|
|
<el-select v-model="ruleForm.task" placeholder="请选择活动区域" style="width: 60%;"> |
|
|
|
<el-option label="区域一" value="shanghai"></el-option> |
|
|
|
<el-option label="区域二" value="beijing"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
<!-- <el-form-item> |
|
|
|
<el-button style="background-color: #21ba45;" type="success" @click="createDataset('ruleForm')">确定</el-button> |
|
|
|
<el-button type="info" @click="cancelDataset">取消</el-button> |
|
|
|
</el-form-item> --> |
|
|
|
|
|
|
|
|
|
|
|
<div style='display:none;' |
|
|
|
id="minioUploader-params" |
|
|
|
data-uuid="{{.uuid}}" |
|
|
|
data-add-url="{{.Repo.OwnerName}}/attachments/add" |
|
|
|
data-accepts="{{.AttachmentAllowedTypes}}" |
|
|
|
data-remove-url="{{AppSubUrl}}/attachments/delete" |
|
|
|
data-csrf="{{.CsrfToken}}" |
|
|
|
dataset-id={{.dataset.ID}} |
|
|
|
data-max-file="100" |
|
|
|
data-dataset-id="{{.dataset.ID}}" |
|
|
|
data-max-size="{{.AttachmentMaxSize}}" |
|
|
|
data-default-message="{{.i18n.Tr "dropzone.default_message"}}" |
|
|
|
data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" |
|
|
|
data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" |
|
|
|
data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}" |
|
|
|
data-file-status='{{.i18n.Tr "dropzone.file_status"}}' |
|
|
|
data-file-init-status='{{.i18n.Tr "dropzone.file_init_status"}}' |
|
|
|
data-waitting-uploading='{{.i18n.Tr "dropzone.waitting_uploading"}}' |
|
|
|
data-md5-computing='{{.i18n.Tr "dropzone.md5_computing"}}' |
|
|
|
data-obs-connecting='{{.i18n.Tr "dropzone.obs-connecting"}}' |
|
|
|
data-loading-file='{{.i18n.Tr "dropzone.loading_file"}}' |
|
|
|
data-upload-complete='{{.i18n.Tr "dropzone.upload_complete"}}' |
|
|
|
data-uploading='{{.i18n.Tr "dropzone.uploading"}}' |
|
|
|
data-failed='{{.i18n.Tr "dropzone.failed"}}' |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/datasets' |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div id="datasetId" datasetId="{{.datasetId}}"></div> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="width: 80%;margin: auto;padding-top: 2em;"> |
|
|
|
<!-- <p>说明:<br> |
|
|
|
- 只有<span class="text blue">zip格式</span>zip格式的数据集才能发起云脑任务;<br> |
|
|
|
- 云脑1提供 <span class="text blue">CPU / GPU</span> 资源,云脑2提供 <span class="text blue">Ascend NPU</span> 资源;调试使用的数据集也需要上传到对应的环境。 |
|
|
|
</p> --> |
|
|
|
<p style="color: 505559;">说明:</p> |
|
|
|
<p style="line-height: 1.5;color: #101010;">只有<span class="text red">zip格式</span>的数据集才能发起云脑任务;</br> |
|
|
|
云脑1提供CPU / GPU资源,云脑2提供Ascend NPU资源;调试使用的数据集也需要上传到对应的环境;</p> |
|
|
|
|
|
|
|
<div id="mask"> |
|
|
|
<div id="loadingPage"> |
|
|
|
<div class="rect1"></div> |
|
|
|
<div class="rect2"></div> |
|
|
|
<div class="rect3"></div> |
|
|
|
<div class="rect4"></div> |
|
|
|
<div class="rect5"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{template "base/head" .}} |
|
|
|
<div class="repository"> |
|
|
|
{{template "repo/header" .}} |
|
|
|
<div class="ui container"> |
|
|
|
<input type="hidden" id="dataset-file-desc" value="{{.Attachment.Description}}"> |
|
|
|
<div style="width: 80%;margin: auto;"> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
修改数据集文件描述 |
|
|
|
</h4> |
|
|
|
<div class="ui attached segment" style="padding: 2em 3em;"> |
|
|
|
<div class="ui form" id="dataset-base"> |
|
|
|
<el-form label-width="140px"> |
|
|
|
{{.CsrfTokenHtml}} |
|
|
|
<el-form-item label="存储位置:" prop="title"> |
|
|
|
<span style="display: flex;color: #3291F8;"><i class="ri-archive-drawer-line" style="margin-right: 10px;"></i>NPU</span> |
|
|
|
<!-- <span>请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span> --> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="数据集文件:" prop="description"> |
|
|
|
<span>{{.Attachment.Name}}</span> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="文件描述:" prop="description"> |
|
|
|
<el-input type="textarea" :rows="3" maxlength="255" v-model="descfile"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button style="background-color: #21ba45;" type="success" @click="editDatasetFile({{.Attachment.ID}})">确定</el-button> |
|
|
|
<el-button type="info" @click="cancelDataset">取消</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
{{template "base/footer" .}} |
|
|
|
<script> |
|
|
|
console.log({{.datasetId}}) |
|
|
|
console.log({{.Repo}}) |
|
|
|
|
|
|
|
</div> |
|
|
|
{{template "base/footer" .}} |
|
|
|
<script> |
|
|
|
console.log({{.Attachment}}) |
|
|
|
|
|
|
|
</script> |