diff --git a/nezha-fronted/src/components/common/project/popData/Info.vue b/nezha-fronted/src/components/common/project/popData/Info.vue
index 3ed5548fd..e040de1d5 100644
--- a/nezha-fronted/src/components/common/project/popData/Info.vue
+++ b/nezha-fronted/src/components/common/project/popData/Info.vue
@@ -20,16 +20,12 @@
Descripsion
@@ -58,15 +54,17 @@ export default {
remark: '',
port: '',
path: '',
- seq: ''
+ seq: '',
+ assetNum: '',
+ endpointNum: ''
}
}
},
mounted () {
this.loading = true
- this.$get('/module', { id: this.moduleId }).then(res => {
+ this.$get('/monitor/module/' + this.moduleId).then(res => {
this.loading = false
- this.moduleInfo = res.data.list[0]
+ this.moduleInfo = res.data
})
},
methods: {},
diff --git a/nezha-fronted/src/components/common/project/popData/alertTable.vue b/nezha-fronted/src/components/common/project/popData/alertTable.vue
index 97812c01b..a73af1702 100644
--- a/nezha-fronted/src/components/common/project/popData/alertTable.vue
+++ b/nezha-fronted/src/components/common/project/popData/alertTable.vue
@@ -1,163 +1,41 @@
-
-
Alert messages
-
-
-
-
-
-
-
-
-
-
-
-
+
{{$t('dashboard.overview.alert.alertMessage')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -167,6 +45,10 @@ import bus from '@/libs/bus'
import nzAlertTag from '@/components/page/alert/nzAlertTag'
import alertRuleInfo from '@/components/common/alert/alertRuleInfo'
import alertLabel from '@/components/common/alert/alertLabel'
+import nzDataList from '@/components/common/table/nzDataList'
+import dataListMixin from '@/components/common/mixin/dataList'
+import alertMessageTable from '@/components/common/table/alert/alertMessageTable.vue'
+import { alertMessage as alertMessageConstant } from '@/components/common/js/constants'
export default {
name: 'alertTable',
props: {
@@ -176,8 +58,11 @@ export default {
components: {
'nz-alert-tag': nzAlertTag,
alertRuleInfo: alertRuleInfo,
- alertLabel: alertLabel
+ alertLabel: alertLabel,
+ nzDataList,
+ alertMessageTable
},
+ mixins: [dataListMixin],
watch: {
},
computed: {
@@ -207,6 +92,10 @@ export default {
},
data () {
return {
+ url: 'alert/message',
+ state: '1',
+ tableId: '',
+ stateOptions: alertMessageConstant.states,
pageObj: {
pageNo: 1,
pageSize: this.$CONSTANTS.defaultPageSize,
@@ -248,56 +137,41 @@ export default {
],
searchTime: [],
searchMsg: { // 给搜索框子组件传递的信息
- zheze_none: true,
- searchLabelList: [{
- id: 1,
- name: this.$t('alert.alertName'),
- type: 'input',
- label: 'alertName',
- disabled: false
- }, /* {
- id: 3,
- name: this.$t('alert.list.type'),
- type: 'select',
- label: 'alertType',
+ searchLabelList: [
+ {
+ id: 26,
+ name: this.$t('alert.list.id'),
+ type: 'id',
+ label: 'id',
disabled: false
- }, */{
- id: 20,
- name: this.$t('alert.severity'),
- type: 'selectString',
- label: 'severity',
- disabled: false
- }, {
- id: 21,
- name: this.$t('asset.asset'),
- type: 'asset',
- label: 'asset',
- disabled: false
- }, {
- id: 22,
- name: this.$t('project.project.projectName'),
- type: 'project',
- label: 'project',
- disabled: false
- }, {
- id: 23,
- name: this.$t('project.module.module'),
- type: 'module',
- label: 'module',
- disabled: false
- }, {
- id: 24,
- name: this.$t('project.endpoint.endpoint'),
- type: 'input',
- label: 'endpointId',
- disabled: false
- }, {
- id: 25,
- name: this.$t('alert.list.state'),
- type: 'select',
- label: 'alertMessageState',
- disabled: false
- }]
+ },
+ {
+ name: this.$t('alert.alertRule'),
+ type: 'input',
+ label: 'ruleName',
+ disabled: false
+ }, {
+ name: this.$t('asset.asset'),
+ type: 'input',
+ label: 'assetName',
+ disabled: false
+ }, {
+ name: 'Endpoint',
+ type: 'input',
+ label: 'endpointName',
+ disabled: false
+ }, {
+ name: this.$t('alert.summary'),
+ type: 'input',
+ label: 'summary',
+ disabled: false
+ }, {
+ name: 'Labels',
+ type: 'input',
+ label: 'labels',
+ disabled: false
+ }
+ ]
},
tableData: [],
loading: false,
@@ -317,14 +191,14 @@ export default {
}
},
mounted () {
- this.getAlertList()
+ this.getTableData()
},
methods: {
- getAlertList: function () {
- this.loading = true
+ getTableData: function () {
+ this.tools.loading = true
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
- this.$set(this.searchLabel, 'moduleId', this.moduleId)
+ this.$set(this.searchLabel, 'moduleIds', this.moduleId)
if (this.searchTime && this.searchTime.length > 1) {
this.$set(this.searchLabel, 'startAt', bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss'))
this.$set(this.searchLabel, 'endAt', bus.timeFormate(this.searchTime[1], 'yyyy-MM-dd hh:mm:ss'))
@@ -332,8 +206,8 @@ export default {
delete this.searchLabel.startAt
delete this.searchLabel.endAt
}
- this.$get('alert/message', { ...this.searchLabel }).then(response => {
- this.loading = false
+ this.$get(this.url + '?state=' + this.state, { ...this.searchLabel }).then(response => {
+ this.tools.loading = false
if (response.code == 200) {
this.nowTime = this.utcTimeToTimezoneStr(response.time)
this.tableData = response.data.list
@@ -369,12 +243,12 @@ export default {
},
pageNo (val) {
this.pageObj.pageNo = val
- this.getAlertList()
+ this.getTableData()
},
pageSize (val) {
this.pageObj.pageSize = val
localStorage.setItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId, val)
- this.getAlertList()
+ this.getTableData()
},
selectChange (s) {
const ids = []
@@ -432,7 +306,7 @@ export default {
}
this.pageObj.orderBy = orderBy
this.$set(this.searchLabel, 'orderBy', orderBy)
- this.getAlertList()
+ this.getTableData()
},
/* 关闭弹框 */
esc (refresh) {
@@ -463,7 +337,7 @@ export default {
if (this.$refs.alertListTable && this.$refs.alertListTable.bodyWrapper) {
this.$refs.alertListTable.bodyWrapper.scrollTop = 0
}
- this.getAlertList()
+ this.getTableData()
},
showExportDialog () {
@@ -483,6 +357,9 @@ export default {
}
.right-box-title{
font-weight: bold;
+ padding-left: 20px;
+ position: absolute;
+ z-index: 1;
}
.mc{
position: fixed;
@@ -527,5 +404,8 @@ export default {
color: #FFFFFF;
padding: 2px 6px;
}
+ .right-box /deep/ .list-page .main-container{
+ background: #fff;
+ }
/* end--table*/
diff --git a/nezha-fronted/src/components/common/project/popData/assetTable.vue b/nezha-fronted/src/components/common/project/popData/assetTable.vue
index 3d56a4748..b8ae61ea1 100644
--- a/nezha-fronted/src/components/common/project/popData/assetTable.vue
+++ b/nezha-fronted/src/components/common/project/popData/assetTable.vue
@@ -1,119 +1,51 @@
-
-
-
-
-
-
-
-
-
-
-
Asset
-
-
-
-
-
-
-
-
-
-
-
-
+
{{$t('asset.asset')}}
+
+
+
+
+
+
+
+
+