CN-752 dns下钻后q查询条件有些与文档不符
This commit is contained in:
@@ -953,6 +953,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'dnsServerRole',
|
||||
queryCycleTotalProp: 'roles',
|
||||
dillDownProp: ['dns_server_role'],
|
||||
queryCondition:['has(dns_server_role,\'$param\')'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -971,6 +972,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'sld',
|
||||
queryCycleTotalProp: 'slds',
|
||||
dillDownProp: ['dns_qname'],
|
||||
queryCondition: ['cutToFirstSignificantSubdomain(dns_qname) = \'$param\''],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -980,6 +982,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'tld',
|
||||
queryCycleTotalProp: 'tlds',
|
||||
dillDownProp: ['dns_qname'],
|
||||
queryCondition: [' topLevelDomain(dns_qname) = \'$param\''],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -989,6 +992,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'qtype',
|
||||
queryCycleTotalProp: 'qtypes',
|
||||
dillDownProp: ['dns_qtype'],
|
||||
queryCondition: ['dns_qtype = $param'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -998,6 +1002,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'rcode',
|
||||
queryCycleTotalProp: 'rcodes',
|
||||
dillDownProp: ['dns_rcode'],
|
||||
queryCondition: ['dns_rcode = $param'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -1007,6 +1012,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'a',
|
||||
queryCycleTotalProp: 'a',
|
||||
dillDownProp: ['rr_a'],
|
||||
queryCondition: ['notEmpty(dns_rr) AND has(JSONExtractArrayRaw(JSON_QUERY(\'$.rr[*].type\', dns_rr) ), \'1\') AND arrayJoin(tupleElement(tupleElement(JSONExtract(dns_rr,\'Tuple(rr Nested(name String, type UInt32, a String))\'), \'rr\'), \'a\')) = \'$param\''],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -1016,6 +1022,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'aaaa',
|
||||
queryCycleTotalProp: 'aaaa',
|
||||
dillDownProp: ['rr_aaaa'],
|
||||
queryCondition: ['notEmpty(dns_rr) and has(JSONExtractArrayRaw(JSON_QUERY(\'$.rr[*].type\', dns_rr) ), \'28\') AND arrayJoin(tupleElement(tupleElement(JSONExtract(dns_rr,\'Tuple(rr Nested(name String, type UInt32, aaaa String))\'), \'rr\'), \'aaaa\')) = \'$param\''],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
@@ -1025,6 +1032,7 @@ export const dnsServiceInsightsTabList = [
|
||||
prop: 'cname',
|
||||
queryCycleTotalProp: 'cnames',
|
||||
dillDownProp: ['rr_cname'],
|
||||
queryCondition: ['notEmpty(dns_rr) and has(JSONExtractArrayRaw(JSON_QUERY(\'$.rr[*].type\', dns_rr) ), \'5\') AND arrayJoin(tupleElement(tupleElement(JSONExtract(dns_rr,\'Tuple(rr Nested(name String, type UInt32, cname String))\'), \'rr\'), \'cname\')) = \'$param\''],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.dnsFourthMenu
|
||||
|
||||
@@ -1096,8 +1096,7 @@ export default {
|
||||
},
|
||||
setQueryCondition (tab, value) {
|
||||
value = value.replaceAll("'", "\\\\'")
|
||||
const queryCondition = []
|
||||
const searchProps = tab.dillDownProp
|
||||
let queryCondition = []
|
||||
if (tab.prop === 'protocolPort') {
|
||||
const valueGroup = value.split(':')
|
||||
if (valueGroup) {
|
||||
@@ -1106,9 +1105,17 @@ export default {
|
||||
}
|
||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ')
|
||||
} else {
|
||||
searchProps.forEach(item => {
|
||||
queryCondition.push(item + "='" + value + "'")
|
||||
})
|
||||
if(tab.queryCondition){
|
||||
tab.queryCondition.forEach(item => {
|
||||
queryCondition.push(item.replace('$param',value))
|
||||
})
|
||||
}else {
|
||||
if(tab.dillDownProp){
|
||||
tab.dillDownProp.forEach(item => {
|
||||
queryCondition.push(item + "='" + value + "'")
|
||||
})
|
||||
}
|
||||
}
|
||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ')
|
||||
}
|
||||
},
|
||||
@@ -1202,7 +1209,6 @@ export default {
|
||||
columnValue = columnValue.replaceAll("'", "\\\\'")
|
||||
const queryCondition = []
|
||||
const curTab = this.getCurTab()
|
||||
const searchProps = curTab.dillDownProp
|
||||
if (curTab.prop === 'protocolPort') {
|
||||
const valueGroup = columnValue.split(':')
|
||||
if (valueGroup) {
|
||||
@@ -1211,9 +1217,20 @@ export default {
|
||||
}
|
||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ')
|
||||
} else {
|
||||
searchProps.forEach(item => {
|
||||
queryCondition.push(item + "='" + columnValue + "'")
|
||||
})
|
||||
if(curTab.queryCondition){
|
||||
curTab.queryCondition.forEach(item => {
|
||||
queryCondition.push(item.replace('$param',columnValue))
|
||||
})
|
||||
}else {
|
||||
if(curTab.dillDownProp){
|
||||
curTab.dillDownProp.forEach(item => {
|
||||
queryCondition.push(item + "='" + columnValue + "'")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ')
|
||||
}
|
||||
},
|
||||
@@ -1473,6 +1490,7 @@ export default {
|
||||
let tabInCode = listInCode ? listInCode.find(item => item.label === tab.label) : {}
|
||||
tab.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null
|
||||
tab.dillDownProp = tabInCode ? tabInCode.dillDownProp : []
|
||||
tab.queryCondition = tabInCode ? tabInCode.queryCondition : []
|
||||
})
|
||||
// 设置drilldownTabs:未下钻状态设置,已下钻状态无需设置
|
||||
let thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
@@ -1500,6 +1518,7 @@ export default {
|
||||
let tabInCode = listInCode ? listInCode.find(item => item.label === fullTab.label) : {}
|
||||
drilldownTabWithAllInfo.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null
|
||||
drilldownTabWithAllInfo.dillDownProp = tabInCode ? tabInCode.dillDownProp : []
|
||||
drilldownTabWithAllInfo.queryCondition = tabInCode ? tabInCode.queryCondition : []
|
||||
drilldownTabFull.push(drilldownTabWithAllInfo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user