diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js
index 32b58e0b4..da6d3b214 100644
--- a/nezha-fronted/src/components/common/language/cn.js
+++ b/nezha-fronted/src/components/common/language/cn.js
@@ -1129,6 +1129,7 @@ const cn = {
defaultEndpointSet: '默认的Endpoint设置',
relation: '模块关联的Endpoint将默认配置以下端口/路径/参数'
},
+ type: '类型',
version: '版本',
walk: 'Walk',
maxRepetitions: '最大迭代次数',
@@ -1139,6 +1140,7 @@ const cn = {
authProtocol: '认证协议',
privProtocol: '隐私协议',
contextName: '内容名称',
+ alerts: 'Alerts',
privPassword: '隐私密码'
},
endpoint: {
@@ -1163,7 +1165,20 @@ const cn = {
stateInfo_230010: 'Prometheus服务可用',
stateInfo_230011: 'Endpoint 连接错误',
alerts: '告警',
- labels: '标签'
+ labels: '标签',
+ pattern: 'Name pattern',
+ credentials: '资格证书',
+ scrape_interval: '时间间隔',
+ scrape_interval_placeholder: '默认全局时间间隔',
+ scrape_timeout: '超时时间',
+ scrape_timeout_placeholder: '默认全局超时时间',
+ type: '类型',
+ bearer_token: 'Token',
+ username: '用户名',
+ password: '密码',
+ authTypeNull: '无',
+ authTypeWord: '用户名密码',
+ authTypeToken: 'Token',
},
metrics: {
metrics: '指标',
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 2c6a84b8e..2f7a55b34 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -1132,6 +1132,7 @@ const en = {
createModule: 'New module', // "新增组件"
version: 'Version',
walk: 'Walk',
+ type: 'Type',
maxRepetitions: 'Max repetitions',
retries: 'Retries',
timeout: 'Timeout',
@@ -1141,6 +1142,7 @@ const en = {
privProtocol: 'Priv protocol',
contextName: 'Context name',
privPassword: 'Priv password',
+ alerts: 'Alerts',
tip: {
defaultEndpointSet: 'Default endpoint settings', // "默认的Endpoint设置"
relation: 'Module associated Endpoint will configure the following ports/paths/parameters by default'// "组件关联的Endpoint将默认配置以下端口/路径/参数"
@@ -1168,7 +1170,20 @@ const en = {
stateInfo_230010: 'Promserver can be used',
stateInfo_230011: 'Endpoint connection refused',
alerts: 'Alerts',
- labels: 'Labels'
+ labels: 'Labels',
+ pattern: 'Name pattern',
+ credentials: 'Credentials',
+ scrape_interval: 'Scrape interval',
+ scrape_interval_placeholder: 'default global scrape interval',
+ scrape_timeout: 'Scrape timeout',
+ scrape_timeout_placeholder: 'default global scrape timeout',
+ type: 'Type',
+ bearer_token: 'Token',
+ username: 'Username',
+ password: 'Password',
+ authTypeNull: 'None',
+ authTypeWord: 'Username and password',
+ authTypeToken: 'Token',
},
metrics: {
metrics: 'Metrics', // "指标"
diff --git a/nezha-fronted/src/components/common/popBox/selectWalk.vue b/nezha-fronted/src/components/common/popBox/selectWalk.vue
index fc4a796e3..5ad5c94e7 100644
--- a/nezha-fronted/src/components/common/popBox/selectWalk.vue
+++ b/nezha-fronted/src/components/common/popBox/selectWalk.vue
@@ -22,18 +22,20 @@
:default-checked-keys="currentWalk"
>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
- {{data.name}}
+ {{data.data.name}}
@@ -64,6 +66,9 @@ export default {
computed: {
getClass () {
return (value) => {
+ if (!value) {
+ return ''
+ }
return this.currentWalk.indexOf(value) == -1 ? '' : 'walk-active'
}
},
@@ -98,7 +103,8 @@ export default {
show () {
this.popBox.show = true
},
- hideDetail () {
+ hideDetail (data,num) {
+ console.log(data,num)
this.tempWalk.detailShow = false
},
showDetail (data, e) {
diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue
index 4c3fa269a..4466b033f 100644
--- a/nezha-fronted/src/components/common/project/topologyL5.vue
+++ b/nezha-fronted/src/components/common/project/topologyL5.vue
@@ -113,7 +113,11 @@
{{topologyInfo.name}}
-
+
@@ -758,7 +757,7 @@ export default {
if (this.fromPrev) {
resolve(this.topoPrevDataS)
}
- this.$get('/project/topo', { projectId: this.obj.id }).then(res => {
+ this.$get('monitor/project/topo', { projectId: this.obj.id }).then(res => {
let data = res.data.topo
if (!res.data.topo || !data.pens) {
data = {
@@ -806,9 +805,17 @@ export default {
item.image = this.iconArray.find(item1 => item1.id == item.data.imageId).image
}
if (item.type === 0) {
- promiseArr.push(this.$get('/module/stat', { id: item.data.moduleId }))
+ // promiseArr.push(this.$get('/monitor/module/stat', { id: item.data.moduleId }))
+ item.data.state = {}
+ item.data.state.asset = false
+ item.data.state.endpoint = false
+ item.data.state.alert = false
} else {
- promiseArr.push({ type: 1 })
+ // promiseArr.push({ type: 1 })
+ item.data.state = {}
+ item.data.state.asset = false
+ item.data.state.endpoint = false
+ item.data.state.alert = false
}
})
@@ -1547,11 +1554,11 @@ export default {
form.append('name', this.file.name.substring(0, this.file.name.lastIndexOf('.')))
}
form.append('unit', this.uploadPic.unit)
- this.$post('/project/topo/icon', form, { 'Content-Type': 'multipart/form-data' }).then(res => {
+ this.$post('monitor/project/topo/icon', form, { 'Content-Type': 'multipart/form-data' }).then(res => {
if (res.code == 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
this.uploadPicShow = false
- this.dealImg(`/project/topo/icon/${res.data.id}`).then((data) => {
+ this.dealImg(`monitor/project/topo/icon/${res.data.id}`).then((data) => {
const group = this.tools.find(tool => tool.group === this.uploadPic.unit)
if (group) {
group.children.push({
@@ -1587,7 +1594,7 @@ export default {
},
delImg (item) {
- this.$delete('/project/topo/icon?ids=' + item.data.imageId).then(res => {
+ this.$delete('monitor/project/topo/icon?ids=' + item.data.imageId).then(res => {
if (res.code == 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
this.addNodeInit()
@@ -1599,7 +1606,7 @@ export default {
addNodeInit (imgidList) {
if (!this.fromOverView) {
- this.$get('/project/topo/icon').then(res => {
+ this.$get('monitor/project/topo/icon').then(res => {
this.imgageLoading = true
// this.tools[1].children=[];
const imgArr = []
@@ -1607,7 +1614,7 @@ export default {
res.data.list.forEach((item, index) => {
item.imageName = item.name
delete item.name
- promiseArr.push(this.dealImg(`/project/topo/icon/${item.id}`))
+ promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.id}`))
imgArr.push({ ...item })
})
Promise.all(promiseArr).then((res2) => {
@@ -1651,7 +1658,7 @@ export default {
const promiseArr = []
imgidList.forEach((item, index) => {
if (item.data.imageId) {
- promiseArr.push(this.dealImg(`/project/topo/icon/${item.data.imageId}`))
+ promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}`))
} else {
promiseArr.push('')
}
@@ -1832,7 +1839,7 @@ export default {
if (this.penToolTipScale == getTopology(this.topologyIndex).data.scale) {
getTopology(this.topologyIndex).data.scale = this.oldScale
}
- this.$put('/project/topo', { topo: JSON.stringify(topologyData), projectId: this.projectInfo.id }).then(res => {
+ this.$put('monitor/project/topo', { topo: JSON.stringify(topologyData), projectId: this.projectInfo.id }).then(res => {
this.prevent_opt.save = false
if (res.code === 200) {
this.$message({
diff --git a/nezha-fronted/src/components/common/project/topologyPrev.vue b/nezha-fronted/src/components/common/project/topologyPrev.vue
index 952d8ff20..a0d0f05d0 100644
--- a/nezha-fronted/src/components/common/project/topologyPrev.vue
+++ b/nezha-fronted/src/components/common/project/topologyPrev.vue
@@ -797,7 +797,7 @@
if (this.fromPrev) {
resolve(this.topoPrevDataS)
}
- this.$get('/project/topo', { projectId: this.obj.id }).then(res => {
+ this.$get('monitor/project/topo', { projectId: this.obj.id }).then(res => {
let data = res.data.topo
if (!res.data.topo || !data.pens) {
data = {
@@ -1587,11 +1587,11 @@
form.append('name', this.file.name.substring(0, this.file.name.lastIndexOf('.')))
}
form.append('unit', this.uploadPic.unit)
- this.$post('/project/topo/icon', form, { 'Content-Type': 'multipart/form-data' }).then(res => {
+ this.$post('monitor/project/topo/icon', form, { 'Content-Type': 'multipart/form-data' }).then(res => {
if (res.code == 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
this.uploadPicShow = false
- this.dealImg(`/project/topo/icon/${res.data.id}`).then((data) => {
+ this.dealImg(`monitor/project/topo/icon/${res.data.id}`).then((data) => {
const group = this.tools.find(tool => tool.group === this.uploadPic.unit)
if (group) {
group.children.push({
@@ -1627,7 +1627,7 @@
},
delImg (item) {
- this.$delete('/project/topo/icon?ids=' + item.data.imageId).then(res => {
+ this.$delete('monitor/project/topo/icon?ids=' + item.data.imageId).then(res => {
if (res.code == 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
this.addNodeInit()
@@ -1639,7 +1639,7 @@
addNodeInit (imgidList) {
if (!this.fromOverView) {
- this.$get('/project/topo/icon').then(res => {
+ this.$get('monitor/project/topo/icon').then(res => {
this.imgageLoading = true
// this.tools[1].children=[];
const imgArr = []
@@ -1647,7 +1647,7 @@
res.data.list.forEach((item, index) => {
item.imageName = item.name
delete item.name
- promiseArr.push(this.dealImg(`/project/topo/icon/${item.id}`))
+ promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.id}`))
imgArr.push({ ...item })
})
Promise.all(promiseArr).then((res2) => {
@@ -1691,7 +1691,7 @@
const promiseArr = []
imgidList.forEach((item, index) => {
if (item.data.imageId) {
- promiseArr.push(this.dealImg(`/project/topo/icon/${item.data.imageId}`))
+ promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}`))
} else {
promiseArr.push('')
}
@@ -1872,7 +1872,7 @@
if (this.penToolTipScale == getTopology(this.topologyIndex).data.scale) {
getTopology(this.topologyIndex).data.scale = this.oldScale
}
- this.$put('/project/topo', { topo: JSON.stringify(topologyData), projectId: this.projectInfo.id }).then(res => {
+ this.$put('monitor/project/topo', { topo: JSON.stringify(topologyData), projectId: this.projectInfo.id }).then(res => {
this.prevent_opt.save = false
if (res.code === 200) {
this.$message({
diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue
index 0e64d7be8..e9ad84287 100644
--- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue
@@ -16,27 +16,40 @@