fix: 调整policy的一些字典项

This commit is contained in:
chenjinsong
2023-10-24 15:34:08 +08:00
parent d1c9eba029
commit 46f1a880cd
3 changed files with 25 additions and 44 deletions

View File

@@ -370,9 +370,9 @@ export default {
this.metricList = detectionUnitList.metricList || []
if (this.mySettingObj.ruleType === this.detectionRuleType.indicator) {
axios.get(api.knowledgeBaseList, { params: this.searchLabel }).then(response => {
axios.get(api.knowledgeBaseList, { params: this.searchLabel, pageSize: -1 }).then(response => {
if (response.status === 200) {
this.libraryList = _.get(response, 'data.data.list', [])
this.libraryList = _.get(response, 'data.data.list', []).filter(l => l.isBuiltIn === 0)
} else {
this.libraryList = []
if (response.data.message) {
@@ -381,8 +381,10 @@ export default {
this.$message.error(this.$t('tip.somethingWentWrong'))
}
}
}).catch(() => {
}).catch(e => {
console.error(e)
this.libraryList = []
this.$message.error(this.errorMsgHandler(e))
})
}
},