diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 3661372cc..29785f32a 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -26,10 +26,12 @@ :height="mainTableHeight" :now-time="nowTime" :table-data="tableData" + :alertMessageTabNew="true" @del="del" @edit="edit" @orderBy="tableDataSort" @reload="getTableData" + @addSilence="addSilence" @selectionChange="selectionChange" @showBottomBox="(target, item) => { $refs.dataList.showBottomBox(target, item) }" @toDelete="toDeleteMessage" @@ -55,6 +57,7 @@ + @@ -69,6 +72,7 @@ import alertMessageTable from '@/components/common/table/alert/alertMessageTable import chartDataFormat from '@/components/charts/chartDataFormat' import chart from '@/components/page/dashboard/overview/chart' import { alertMessage as alertMessageConstant, fromRoute } from '@/components/common/js/constants' +import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox' export default { name: 'alertMessageTab', @@ -76,6 +80,7 @@ export default { components: { nzBottomDataList, alertMessageTable, + alertSilenceBox, chart }, props: { @@ -97,6 +102,22 @@ export default { url: 'alert/message', tableId: 'alertMessageModule', // 需要分页的table的id,用于记录每页数量 state: '1', + blankSilenceObject: { + id: '', + startAt: '', + endAt: '', + ruleId: '', + type: 'asset', + linkId: '', + remark: '', + time: [], + matchers: [ + { name: '', value: '', regex: 0 } + ], + name: '' + }, + objectSilence: {}, + silenceBoxShow: false, searchMsg: { // 给搜索框子组件传递的信息 searchLabelList: [ { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue index f97e7da9f..6560228a0 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue @@ -22,6 +22,9 @@ :assetTab="true" @del="del" @edit="edit" + @cli="cli" + @duplicate="duplicate" + @addSilence="addSilence" @orderBy="tableDataSort" @reload="getTableData" @selectionChange="selectionChange" @@ -45,6 +48,7 @@ @close="closeRightBox" @refresh="getTableData"> + @@ -54,14 +58,17 @@ import subDataListMixin from '@/components/common/mixin/subDataList' import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList' import assetTable from '@/components/common/table/asset/assetTable' import assetBox from '@/components/common/rightBox/asset/assetBox' -import {fromRoute} from "@/components/common/js/constants"; +import { fromRoute } from "@/components/common/js/constants"; +import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox' + export default { name: 'assetTab', mixins: [dataListMixin, subDataListMixin], components: { nzBottomDataList, assetTable, - assetBox + assetBox, + alertSilenceBox }, data () { return { @@ -96,6 +103,11 @@ export default { disabled: false }] }, + blankSilenceObject: { + startAt: '' + }, + objectSilence: {}, + silenceBoxShow: false, searchLabel: { dcIds: this.obj.id }, brandData: [], modelData: [], @@ -107,6 +119,10 @@ export default { } }, methods: { + duplicate (row) { + this.object = { ...row, id: '', name: `${row.name}-copy` } + this.rightBox.show = true + }, getStateData () { return new Promise(resolve => { this.$get('asset/stateConf').then(response => { @@ -176,8 +192,15 @@ export default { resolve() }) }) + }, + cli (row) { + const consoleParam = { + id: row.id, + host: row.manageIp, + port: row.authProtocolPort + } + this.$store.commit('addConsole', consoleParam) } - }, watch: { obj: { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue index 82ade5a04..0c5a768f2 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTabNew.vue @@ -25,6 +25,7 @@ @del="del" @edit="edit" @orderBy="tableDataSort" + @addSilence="addSilence" @reload="getTableData" @selectionChange="selectionChange" > @@ -36,6 +37,7 @@ + @@ -45,7 +47,8 @@ import subDataListMixin from '@/components/common/mixin/subDataList' import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList' import endpointTable from '@/components/common/table/settings/endpointTable' import EditEndpointBoxNew from '@/components/common/rightBox/editEndpointBoxNew' -import {fromRoute} from "@/components/common/js/constants"; +import { fromRoute } from "@/components/common/js/constants"; +import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox' export default { name: 'terminalLogTab', @@ -53,7 +56,8 @@ export default { components: { nzBottomDataList, endpointTable, - EditEndpointBoxNew + EditEndpointBoxNew, + alertSilenceBox }, watch: { obj: { @@ -72,21 +76,26 @@ export default { searchMsg: { // 给搜索框子组件传递的信息 zheze_none: true, searchLabelList: [{ - id: 13, - name: this.$t('project.endpoint.endpointId'), - type: 'input', - label: 'ids', - disabled: false - }, - { - id: 12, - name: this.$t('project.endpoint.endpointName'), - type: 'input', - label: 'name', - disabled: false - } + id: 13, + name: this.$t('project.endpoint.endpointId'), + type: 'input', + label: 'ids', + disabled: false + }, + { + id: 12, + name: this.$t('project.endpoint.endpointName'), + type: 'input', + label: 'name', + disabled: false + } ] }, + blankSilenceObject: { + startAt: '' + }, + objectSilence: {}, + silenceBoxShow: false, nowTime: '', rightBox: { editShow: false, diff --git a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue index 21d51cd70..8692f5f28 100644 --- a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue @@ -148,7 +148,8 @@ export default { showOption: { type: Boolean, default: true - } + }, + alertMessageTabNew: Boolean }, mixins: [table, bus], data () { diff --git a/nezha-fronted/src/components/common/table/settings/dcTable.vue b/nezha-fronted/src/components/common/table/settings/dcTable.vue index 2b874dad1..d9072861d 100644 --- a/nezha-fronted/src/components/common/table/settings/dcTable.vue +++ b/nezha-fronted/src/components/common/table/settings/dcTable.vue @@ -118,12 +118,12 @@ export default { prop: 'id', show: true, width: 80, - sortable:'custom' + sortable: 'custom' }, { label: this.$t('overall.name'), prop: 'name', show: true, - sortable:'custom' + sortable: 'custom' }, { label: this.$t('asset.location'), prop: 'location', @@ -132,12 +132,12 @@ export default { label: this.$t('config.dc.cabinetNum'), prop: 'cabinetNum', show: true, - sortable:'custom' + sortable: 'custom' }, { label: this.$t('config.dc.assets'), prop: 'assetNum', show: true, - sortable:'custom' + sortable: 'custom' }, { label: this.$t('config.dc.alert'), prop: 'alertNum', @@ -162,11 +162,14 @@ export default { label: this.$t('config.dc.state'), prop: 'state', show: true, - sortable:'custom' + sortable: 'custom' } ] } }, + mounted () { + console.log(this.userData) + }, methods: { showTableTooltip, hideTableTooltip, diff --git a/nezha-fronted/src/components/common/table/settings/endpointTable.vue b/nezha-fronted/src/components/common/table/settings/endpointTable.vue index e6c7f616c..7745f85b2 100644 --- a/nezha-fronted/src/components/common/table/settings/endpointTable.vue +++ b/nezha-fronted/src/components/common/table/settings/endpointTable.vue @@ -107,7 +107,7 @@ - {{$t('overall.query')}} + {{$t('overall.query')}} {{$t('overall.edit')}} {{$t('overall.delete')}} {{$t('overall.silenceAlert')}}