Skip to content

Commit

Permalink
fix: Modify custom tag show tags error #25979
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericsssss authored and xiaochaoren1 committed Jul 31, 2024
1 parent 54688c8 commit d450c48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/querier/engine/clickhouse/tag/description.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ func GetStaticTagDescriptions(db, table string) (response *common.Result, err er
if AutoCustomTag.DisplayName != "" {
tagDisplayName = AutoCustomTag.DisplayName
}
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
tagName, tagName, tagName, tagDisplayName, "auto_custom_tag",
"Custom Tag", []string{}, []bool{true, true, true}, AutoCustomTag.Description, AutoCustomTag.TagFields, false, []string{}, "",
Expand Down Expand Up @@ -705,7 +705,7 @@ func GetDynamicTagDescriptions(db, table, rawSql, queryCacheTTL, orgID string, u
for _, _key := range k8sLabelRst.Values {
key := _key.([]interface{})[0]
labelKey := "k8s.label." + key.(string)
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
labelKey, labelKey, labelKey, labelKey, "map_item",
"Custom Tag", tagTypeToOperators["string"], []bool{true, true, true}, "", "", false, notSupportOperator, "",
Expand Down Expand Up @@ -736,7 +736,7 @@ func GetDynamicTagDescriptions(db, table, rawSql, queryCacheTTL, orgID string, u
for _, _key := range k8sAnnotationRst.Values {
key := _key.([]interface{})[0]
annotationKey := "k8s.annotation." + key.(string)
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
annotationKey, annotationKey, annotationKey, annotationKey, "map_item",
"Custom Tag", tagTypeToOperators["string"], []bool{true, true, true}, "", "", false, notSupportOperator, "",
Expand All @@ -763,7 +763,7 @@ func GetDynamicTagDescriptions(db, table, rawSql, queryCacheTTL, orgID string, u
for _, _key := range podK8senvRst.Values {
key := _key.([]interface{})[0]
envKey := "k8s.env." + key.(string)
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
envKey, envKey, envKey, envKey, "map_item",
"Custom Tag", tagTypeToOperators["string"], []bool{true, true, true}, "", "", false, notSupportOperator, "",
Expand All @@ -789,7 +789,7 @@ func GetDynamicTagDescriptions(db, table, rawSql, queryCacheTTL, orgID string, u
for _, _key := range cloudTagRst.Values {
key := _key.([]interface{})[0]
chostCloudTagKey := "cloud.tag." + key.(string)
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == ckcommon.DB_NAME_EXT_METRICS || db == ckcommon.DB_NAME_EVENT || db == ckcommon.DB_NAME_PROFILE || db == ckcommon.DB_NAME_PROMETHEUS || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
chostCloudTagKey, chostCloudTagKey, chostCloudTagKey, chostCloudTagKey, "map_item",
"Custom Tag", tagTypeToOperators["string"], []bool{true, true, true}, "", "", false, notSupportOperator, "",
Expand All @@ -815,7 +815,7 @@ func GetDynamicTagDescriptions(db, table, rawSql, queryCacheTTL, orgID string, u
for _, _key := range osAPPTagRst.Values {
key := _key.([]interface{})[0]
osAPPTagKey := "os.app." + key.(string)
if db == "ext_metrics" || db == "event" || db == ckcommon.DB_NAME_PROMETHEUS || db == ckcommon.DB_NAME_APPLICATION_LOG || table == "vtap_flow_port" || table == "vtap_app_port" {
if db == "ext_metrics" || db == "event" || db == ckcommon.DB_NAME_PROMETHEUS || db == ckcommon.DB_NAME_APPLICATION_LOG || table == "vtap_flow_port" || table == "vtap_app_port" || table == "network" || table == "application" {
response.Values = append(response.Values, []interface{}{
osAPPTagKey, osAPPTagKey, osAPPTagKey, osAPPTagKey, "map_item",
"Custom Tag", tagTypeToOperators["string"], []bool{true, true, true}, "", "", false, notSupportOperator, "",
Expand Down

0 comments on commit d450c48

Please sign in to comment.