diff --git a/nezha-fronted/src/components/cli/webSSH.vue b/nezha-fronted/src/components/cli/webSSH.vue
index 05961f2bc..4ebd18331 100644
--- a/nezha-fronted/src/components/cli/webSSH.vue
+++ b/nezha-fronted/src/components/cli/webSSH.vue
@@ -373,25 +373,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
],
diff --git a/nezha-fronted/src/components/common/rightBox/administration/assetTypeBox.vue b/nezha-fronted/src/components/common/rightBox/administration/assetTypeBox.vue
index 2e2fde1fa..6c7288d15 100644
--- a/nezha-fronted/src/components/common/rightBox/administration/assetTypeBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/administration/assetTypeBox.vue
@@ -62,22 +62,6 @@
-
-
diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
index 9db660cb3..5de4a9027 100644
--- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue
@@ -25,27 +25,6 @@
-
-
15) {
return row.remark.substring(0, 12) + '...'
}
- return row.remark = row.remark ? row.remark : ''
+ return row.remark ? row.remark : ''
},
- key: 'remark'
+ tip: function (row) {
+ return row.remark ? row.remark : ''
+ }
}
],
columns: [
@@ -227,32 +232,37 @@ export default {
}
return row.name
},
- key: 'name'
+ tip: function (row) {
+ return row.name
+ }
},
- { title: this.$t('asset.manageIp'), data: 'manageIp', key: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
},
- deep: true,
- orjinNME: 'type'
+ tip: (row) => {
+ return row.type ? row.type.name : ''
+ }
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
},
- deep: true,
- orjinNME: 'model'
+ tip: (row) => {
+ return row.model ? row.model.name : ''
+ }
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
},
- deep: true,
- orjinNME: 'dc'
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
+ }
}
],
object: {},
diff --git a/nezha-fronted/src/components/common/rightBox/dashboardTempBox.vue b/nezha-fronted/src/components/common/rightBox/dashboardTempBox.vue
index be251fb13..310d25448 100644
--- a/nezha-fronted/src/components/common/rightBox/dashboardTempBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/dashboardTempBox.vue
@@ -102,6 +102,9 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
{
@@ -114,6 +117,15 @@ export default {
case 2 : str = 'Endpoint'; break
}
return str
+ },
+ tip: function (row) {
+ let str
+ switch (row.varType) {
+ case 0 : str = 'None'; break
+ case 1 : str = 'Asset'; break
+ case 2 : str = 'Endpoint'; break
+ }
+ return str
}
},
{
@@ -123,6 +135,9 @@ export default {
return row.remark.substring(0, 12) + '...'
}
return row.remark
+ },
+ tip: function (row) {
+ return row.remark
}
}
],
@@ -136,25 +151,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: function (row) {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
],
@@ -168,24 +195,36 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
{
title: this.$t('overall.project'),
data: (row) => {
return row.project ? row.project.name : ''
+ },
+ tip: function (row) {
+ return row.project ? row.project.name : ''
}
},
{
title: this.$t('asset.asset'),
data: (row) => {
return row.asset ? row.asset.name : ''
+ },
+ tip: (row) => {
+ return row.asset ? row.asset.name : ''
}
},
{
title: this.$t('overall.module'),
data: (row) => {
return row.module ? row.module.name : ''
+ },
+ tip: (row) => {
+ return row.module ? row.module.name : ''
}
}
],
diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue
index ed6176632..7cbefa510 100644
--- a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue
+++ b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue
@@ -820,9 +820,12 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('overall.type'), data: 'type' },
+ { title: this.$t('overall.type'), data: 'type', tip: 'type' },
{
title: this.$t('overall.remark'),
data: function (row) {
@@ -830,6 +833,9 @@ export default {
return row.remark.substring(0, 12) + '...'
}
return row.remark
+ },
+ tip: function (row) {
+ return row.remark
}
}
],
@@ -958,25 +964,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
],
@@ -989,18 +1007,27 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
{
title: this.$t('softwareType.category'),
data: (row) => {
return row.type ? row.type.category : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.category : ''
}
},
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
@@ -1010,6 +1037,9 @@ export default {
return row.remark.substring(0, 12) + '...'
}
return row.remark
+ },
+ tip: function (row) {
+ return row.remark
}
}
],
@@ -1134,7 +1164,7 @@ export default {
})
},
getSoftwareAsset () {
- this.$get('/asset/software', { pageSize: -1, projectIds: this.editEndpoint.projectId, assetIds: this.editEndpoint.assetId }).then(res => {
+ this.$get('/asset/software', { pageSize: -1, projectIds: this.editEndpoint.projectId, assetIds: this.editEndpoint.assetId }).then(res => {
this.softwareAssetList = res.data.list
})
},
diff --git a/nezha-fronted/src/components/common/rightBox/issueBox.vue b/nezha-fronted/src/components/common/rightBox/issueBox.vue
index fef490162..13a1cb9a4 100644
--- a/nezha-fronted/src/components/common/rightBox/issueBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/issueBox.vue
@@ -210,25 +210,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
],
diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue
index 38689e3a6..4c762bdc7 100644
--- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue
@@ -755,7 +755,9 @@ export default {
}
return row.name
},
- key: 'name'
+ tip: function (row) {
+ return row.name
+ }
},
{
title: this.$t('overall.remark'),
@@ -765,7 +767,9 @@ export default {
}
return row.remark
},
- key: 'remark'
+ tip: function (row) {
+ return row.remark
+ }
}
],
showAllBasicOption: false,
diff --git a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue
index 9d15af1f2..a5fa6b392 100644
--- a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue
@@ -221,25 +221,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
]
diff --git a/nezha-fronted/src/components/common/v-selectpagenew/Table.js b/nezha-fronted/src/components/common/v-selectpagenew/Table.js
index 5f2d25af3..2c2669a0e 100644
--- a/nezha-fronted/src/components/common/v-selectpagenew/Table.js
+++ b/nezha-fronted/src/components/common/v-selectpagenew/Table.js
@@ -33,7 +33,7 @@ export default {
key: idx,
domProps: {
innerHTML: this.renderColumn(val, col),
- title: col.deep ? val[col.orjinNME].name : val[col.key]
+ title: this.renderTip(val, col)
}
})
}))
@@ -47,6 +47,13 @@ export default {
case 'string': return row[col.data]
case 'function': return col.data(row)
}
+ },
+ renderTip (row, col) {
+ if (!row || !Object.keys(row).length || !col || !col.tip) return ''
+ switch (typeof col.tip) {
+ case 'string': return row[col.tip]
+ case 'function': return col.tip(row)
+ }
}
}
}
diff --git a/nezha-fronted/src/components/page/integration/integration-tabs/automatic.vue b/nezha-fronted/src/components/page/integration/integration-tabs/automatic.vue
index 4a2d839bd..3931db3d6 100644
--- a/nezha-fronted/src/components/page/integration/integration-tabs/automatic.vue
+++ b/nezha-fronted/src/components/page/integration/integration-tabs/automatic.vue
@@ -58,25 +58,37 @@ export default {
return row.name.substring(0, 12) + '...'
}
return row.name
+ },
+ tip: function (row) {
+ return row.name
}
},
- { title: this.$t('asset.manageIp'), data: 'manageIp' },
+ { title: this.$t('asset.manageIp'), data: 'manageIp', tip: 'manageIp' },
{
title: this.$t('overall.type'),
data: (row) => {
return row.type ? row.type.name : ''
+ },
+ tip: (row) => {
+ return row.type ? row.type.name : ''
}
},
{
title: this.$t('asset.model'),
data: (row) => {
return row.model ? row.model.name : ''
+ },
+ tip: (row) => {
+ return row.model ? row.model.name : ''
}
},
{
title: this.$t('overall.dc'),
data: (row) => {
return row.dc ? row.dc.name : ''
+ },
+ tip: (row) => {
+ return row.dc ? row.dc.name : ''
}
}
]