diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index bef350603..e3ea6221b 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -113,6 +113,7 @@ "OnlyLatestVersion": "仅最新版本", "Os": "操作系统", "Other": "其它", + "Hardware": "硬件信息", "Password": "密码", "PasswordWithoutSpecialCharHelpText": "不能包含特殊字符", "Pending": "等待", @@ -186,6 +187,7 @@ "Active": "激活中", "actionsTips":"剪切板权限控制目前仅支持 RDP/VNC 协议的连接", "Add": "添加", + "UpdateAssetDetail": "配置更多信息", "AddSuccessMsg": "添加成功", "Auth": "认证", "BadRequestErrorMsg": "请求错误,请检查填写内容", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index f97e42c3a..4b74c314d 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -58,6 +58,7 @@ "AdminUserDetail": "Admin user detail", "AdminUserListHelpMessage": "Admin users are asset (charged server) on the root, or have NOPASSWD: ALL sudo permissions users, JumpServer users of the system using the user to `push system user`, `get assets hardware information`, etc.\n", "Asset": "Asset", + "Hardware": "Hardware", "AssetDetail": "Asset detail", "AssetList": "Asset list", "AssetListHelpMessage": "The left side is the asset tree, right click to create, delete, and change the tree node, authorization asset is also organized as a node, and the right side is the asset under that node\n", @@ -186,6 +187,7 @@ "actionsTips":"Clipboard's copy and paste control only support RDP/VNC protocol.", "Active": "Active", "Add": "Add", + "UpdateAssetDetail": "Update more detail", "AddSuccessMsg": "Add success", "Auth": "Authorization", "BadRequestErrorMsg": "Bad request, please check again", diff --git a/src/router/assets.js b/src/router/assets.js index 2bed8d2c8..451f51b98 100644 --- a/src/router/assets.js +++ b/src/router/assets.js @@ -34,6 +34,13 @@ export default [ component: () => import('@/views/assets/Asset/AssetCreateUpdate.vue'), meta: { title: i18n.t('route.AssetUpdate'), activeMenu: '/assets/assets' }, hidden: true + }, + { + path: 'detail/:id/update', + name: 'AssetMoreInformationEdit', + component: () => import('@/views/assets/Asset/AssetMoreInformationEdit.vue'), + meta: { title: i18n.t('common.UpdateAssetDetail'), activeMenu: '/assets/assets' }, + hidden: true } ] }, diff --git a/src/views/assets/Asset/AssetList.vue b/src/views/assets/Asset/AssetList.vue index fd9b82506..a1f0db4de 100644 --- a/src/views/assets/Asset/AssetList.vue +++ b/src/views/assets/Asset/AssetList.vue @@ -136,7 +136,17 @@ export default { const id = row.id const url = `/api/v1/assets/assets/${id}/` return this.$axios.delete(url) - } + }, + extraActions: [ + { + name: 'View', + title: this.$t(`common.UpdateAssetDetail`), + type: 'primary', + callback: function({ cellValue, tableData }) { + return this.$router.push({ name: 'AssetMoreInformationEdit', params: { id: cellValue }}) + } + } + ] } } } diff --git a/src/views/assets/Asset/AssetMoreInformationEdit.vue b/src/views/assets/Asset/AssetMoreInformationEdit.vue new file mode 100644 index 000000000..6934701fa --- /dev/null +++ b/src/views/assets/Asset/AssetMoreInformationEdit.vue @@ -0,0 +1,103 @@ + + + + +