diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue index 9dc39422c..1d6c21668 100644 --- a/nezha-fronted/src/components/charts/chart-alert-list.vue +++ b/nezha-fronted/src/components/charts/chart-alert-list.vue @@ -301,7 +301,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { diff --git a/nezha-fronted/src/components/charts/chart-detail.vue b/nezha-fronted/src/components/charts/chart-detail.vue index 51f0ed91a..4db3ad90a 100644 --- a/nezha-fronted/src/components/charts/chart-detail.vue +++ b/nezha-fronted/src/components/charts/chart-detail.vue @@ -357,7 +357,7 @@ export default { path: this.$t('project.endpoint.path'), param: this.$t('project.endpoint.param'), state: this.$t('alert.list.state'), - project: this.$t('project.project.project'), + project: this.$t('project.project.projectName'), module: this.$t('project.module.module') } } diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index db493664b..8fe9dbaf2 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -198,7 +198,7 @@ export default { disabled: false }, { id: 20, - name: this.$t('project.project.project'), + name: this.$t('project.project.projectName'), type: 'project', label: 'project', disabled: false @@ -272,7 +272,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue index f3730dc9f..aa5dc9a9b 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue @@ -193,7 +193,7 @@ export default { prop: 'id', show: true }, { - label: this.$t('project.project.project'), + label: this.$t('project.project.projectName'), prop: 'project', show: true, width: '120' @@ -288,7 +288,7 @@ export default { readonly: true }, { id: 34, - name: this.$t('project.project.project'), + name: this.$t('project.project.projectName'), // name: this.$t('asset.asset'), type: 'input', label: 'projectName', diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index f33a5ab4f..93df622fe 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -253,7 +253,7 @@ export default { }, createMenu: [ // 新增按钮内容 { - label: this.$t('project.project.project'), + label: this.$t('project.project.projectName'), url: 'project', type: 1, permission: 'header_add_project' diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index 2e4667cdc..2e2624c7d 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -106,7 +106,8 @@ const cn = { moreOption: '更多选项', copy: '复制', silence: '静默', - labels: '标签' + labels: '标签', + editType: '类型' }, setup: { step0: '欢迎', @@ -1163,7 +1164,7 @@ const cn = { }, project: { project: '名称', - projectName: '系统名称', + projectName: '系统', editProject: '编辑系统', description: '描述', createProject: '新增系统' diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 467a758c3..cf62d080b 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -111,7 +111,8 @@ const en = { labels: 'Labels', moreOption: 'More option', copy: 'Copy', - silence: 'Silence' + silence: 'Silence', + editType: 'Type' }, pageSize: '/page', setup: { @@ -1177,7 +1178,7 @@ const en = { }, project: { project: 'Name', // "系统" - projectName: 'Project name', // "系统名称" + projectName: 'Project', // "系统名称" editProject: 'Edit project', // "编辑系统" description: 'Description', // "描述" createProject: 'New project'// "新增系统" diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue index deda9f99d..a5546c0f8 100644 --- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue +++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue @@ -1884,8 +1884,14 @@ export default { outline: none; } + /deep/ .el-input-number:focus { + .el-input-number__decrease, .el-input-number__increase { + visibility: visible; + outline: none; + } + } /deep/ .el-input-number:focus-within { - /deep/ .el-input-number__decrease, /deep/ .el-input-number__increase { + .el-input-number__decrease, .el-input-number__increase { visibility: visible; outline: none; } diff --git a/nezha-fronted/src/components/common/project/popData/alertTable.vue b/nezha-fronted/src/components/common/project/popData/alertTable.vue index 97b3c8921..d98450d04 100644 --- a/nezha-fronted/src/components/common/project/popData/alertTable.vue +++ b/nezha-fronted/src/components/common/project/popData/alertTable.vue @@ -203,7 +203,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { @@ -284,7 +284,7 @@ export default { disabled: false }, { id: 22, - name: this.$t('project.project.project'), + name: this.$t('project.project.projectName'), type: 'project', label: 'project', disabled: false diff --git a/nezha-fronted/src/components/common/project/popData/assetTable.vue b/nezha-fronted/src/components/common/project/popData/assetTable.vue index 76a3bb474..3d56a4748 100644 --- a/nezha-fronted/src/components/common/project/popData/assetTable.vue +++ b/nezha-fronted/src/components/common/project/popData/assetTable.vue @@ -130,7 +130,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { diff --git a/nezha-fronted/src/components/common/project/popData/endpointTable.vue b/nezha-fronted/src/components/common/project/popData/endpointTable.vue index 05bafcf18..1efc8b2f7 100644 --- a/nezha-fronted/src/components/common/project/popData/endpointTable.vue +++ b/nezha-fronted/src/components/common/project/popData/endpointTable.vue @@ -116,7 +116,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index c340b111d..c0ced71d8 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -13,7 +13,7 @@
- + diff --git a/nezha-fronted/src/components/common/rightBox/asset/assetBatchEditBox.vue b/nezha-fronted/src/components/common/rightBox/asset/assetBatchEditBox.vue index 59a2cc0f7..0cecb1faf 100644 --- a/nezha-fronted/src/components/common/rightBox/asset/assetBatchEditBox.vue +++ b/nezha-fronted/src/components/common/rightBox/asset/assetBatchEditBox.vue @@ -10,7 +10,7 @@
- + diff --git a/nezha-fronted/src/components/common/rightBox/chartTempBox.vue b/nezha-fronted/src/components/common/rightBox/chartTempBox.vue index f9cabbfc0..15a470dca 100644 --- a/nezha-fronted/src/components/common/rightBox/chartTempBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chartTempBox.vue @@ -373,7 +373,7 @@ export default { disabled: false }, { id: 34, - name: this.$t('project.project.project'), + name: this.$t('project.project.projectName'), // name: this.$t('asset.asset'), type: 'input', label: 'projectName', diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue index b130e98c0..f1fb4c5ff 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue @@ -17,7 +17,7 @@
- + diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue index 09d961bc0..143498d56 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue @@ -27,7 +27,7 @@ - + @@ -121,18 +121,18 @@
- - - - - + + + + + + + + + + + + diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index eab509f66..8e9a1e599 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -122,7 +122,7 @@ id="module-box-input-pattern" v-model="editModule.endpointNameTmpl" :fetch-suggestions="querySearch" - placeholder="请输入内容" + :placeholder="$t('overall.placeHolder')" > diff --git a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue index 5c5794bff..4c1c46eaa 100644 --- a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue @@ -224,7 +224,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { diff --git a/nezha-fronted/src/components/layout/container.vue b/nezha-fronted/src/components/layout/container.vue index abd9c91a5..f32de9582 100644 --- a/nezha-fronted/src/components/layout/container.vue +++ b/nezha-fronted/src/components/layout/container.vue @@ -20,7 +20,7 @@ export default { height: calc(100% - 50px); background-color: #f6f6f6; width: 100%; - + padding-right: 10px; &>div { height: 100%; } diff --git a/nezha-fronted/src/components/layout/header.vue b/nezha-fronted/src/components/layout/header.vue index 538e081a9..f6b4c4259 100644 --- a/nezha-fronted/src/components/layout/header.vue +++ b/nezha-fronted/src/components/layout/header.vue @@ -79,7 +79,7 @@ export default { // 顶部菜单相关 createMenu: [ // 新增按钮内容 { - label: this.$t('project.project.project'), + label: this.$t('project.project.projectName'), url: 'project', type: 1, permission: 'header_add_project' diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 0c66f2e32..834cf2640 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -89,7 +89,7 @@
{{$t("project.endpoint.dialogTitle")}}
- +
@@ -132,6 +132,7 @@ export default { sameLabels: ['instance', 'module', 'project', 'asset', 'endpoint', 'datacenter'], legend: [], searchTime: [], + searchTimeDialog: [], searchTimeSelect: bus.getTimezontDateRange(), currentMsg: {}, chartUnit: 5, @@ -193,7 +194,7 @@ export default { return (key, value) => { if (key == 'type') { if (value == 1) { - value = this.$t('project.project.project') + value = this.$t('project.project.projectName') } else if (value == 2) { value = this.$t('module.module.module') } else if (value == 3) { @@ -247,7 +248,7 @@ export default { // const end = this.searchTime[1] ? this.searchTime[1] : getTime(0, 'h') const start = this.currentMsg.startAt const end = this.currentMsg.endAt - this.searchTime = [start, end] + this.searchTimeDialog = [start, end] const timeDiff = (new Date(end).getTime() - new Date(start).getTime()) / 1000 / (24 * 60 * 60) let step = '15s' if (timeDiff < 1) { @@ -323,7 +324,7 @@ export default { chartData.name += '}' const legend = { name: chartData.name, - alias: alias, + alias: chartData.name, isGray: false } this.legend.push(legend) @@ -344,7 +345,7 @@ export default { this.$refs.messageChart.endLoading() }) } catch (err) { - this.$message.error(err) + // this.$message.error(err) this.$refs.messageChart.endLoading() } }) @@ -584,7 +585,26 @@ export default { this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0 } this.getTableData() - } + }, + computeDistance (str) { + let width = 0 + const html = document.createElement('span') + html.innerText = str + html.className = 'getTextWidth' + document.querySelector('body').appendChild(html) + width = document.querySelector('.getTextWidth').offsetWidth + document.querySelector('.getTextWidth').remove() + return Number('-' + (width + 5)) + }, + returnMarkArea () { + if (this.currentMsg) { + if (this.currentMsg.alertRule.operator == '>' || this.currentMsg.alertRule.operator == '>=') { + return [{ yAxis: this.currentMsg.alertRule.threshold }, {}] + } else { + return [{}, { yAxis: this.currentMsg.alertRule.threshold }] + } + } + }, } } diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index ce6f21a40..a7fbd966f 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -1,7 +1,7 @@