* fix:add package

* fix:notice_info为null的情况

* fix:2 bugs
This commit is contained in:
wang-liang0615 2023-09-28 09:45:11 +08:00 committed by GitHub
parent d42513c4a4
commit 89a2985ee4
2 changed files with 1709 additions and 1696 deletions

View File

@ -276,7 +276,7 @@ export default {
} else if (_findADT.agent_id) {
this.agent_type = 'agent_id'
} else {
this.agent_type = 'agent_id'
this.agent_type = this.agentTypeRadioList[0].value
}
if (_findADT.interval || (!_findADT.interval && !_findADT.cron)) {
this.interval = 'interval'
@ -348,9 +348,17 @@ export default {
}
if (this.agent_type === 'agent_id' || this.agent_type === 'all') {
params.query_expr = ''
if (this.agent_type === 'agent_id' && !params.agent_id) {
this.$message.error('请填写指定节点!')
return
}
}
if (this.agent_type === 'query_expr' || this.agent_type === 'all') {
params.agent_id = ''
if (this.agent_type === 'query_expr' && !params.query_expr) {
this.$message.error('请从cmdb中选择')
return
}
}
putCITypeDiscovery(currentAdt.id, params).then((res) => {

View File

@ -560,6 +560,7 @@ export default {
} else {
q = `q=_type:${this.currentTypeId[0]},` + q
}
if (this.currentTypeId[0]) {
const res = await searchCI2(q)
this.pageNo = res.page
this.numfound = res.numfound
@ -574,6 +575,7 @@ export default {
})
this.initialInstanceList = _.cloneDeep(this.instanceList)
this.calcColumns()
}
} else {
q += `&root_id=${this.treeKeys[this.treeKeys.length - 1].split('%')[0]}`
const typeId = parseInt(this.treeKeys[this.treeKeys.length - 1].split('%')[1])
@ -608,6 +610,7 @@ export default {
} else {
q = `q=_type:${this.currentTypeId[0]},` + q
}
if (this.currentTypeId[0]) {
const res = await searchCIRelation(q)
const _data = Object.assign([], res.result)
@ -625,8 +628,10 @@ export default {
this.initialInstanceList = _.cloneDeep(this.instanceList)
this.calcColumns()
}
if (refreshType === 'refreshNumber') {
this.treeKeys.map((key, index) => {
const promises = this.treeKeys.map((key, index) => {
statisticsCIRelation({
root_ids: key.split('%')[0],
level: this.treeKeys.length - index,