diff --git a/src/components/table/detection/GeneralSettings.vue b/src/components/table/detection/GeneralSettings.vue
index 3a9732fa..ee028daa 100644
--- a/src/components/table/detection/GeneralSettings.vue
+++ b/src/components/table/detection/GeneralSettings.vue
@@ -10,7 +10,7 @@
Indicator Match
- Use indicators from intelligencesources to detect matchingevents and alerts.
+ Use indicators from intelligence sources to detect matching events and alerts.
select
@@ -46,9 +46,9 @@
@@ -58,9 +58,9 @@
@@ -112,8 +112,6 @@
import { detectionRuleType } from '@/utils/constants'
import { switchStatus } from '@/utils/tools'
import { detectionUnitList } from '@/utils/static-data'
-import axios from 'axios'
-import { api } from '@/utils/api'
export default {
name: 'GeneralSettings',
@@ -177,32 +175,8 @@ export default {
methods: {
switchStatus,
initData () {
- this.categoryList = detectionUnitList.categoryList || []
- this.eventTypeList = detectionUnitList.eventTypeList || []
- axios.get(api.detection.statistics).then(response => {
- if (response.status === 200) {
- const data = response.data.data
- if (data.categoryList) {
- this.categoryList = data.categoryList
- } else {
- this.categoryList = []
- }
-
- if (data.eventTypeList) {
- this.eventTypeList = data.eventTypeList
- } else {
- this.eventTypeList = []
- }
- } else {
- console.error(response.data)
- this.categoryList = []
- this.eventTypeList = []
- }
- }).catch((e) => {
- console.error(e)
- this.categoryList = []
- this.eventTypeList = []
- })
+ this.categoryList = detectionUnitList.categoryList
+ this.eventTypeList = detectionUnitList.eventTypeList
},
selectMode (ruleType) {
this.settingObj.ruleType = ruleType
diff --git a/src/components/table/detection/RuleDefinition.vue b/src/components/table/detection/RuleDefinition.vue
index 42c7b2ad..eb8f7a63 100644
--- a/src/components/table/detection/RuleDefinition.vue
+++ b/src/components/table/detection/RuleDefinition.vue
@@ -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))
})
}
},
diff --git a/src/utils/static-data.js b/src/utils/static-data.js
index 9f85083a..41f05349 100644
--- a/src/utils/static-data.js
+++ b/src/utils/static-data.js
@@ -437,16 +437,21 @@ export const detectionUnitList = {
{ status: 0 }
],
categoryList: [
- { value: 'security_event', label: 'Security Event' },
- { value: 'performance_event', label: 'Performance Event' }
+ { value: 'security_event', label: 'Security Event' }/* ,
+ { value: 'performance_event', label: 'Performance Event' } */
],
eventTypeList: [
- { value: 'ddos', label: 'DDos' },
- { value: 'lateral_movement', label: 'Lateral movement' },
- { value: 'brute_force', label: 'Brute force' }
+ { value: 'Initial Access', label: 'Initial Access' },
+ { value: 'Command and Control', label: 'Command and Control' },
+ { value: 'Credential Access', label: 'Credential Access' },
+ { value: 'Lateral Movement', label: 'Lateral Movement' },
+ { value: 'Collection', label: 'Collection' },
+ { value: 'Impact', label: 'Impact' },
+ { value: 'Anonymity', label: 'Anonymity' },
+ { value: 'Regulatory Risk', label: 'Regulatory Risk' }
],
sourceList: [
- { value: 'session_record', label: 'session_record' }
+ { value: 'session_record', label: 'Session Record' }
],
levelList: [
{ value: 'critical', label: 'Critical' },