Merge branch 'dev-3.4' of git.mesalab.cn:nezha/nezha-fronted into dev-3.4

This commit is contained in:
zyh
2022-08-30 14:43:25 +08:00
7 changed files with 40 additions and 1 deletions

View File

@@ -307,13 +307,18 @@
.basic-info-table-list {
display: flex;
.basic-info-table-title,.basic-info-table-value {
display: inline-block;
display: inline-flex;
flex-wrap: wrap;
width: 50%;
line-height: 30px;
padding-left: 10px;
border-bottom: 1px solid $--border-color-light;
border-right: 1px solid $--border-color-light;
.alert-days-info{
div {
vertical-align: middle;
}
}
}
.basic-info-table-value {
border-right: none;

View File

@@ -231,3 +231,9 @@
border-color: unset;
background-color: unset;
}
.plTableBox.mib-browser-table{
.el-table:not(.chart-table) .gutter{
right: 53px !important;
height: 40px !important;
}
}

View File

@@ -169,3 +169,11 @@
}
}
.topo-page {
.promqlInput {
.el-cascader-menu {
width: 200px;
height: 100%;
}
}
}

View File

@@ -1187,6 +1187,9 @@ export default {
return
}
this.chartConfig.param.thresholds.splice(index, 1)
this.chartConfig.param.thresholds.forEach((item, index) => {
this.$refs.chartForm.validateField('param.thresholds.' + index + '.value')
})
this.change()
},
move () {

View File

@@ -468,6 +468,9 @@ export default {
this.expressions.splice(index, 1)
this.expressionName.splice(index, 1)
this.expressionsShow.splice(index, 1)
this.chartConfig.elements.forEach((item, index) => {
this.$refs.chartForm.validateField('elements.' + index + '.expression')
})
this.$nextTick(() => {
this.expressions.forEach((ex, index) => {
if (ex) {
@@ -537,6 +540,14 @@ export default {
},
removeMapping (index) {
this.chartConfig.param.valueMapping.splice(index, 1)
this.chartConfig.param.valueMapping.forEach((item, index) => {
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.value')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.from')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.to')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.regx')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.column')
this.$refs.chartForm.validateField('param.valueMapping.' + index + '.display')
})
this.change()
},
showMapping (index) {

View File

@@ -1311,6 +1311,7 @@ export default {
// 删除pipeline
delPipeline (logsIndex, pipeLineIndex) {
this.editEndpoint.configs[1].config[logsIndex].pipeline.splice(pipeLineIndex, 1)
this.$refs.moduleForm.clearValidate()
},
// 添加pipelineItem
addPipelineItem (logsIndex, pipelineIndex) {
@@ -1354,6 +1355,7 @@ export default {
} else if (val === 'labels') {
this.editEndpoint.configs[1].config[logsIndex].pipeline[pipelineIndex].labels.splice(itemIndex, 1)
}
this.$refs.moduleForm.clearValidate()
},
resultFormat (resp) {
if (resp && resp.data) {
@@ -1457,6 +1459,7 @@ export default {
// return
// }
this.editEndpoint.configs[0].config.relabel_config.splice(index, 1)
this.$refs.moduleForm.clearValidate()
},
tagsChangeRelabel (newTags, index) {
this.editEndpoint.configs[0].config.relabel_config[index].source_labels = newTags.map(item => item.text)

View File

@@ -1064,6 +1064,7 @@ export default {
// return
// }
this.editModule.configs[0].config.relabel_config.splice(index, 1)
this.$refs.moduleForm.clearValidate()
},
tagsChange (newTags, index) {
this.editModule.paramObj[index].value = newTags.map(item => item.text)
@@ -1259,6 +1260,7 @@ export default {
// 删除pipeline
delPipeline (logsIndex, pipeLineIndex) {
this.editModule.configs[1].config[logsIndex].pipeline.splice(pipeLineIndex, 1)
this.$refs.moduleForm.clearValidate()
},
// 添加pipelineItem
addPipelineItem (logsIndex, pipelineIndex) {
@@ -1292,6 +1294,7 @@ export default {
} else if (val === 'labels') {
this.editModule.configs[1].config[logsIndex].pipeline[pipelineIndex].labels.splice(itemIndex, 1)
}
this.$refs.moduleForm.clearValidate()
}
},
mounted () {