mirror of https://github.com/veops/cmdb.git
fix search
This commit is contained in:
parent
47ded84231
commit
a1f63b00dd
|
@ -99,7 +99,8 @@ def register_extensions(app):
|
|||
login_manager.init_app(app)
|
||||
migrate.init_app(app, db)
|
||||
rd.init_app(app)
|
||||
es.init_app(app)
|
||||
if app.config.get("USE_ES"):
|
||||
es.init_app(app)
|
||||
celery.conf.update(app.config)
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
<a-popconfirm
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(record)"
|
||||
@cancel="cancel"
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
>
|
||||
|
|
|
@ -324,7 +324,7 @@ export default {
|
|||
return searchCI(`q=_id:${ciId}`).then(res => {
|
||||
const ciMap = {}
|
||||
Object.keys(res.result[0]).forEach(k => {
|
||||
if (!['ci_type', '_id', 'ci_type_alias', '_type'].includes(k)) {
|
||||
if (!['ci_type', 'ci_id', 'ci_type_alias', 'type_id'].includes(k)) {
|
||||
ciMap[k] = res.result[0][k]
|
||||
}
|
||||
})
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<div v-for="parent in parentCITypes" :key="'ctr_' + parent.ctr_id">
|
||||
<a-card type="inner" :title="parent.alias || parent.name" v-if="firstCIs[parent.name]">
|
||||
<a-table
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
size="middle"
|
||||
:columns="firstCIColumns[child.id]"
|
||||
:dataSource="firstCIs[child.name]"
|
||||
|
@ -45,7 +45,7 @@
|
|||
<div v-for="child in childCITypes" :key="'ctr_' + child.ctr_id">
|
||||
<a-card type="inner" :title="child.alias || child.name" v-if="secondCIs[child.name]">
|
||||
<a-table
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
size="middle"
|
||||
:columns="secondCIColumns[child.id]"
|
||||
:dataSource="secondCIs[child.name]"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
bordered
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="_id"
|
||||
rowKey="ci_id"
|
||||
:columns="columns"
|
||||
:data="loadInstances"
|
||||
:scroll="{ x: scrollX, y: scrollY }"
|
||||
|
@ -203,7 +203,7 @@ export default {
|
|||
this.current = [this.typeId]
|
||||
this.loadColumns()
|
||||
this.levels = res.find(item => item.id === this.typeId).levels
|
||||
this.$refs.table.refresh(true)
|
||||
this.$refs.table && this.$refs.table.refresh(true)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue