mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-14 21:14:15 +00:00
perf: risk detail
This commit is contained in:
parent
fa93f52f87
commit
485f45a2ea
@ -119,6 +119,16 @@ export default [
|
|||||||
title: i18n.t('AccountCheckUpdate'),
|
title: i18n.t('AccountCheckUpdate'),
|
||||||
permissions: ['accounts.view_accountrisk']
|
permissions: ['accounts.view_accountrisk']
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id',
|
||||||
|
component: () => import('@/views/pam/RiskDetect/AccountCheckDetail/index.vue'),
|
||||||
|
name: 'AccountCheckDetail',
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('RiskDetectionDetail'),
|
||||||
|
permissions: ['accounts.view_accountrisk']
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
<template>
|
|
||||||
<TwoCol>
|
|
||||||
<template>
|
|
||||||
<AutoDetailCard :fields="detailFields" :object="object" :url="url" />
|
|
||||||
</template>
|
|
||||||
<template #right>
|
|
||||||
<QuickActions :actions="quickActions" type="primary" />
|
|
||||||
</template>
|
|
||||||
</TwoCol>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { QuickActions } from '@/components'
|
|
||||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
|
||||||
import { openTaskPage } from '@/utils/jms'
|
|
||||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'AccountPushInfo',
|
|
||||||
components: {
|
|
||||||
TwoCol,
|
|
||||||
AutoDetailCard,
|
|
||||||
QuickActions
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
object: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
quickActions: [
|
|
||||||
{
|
|
||||||
title: this.$t('ManualExecution'),
|
|
||||||
attrs: {
|
|
||||||
type: 'primary',
|
|
||||||
label: this.$t('Execute'),
|
|
||||||
disabled: !this.$hasPerm('accounts.add_changesecretexecution') || !this.object.is_active
|
|
||||||
},
|
|
||||||
callbacks: {
|
|
||||||
click: function() {
|
|
||||||
this.$axios.post(
|
|
||||||
`/api/v1/accounts/push-account-executions/`,
|
|
||||||
{ automation: this.object.id }
|
|
||||||
).then(res => {
|
|
||||||
openTaskPage(res['task'])
|
|
||||||
})
|
|
||||||
}.bind(this)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
url: `/api/v1/accounts/push-account-automations/${this.object.id}`,
|
|
||||||
detailFields: [
|
|
||||||
'id', 'name',
|
|
||||||
{
|
|
||||||
key: this.$t('Accounts'),
|
|
||||||
value: this.object.accounts.join(', ')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: this.$t('AssetsOfNumber'),
|
|
||||||
value: this.object.assets.length
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: this.$t('NodeOfNumber'),
|
|
||||||
value: this.object.nodes.length
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: this.$t('PasswordStrategy'),
|
|
||||||
value: this.object.secret_strategy.label
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: this.$t('Crontab'),
|
|
||||||
value: this.object.crontab,
|
|
||||||
formatter: (item, val) => {
|
|
||||||
return <span>{this.object.is_periodic ? val : '-'}</span>
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: this.$t('Interval'),
|
|
||||||
value: this.object.interval,
|
|
||||||
formatter: (item, val) => {
|
|
||||||
return <span>{this.object.is_periodic ? val : '-'}</span>
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'date_created', 'date_updated', 'comment', 'is_active'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
65
src/views/pam/RiskDetect/AccountCheckDetail/Detail.vue
Normal file
65
src/views/pam/RiskDetect/AccountCheckDetail/Detail.vue
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<TwoCol>
|
||||||
|
<template>
|
||||||
|
<AutoDetailCard :fields="detailFields" :object="object" :url="url" />
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<QuickActions :actions="quickActions" type="primary" />
|
||||||
|
</template>
|
||||||
|
</TwoCol>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { QuickActions } from '@/components'
|
||||||
|
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
||||||
|
import { openTaskPage } from '@/utils/jms'
|
||||||
|
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AccountCheckDetail',
|
||||||
|
components: {
|
||||||
|
TwoCol,
|
||||||
|
AutoDetailCard,
|
||||||
|
QuickActions
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
object: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
quickActions: [
|
||||||
|
{
|
||||||
|
title: this.$t('ManualExecution'),
|
||||||
|
attrs: {
|
||||||
|
type: 'primary',
|
||||||
|
label: this.$t('Execute'),
|
||||||
|
disabled: !this.$hasPerm('accounts.add_checkaccountautomation') || !this.object.is_active
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
click: function() {
|
||||||
|
this.$axios.post(
|
||||||
|
`/api/v1/accounts/check-account-executions/`,
|
||||||
|
{ automation: this.object.id }
|
||||||
|
).then(res => {
|
||||||
|
openTaskPage(res['task'])
|
||||||
|
})
|
||||||
|
}.bind(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: `/api/v1/accounts/check-account-automations/${this.object.id}`,
|
||||||
|
detailFields: [
|
||||||
|
'id', 'name', 'date_created', 'date_updated', 'comment'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -8,25 +8,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericDetailPage } from '@/layout/components'
|
import { GenericDetailPage } from '@/layout/components'
|
||||||
import AccountPushInfo from './AccountPushInfo'
|
import AccountCheckDetail from './Detail.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GenericDetailPage,
|
GenericDetailPage,
|
||||||
AccountPushInfo
|
AccountCheckDetail
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
plan: { name: '', username: '', comment: '' },
|
plan: { name: '', username: '', comment: '' },
|
||||||
config: {
|
config: {
|
||||||
titlePrefix: this.$t('AccountCheckDetail'),
|
titlePrefix: this.$t('AccountCheckDetail'),
|
||||||
activeMenu: 'AccountPushInfo',
|
url: '/api/v1/accounts/check-account-automations',
|
||||||
url: '/api/v1/accounts/push-account-automations',
|
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
title: this.$t('Basic'),
|
title: this.$t('Basic'),
|
||||||
name: 'AccountPushInfo',
|
name: 'AccountCheckDetail',
|
||||||
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation')
|
hidden: () => !this.$hasPerm('accounts.view_accountrisk')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user