diff --git a/nezha-fronted/src/components/chart/chart/chartMap.vue b/nezha-fronted/src/components/chart/chart/chartMap.vue
index 22460d875..15f066536 100644
--- a/nezha-fronted/src/components/chart/chart/chartMap.vue
+++ b/nezha-fronted/src/components/chart/chart/chartMap.vue
@@ -195,7 +195,7 @@ export default {
-
${self.$t('config.agent.agent.agent')} ${self.$t('overall.normal')}
+
${self.$t('guide.agent')} ${self.$t('overall.normal')}
@@ -203,7 +203,7 @@ export default {
${dcStat.agent.up}
-
${self.$t('config.agent.agent.agent')} ${self.$t('overall.unusual')}
+
${self.$t('guide.agent')} ${self.$t('overall.unusual')}
diff --git a/nezha-fronted/src/components/common/filterSearch/filterSearch.vue b/nezha-fronted/src/components/common/filterSearch/filterSearch.vue
index 7d93e7241..6a4e9c523 100644
--- a/nezha-fronted/src/components/common/filterSearch/filterSearch.vue
+++ b/nezha-fronted/src/components/common/filterSearch/filterSearch.vue
@@ -63,7 +63,7 @@
-
{{$t('project.topology.add')}}
+
{{$t('buttons.add')}}
diff --git a/nezha-fronted/src/components/common/popBox/guide.vue b/nezha-fronted/src/components/common/popBox/guide.vue
index 3a127b180..b4fee07df 100644
--- a/nezha-fronted/src/components/common/popBox/guide.vue
+++ b/nezha-fronted/src/components/common/popBox/guide.vue
@@ -87,7 +87,7 @@ export default {
},
{
route: '/agent',
- title: this.$t('config.agent.agent.agent'),
+ title: this.$t('guide.agent'),
icon: 'nz-icon nz-icon-agent',
tip: this.$t('guide.agentTip'),
permissionCode: 'agent_view'
diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
index 2a0892348..5d0d96400 100644
--- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
+++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
@@ -53,6 +53,7 @@
:ref="'promql-'+'-1'"
:expression-list="selection.pen.data.expressArr"
:index="index"
+ type="metric"
:plugins="['metric-selector', 'metric-input', 'remove']"
:showRemove="false"
:styleType="2"
@@ -1500,43 +1501,6 @@ export default {
}
},
methods: {
- queryMetrics () {
- this.metricOptions = []
- this.$get('prom/api/v1/label/__name__/values').then(response => {
- if (response.status == 'success') {
- const metrics = response.data.sort()
- const metricMap = new Map()
- metrics.forEach((item) => {
- let key = ''
- if (/^[a-zA-Z]+?_[a-zA-Z]*/.test(item)) {
- key = item.split('_')[0]
- } else if (/^_\w*/.test(item)) {
- key = ' '
- } else {
- key = item
- }
- if (metricMap.get(key)) {
- const values = metricMap.get(key)
- values.push({ label: item, value: item })
- } else {
- const values = [{ label: item, value: item }]
- metricMap.set(key, values)
- }
- // this.metricStore.push({label:item,value:item,insertText:item})
- })
- for (const key of metricMap.keys()) {
- const option = {
- label: key,
- value: key
- }
- if (metricMap.get(key) && metricMap.get(key).length > 1) {
- option.children = metricMap.get(key)
- }
- this.metricOptions.push(option)
- }
- }
- })
- },
tabClick (n) {
},
moduleIdChange (n) {
diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue
index e332733d3..5da860918 100644
--- a/nezha-fronted/src/components/common/project/topologyL5.vue
+++ b/nezha-fronted/src/components/common/project/topologyL5.vue
@@ -373,7 +373,10 @@ const canvasOptions = {
disableEmptyLine: true,
autoExpandDistance: 0,
minScale: 0.2,
- scaleKey: -1
+ scaleKey: -1,
+ keyCode: {
+
+ }
}
export default {
name: 'topologyL5',
diff --git a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue
index 95727bd72..761353f13 100644
--- a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue
@@ -10,7 +10,7 @@
-
+
diff --git a/nezha-fronted/src/components/common/searchSelectInfo.vue b/nezha-fronted/src/components/common/searchSelectInfo.vue
index 0158eb68c..868a01aee 100644
--- a/nezha-fronted/src/components/common/searchSelectInfo.vue
+++ b/nezha-fronted/src/components/common/searchSelectInfo.vue
@@ -94,7 +94,7 @@ const searchSelectInfo = { // value: 传给后台的值;label:显示给用
operation: [
{
value: 'add',
- label: i18n.t('config.operationlog.operations.add')
+ label: i18n.t('buttons.add')
},
{
value: 'update',
diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
index d15615862..7a3ffd4c4 100644
--- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
+++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
@@ -887,7 +887,7 @@ export default {
}
})
}
- } else if (data.children && !data.children.length && this.type !== 'log') {
+ } else if (data.children && (!data.children.length || data.children.length > 100) && this.type !== 'log') {
this.metricOptions.forEach(item => {
if (!item.temp && item.children && item.value != data.value) {
item.children = []
@@ -898,7 +898,7 @@ export default {
const children = this.$store.state.metricsList.find(item => item.value === data.value).children
resolve(children)
}).then((children) => {
- let childrenCopy = JSON.parse(JSON.stringify(children))
+ const childrenCopy = JSON.parse(JSON.stringify(children))
const findChild = this.metricOptions.find(item => item.label === data.label)
if (childrenCopy.length > 100) {
@@ -927,7 +927,7 @@ export default {
childrenCopy = childrenCopy.splice(findChild.children.length, findChild.children.length + 101)
findChild.children.splice(findChild.children.length - 1, 1)
findChild.children.push(...childrenCopy)
- if (findChild.children.length < children.length) {
+ if (findChild.children.length < children.length - 1) {
findChild.children.push({
label: 'More',
value: false,
diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview.vue b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
index b590f8eec..f53b4a06f 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/overview.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
@@ -652,7 +652,7 @@ export default {
{ name: vm.$t('config.agent.up'), value: data.agent.up ? data.agent.up : 0 },
{ name: vm.$t('asset.down'), value: data.agent.down ? data.agent.down : 0 }
]
- prometheusOption.title.text = vm.$t('config.agent.agent.agent')
+ prometheusOption.title.text = vm.$t('guide.agent')
prometheusOption.legend.data = [vm.$t('config.agent.up'), vm.$t('asset.down')]
tooltipEndpointChart && tooltipEndpointChart.setOption(endpointOption, true)
tooltipPrometheusChart && tooltipPrometheusChart.setOption(prometheusOption, true)