diff --git a/nezha-fronted/src/components/common/rightBox/asset/assetDiscoveryBox.vue b/nezha-fronted/src/components/common/rightBox/asset/assetDiscoveryBox.vue new file mode 100644 index 000000000..00770d58d --- /dev/null +++ b/nezha-fronted/src/components/common/rightBox/asset/assetDiscoveryBox.vue @@ -0,0 +1,137 @@ + + diff --git a/nezha-fronted/src/components/common/table/asset/assetDiscoveryTable.vue b/nezha-fronted/src/components/common/table/asset/assetDiscoveryTable.vue index d1af763bf..b90404f42 100644 --- a/nezha-fronted/src/components/common/table/asset/assetDiscoveryTable.vue +++ b/nezha-fronted/src/components/common/table/asset/assetDiscoveryTable.vue @@ -119,43 +119,43 @@ export default { minWidth: 250, sortable: 'custom' }, { - label: this.$t('IP subnet'), + label: this.$t('asset.ipSubnet'), prop: 'subnet', show: true, minWidth: 250, sortable: 'custom' }, { - label: this.$t('SNMP credentials'), + label: this.$t('config.mib.credentials'), prop: 'snmpCredentialIds', show: true, minWidth: 250, sortable: 'custom' }, { - label: this.$t('Schedule'), + label: this.$t('alert.config.schedEnable'), prop: 'schedule', show: true, minWidth: 200, sortable: 'custom' }, { - label: this.$t('Last execute time'), + label: this.$t('asset.lastExecuteTime'), prop: 'uts', show: true, minWidth: 250, sortable: 'custom' }, { - label: this.$t('Duration'), + label: this.$t('config.terminallog.duration'), prop: 'duration', show: true, minWidth: 160, sortable: 'custom' }, { - label: this.$t('State'), + label: this.$t('overall.state'), prop: 'status', show: true, minWidth: 250, sortable: 'custom' }, { - label: this.$t('Discovery hosts'), + label: this.$t('asset.discoveryHosts'), prop: 'total', show: true, minWidth: 200, diff --git a/nezha-fronted/src/components/page/asset/assetDiscovery.vue b/nezha-fronted/src/components/page/asset/assetDiscovery.vue index 71935d437..74cf3b5b4 100644 --- a/nezha-fronted/src/components/page/asset/assetDiscovery.vue +++ b/nezha-fronted/src/components/page/asset/assetDiscovery.vue @@ -81,7 +81,13 @@ - + + @@ -93,14 +99,15 @@ import dataListMixin from '@/components/common/mixin/dataList' import assetDiscoveryTable from '@/components/common/table/asset/assetDiscoveryTable' import routerPathParams from '@/components/common/mixin/routerPathParams' import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions' - +import assetDiscoveryBox from '@/components/common/rightBox/asset/assetDiscoveryBox' export default { name: 'assetDiscovery', components: { deleteButton, nzDataList, assetDiscoveryTable, - topToolMoreOptions + topToolMoreOptions, + assetDiscoveryBox }, mixins: [dataListMixin, routerPathParams], data () { @@ -143,14 +150,14 @@ export default { blankObject: { id: '', name: '', - metaKey: '', - groupIds: '', - group: {}, - search: '0', - display: '0', - type: 'TEXT', - param: {}, - remark: '' + subnet: '', + snmpCredentialIds: '', + schedule: { + type: 1, + stime: '2021-01-10 10:10:10', + repeat: 1, + nums: [1, 2, 3, 4, 5, 6, 7] + } }, blankMetaGroup: { id: '', @@ -168,8 +175,8 @@ export default { }, methods: { add () { - this.object = JSON.parse(JSON.stringify(this.blankObject)) - this.rightBox.metaShow = true + this.object = this.$loadsh.cloneDeep(this.blankObject) + this.rightBox.show = true }, edit (row) { this.$get(`${this.url}/${row.id}`).then(response => {