mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
Merge branch 'v3' of github.com:jumpserver/lina into v3
This commit is contained in:
@@ -245,6 +245,7 @@
|
||||
"SystemUsers": "System users",
|
||||
"Test": "Test",
|
||||
"TestAssetsConnective": "Test assets connective",
|
||||
"TestAccountConnective": "Test account connective",
|
||||
"TestAllSystemUsersConnective": "Test all system users connective",
|
||||
"TestConnection": "Test connection",
|
||||
"Type": "Type",
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
"SystemUsers": "システムユーザー",
|
||||
"Test": "テスト",
|
||||
"TestAssetsConnective": "アセットの接続性をテストします",
|
||||
"TestAccountConnective": "アカウント接続のテスト",
|
||||
"TestAllSystemUsersConnective": "すべてのシステムユーザーの接続性をテストします",
|
||||
"TestConnection": "テスト接続",
|
||||
"Type": "タイプ",
|
||||
|
||||
@@ -257,6 +257,7 @@
|
||||
"SystemUsers": "系统用户",
|
||||
"Test": "测试",
|
||||
"TestAssetsConnective": "测试资产可连接性",
|
||||
"TestAccountConnective": "测试账号可连接性",
|
||||
"TestAllSystemUsersConnective": "测试所有系统用户可连接性",
|
||||
"TestConnection": "测试连接",
|
||||
"Type": "类型",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
import DetailCard from '@/components/DetailCard'
|
||||
import QuickActions from '@/components/QuickActions'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
name: 'Detail',
|
||||
@@ -47,6 +48,24 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
title: this.$t('assets.TestAccountConnective'),
|
||||
attrs: {
|
||||
type: 'primary',
|
||||
label: this.$t('assets.Test'),
|
||||
disabled: !vm.$hasPerm('assets.test_account')
|
||||
},
|
||||
callbacks: Object.freeze({
|
||||
click: () => {
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/accounts/${this.object.id}/verify/`,
|
||||
{ action: 'test' }
|
||||
).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<script>
|
||||
import BaseList from './components/BaseList'
|
||||
import { ActionsFormatter } from '@/components/TableFormatters'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -37,6 +38,19 @@ export default {
|
||||
return this.$axios.delete(url)
|
||||
},
|
||||
extraActions: [
|
||||
{
|
||||
name: 'Test',
|
||||
title: this.$t('common.Test'),
|
||||
can: this.$hasPerm('assets.test_assetconnectivity'),
|
||||
callback: ({ row }) => {
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/assets/${row.id}/tasks/`,
|
||||
{ action: 'refresh' }
|
||||
).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'View',
|
||||
title: this.$t(`common.UpdateAssetDetail`),
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
import AssetBulkUpdateDialog from './AssetBulkUpdateDialog'
|
||||
import { connectivityMeta } from '@/components/AccountListTable/const'
|
||||
import PlatformDialog from '../components/PlatformDialog'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -134,7 +135,22 @@ export default {
|
||||
const id = row.id
|
||||
const url = `/api/v1/assets/assets/${id}/`
|
||||
return this.$axios.delete(url)
|
||||
}
|
||||
},
|
||||
extraActions: [
|
||||
{
|
||||
name: 'Test',
|
||||
title: this.$t('common.Test'),
|
||||
can: this.$hasPerm('assets.test_assetconnectivity'),
|
||||
callback: ({ row }) => {
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/assets/${row.id}/tasks/`,
|
||||
{ action: 'refresh' }
|
||||
).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user