web: Call qr-std-upload
This commit is contained in:
parent
38ab815ba2
commit
81008a65b9
@ -44,15 +44,12 @@
|
||||
<CDropdown>
|
||||
<CDropdownToggle size="sm" color="secondary">操作</CDropdownToggle>
|
||||
<CDropdownMenu>
|
||||
<CDropdownItem v-if="true || e.status == 'imported'" href="javascript:void(0)" @click="show_feature_extract(e)">特征提取...</CDropdownItem>
|
||||
<CDropdownItem v-if="false" href="javascript:void(0)" @click="do_dup(e)">DUP</CDropdownItem>
|
||||
<CDropdownItem v-if="e.status == 'feature_extracted'" href="javascript:void(0)" @click="feature_upload(e)">特征上传</CDropdownItem>
|
||||
<CDropdownItem href="javascript:void(0)" @click="qr_std_upload(e)">
|
||||
备案到云
|
||||
</CDropdownItem>
|
||||
<CDropdownItem href="javascript:void(0)" @click="show_image_convert(e)">
|
||||
图像格式转换
|
||||
</CDropdownItem>
|
||||
<CDropdownItem href="javascript:void(0)" @click="archive_to_cloud(e)">
|
||||
归档到云
|
||||
</CDropdownItem>
|
||||
<CDropdownItem class="text-danger" href="javascript:void(0)" @click="delete_batch(e)">
|
||||
删除
|
||||
</CDropdownItem>
|
||||
@ -101,20 +98,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal title="特征提取" ref="feature_extract_modal" @close="feature_extract">
|
||||
<div>
|
||||
准备特征提取
|
||||
<div class="my-2 alert alert-secondary">
|
||||
{{ feature_extract_target.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="feaor" v-model="feature_extract_abort_on_error" />
|
||||
<label for="feaor">
|
||||
出错时停止任务
|
||||
</label>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -129,10 +112,6 @@ export default {
|
||||
loading: true,
|
||||
search_query: '',
|
||||
entries: [],
|
||||
feature_extract_target: null,
|
||||
feature_extract_abort_on_error: false,
|
||||
feature_upload_overwrite: false,
|
||||
feature_upload_fail_if_exists: false,
|
||||
image_convert_target: null,
|
||||
image_convert_format: "jpeg",
|
||||
image_convert_size_enabled: false,
|
||||
@ -160,86 +139,6 @@ export default {
|
||||
await this.$root.estor_delete(this.get_batch_dir(e));
|
||||
this.reload();
|
||||
},
|
||||
async archive_to_cloud(e) {
|
||||
var base_url = this.base_url();
|
||||
this.$root.notify("归档到云", "正在创建归档任务");
|
||||
var url = base_url + '/api/v1/estor-archive/';
|
||||
var r = await this.$root.estor_call("CreateJob", {
|
||||
name: "[归档到云存储]" + e.name,
|
||||
spec: {
|
||||
type: "HttpPost",
|
||||
args: {
|
||||
space: this.$root.estor_space,
|
||||
files: [this.get_batch_dir(e, "features/qr")],
|
||||
url,
|
||||
params: {
|
||||
'Emblem-Token': this.$root.token_for_estor,
|
||||
},
|
||||
recursive: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(r)
|
||||
this.$router.push("/estor/jobs");
|
||||
},
|
||||
async feature_extract(ok) {
|
||||
if (!ok) return;
|
||||
this.$root.notify("特征提取", "正在创建特征提取任务");
|
||||
var e = this.feature_extract_target;
|
||||
var ib = this.get_batch_dir(e, "import");
|
||||
var r = await this.$root.estor_call("CreateJob", {
|
||||
name: "[特征ROI提取]" + e.name,
|
||||
spec: {
|
||||
type: "HttpPost",
|
||||
args: {
|
||||
space: this.$root.estor_space,
|
||||
files: [ib],
|
||||
url: "http://127.0.0.1:32439/roi",
|
||||
recursive: true,
|
||||
concurrency: 8,
|
||||
convert: {
|
||||
pattern: "/emblem/batches/([^/]*)/import/(.*)",
|
||||
replace: "/emblem/batches/$1/roi/$2",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log("CreateJob", r);
|
||||
await this.set_batch_state(e.name, {
|
||||
status: 'feature_extracting',
|
||||
job: r.data.data,
|
||||
});
|
||||
this.$router.push("/estor/jobs");
|
||||
},
|
||||
async do_dup(e) {
|
||||
var ib = this.get_batch_dir(e, "import");
|
||||
var r = await this.$root.estor_call("CreateJob", {
|
||||
name: "[DUP]" + e.name,
|
||||
spec: {
|
||||
type: "HttpPost",
|
||||
args: {
|
||||
space: this.$root.estor_space,
|
||||
files: [ib],
|
||||
url: 'http://192.168.0.139:6006/estor-dup',
|
||||
concurrency: 8,
|
||||
params: {
|
||||
'Estor-Addr': this.estor_url,
|
||||
'Estor-Token': this.estor_token,
|
||||
'Input-Basedir': ib,
|
||||
'Output-Basedir': this.get_batch_dir(e, "dup/"),
|
||||
},
|
||||
recursive: true,
|
||||
abort_on_error: this.feature_extract_abort_on_error,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(r);
|
||||
this.reload_status();
|
||||
},
|
||||
show_feature_extract(e) {
|
||||
this.feature_extract_target = e;
|
||||
this.$refs.feature_extract_modal.show();
|
||||
},
|
||||
show_image_convert(e) {
|
||||
this.image_convert_target = e;
|
||||
this.$refs.image_convert_modal.show();
|
||||
@ -277,19 +176,19 @@ export default {
|
||||
console.log(r);
|
||||
this.$router.push("/estor/jobs");
|
||||
},
|
||||
async feature_upload(e) {
|
||||
this.$root.notify("特征上传", "正在创建特征上传任务");
|
||||
async qr_std_upload(e) {
|
||||
this.$root.notify("备案到云", "正在创建备案任务");
|
||||
var base_url = this.base_url();
|
||||
var url = base_url + '/api/v1/code-feature-roi/';
|
||||
var url = base_url + '/api/v1/qr-std-upload/';
|
||||
await this.$root.estor_call("CreateJob", {
|
||||
name: "[特征上传]" + e.name,
|
||||
name: "[备案到云]" + e.name,
|
||||
spec: {
|
||||
type: "HttpPost",
|
||||
args: {
|
||||
space: this.$root.estor_space,
|
||||
files: [this.get_batch_dir(e, 'roi')],
|
||||
files: [this.get_batch_dir(e, 'import')],
|
||||
url,
|
||||
concurrency: 128,
|
||||
concurrency: 256,
|
||||
recursive: true,
|
||||
headers: {
|
||||
'Authorization': 'token ' + this.$root.token,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user