mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 16:32:28 +00:00
Merge branch 'pam' of github.com:jumpserver/lina into pam
This commit is contained in:
@@ -119,6 +119,16 @@ export default [
|
||||
title: i18n.t('AccountCheckUpdate'),
|
||||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ export default {
|
||||
name: 'AccountBackupExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
getTitle: ({ row }) => row['short_id'],
|
||||
getTitle: ({ row }) => row.automation.slice(0, 8),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_backupaccountexecution')
|
||||
}
|
||||
@@ -60,6 +60,7 @@ export default {
|
||||
label: this.$t('DisplayName'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
getTitle: ({ row }) => row.snapshot.name,
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountBackupDetail',
|
||||
|
@@ -44,7 +44,7 @@ export default {
|
||||
name: 'AccountChangeSecretExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
getTitle: ({ row }) => row['short_id'],
|
||||
getTitle: ({ row }) => row.automation.slice(0, 8),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_changesecretexecution')
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ export default {
|
||||
name: 'AccountDiscoverExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
getTitle: ({ row }) => row['short_id'],
|
||||
getTitle: ({ row }) => row.automation.slice(0, 8),
|
||||
drawer: true
|
||||
}
|
||||
},
|
||||
@@ -70,8 +70,7 @@ export default {
|
||||
getTitle: ({ row }) => row.snapshot.name,
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountDiscoverTaskDetail',
|
||||
params: { id: row.automation },
|
||||
query: { type: 'pam' }
|
||||
params: { id: row.automation }
|
||||
}),
|
||||
drawer: true
|
||||
},
|
||||
|
@@ -50,7 +50,7 @@ export default {
|
||||
name: 'AccountPushExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
getTitle: ({ row }) => row['short_id'],
|
||||
getTitle: ({ row }) => row.automation.slice(0, 8),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_pushaccountexecution')
|
||||
}
|
||||
|
@@ -41,6 +41,7 @@ export default {
|
||||
label: this.$t('Asset'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
can: this.$hasPerm('assets.view_asset'),
|
||||
getTitle({ row }) {
|
||||
return row.asset.name
|
||||
@@ -57,6 +58,7 @@ export default {
|
||||
label: this.$t('Username'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_account'),
|
||||
getTitle({ row }) {
|
||||
return row.account.username
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<script type="text/jsx">
|
||||
import { DrawerListTable as ListTable } from '@/components'
|
||||
import CopyableFormatter from '@/components/Table/TableFormatters/CopyableFormatter.vue'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { ActionsFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export default {
|
||||
name: 'CloudAccountList',
|
||||
@@ -63,6 +63,12 @@ export default {
|
||||
return app.secret
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
formatter: ActionsFormatter,
|
||||
formatterArgs: {
|
||||
hasClone: false
|
||||
}
|
||||
}
|
||||
},
|
||||
columnsExtra: ['secret'],
|
||||
|
@@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'records',
|
||||
title: this.$t('ExecutionRecord'),
|
||||
title: this.$t('CallRecords'),
|
||||
hidden: !this.$hasPerm('audits.view_integrationapplicationlog'),
|
||||
component: () => import('@/views/pam/Integration/components/CallRecords.vue')
|
||||
},
|
||||
|
@@ -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>
|
||||
import { GenericDetailPage } from '@/layout/components'
|
||||
import AccountPushInfo from './AccountPushInfo'
|
||||
import AccountCheckDetail from './Detail.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
AccountPushInfo
|
||||
AccountCheckDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
plan: { name: '', username: '', comment: '' },
|
||||
config: {
|
||||
titlePrefix: this.$t('AccountCheckDetail'),
|
||||
activeMenu: 'AccountPushInfo',
|
||||
url: '/api/v1/accounts/push-account-automations',
|
||||
url: '/api/v1/accounts/check-account-automations',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('Basic'),
|
||||
name: 'AccountPushInfo',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation')
|
||||
name: 'AccountCheckDetail',
|
||||
hidden: () => !this.$hasPerm('accounts.view_accountrisk')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -47,12 +47,11 @@ export default {
|
||||
label: this.$t('ID'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountCheckExecutionDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountCheckExecutionDetail',
|
||||
params: { id: row.id }
|
||||
params: { id: row.automation }
|
||||
}),
|
||||
getTitle: ({ row }) => row['short_id'],
|
||||
getTitle: ({ row }) => row.automation.slice(0, 8),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_checkaccountexecution')
|
||||
}
|
||||
@@ -61,9 +60,10 @@ export default {
|
||||
label: this.$t('DisplayName'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
getTitle: ({ row }) => row.snapshot.name,
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountCheckDetail',
|
||||
name: 'AccountCheckList',
|
||||
params: { id: row.automation }
|
||||
})
|
||||
},
|
||||
|
@@ -33,35 +33,34 @@ export default {
|
||||
name: {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountCheckDetail'
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountCheckDetail',
|
||||
params: { id: row.id }
|
||||
})
|
||||
}
|
||||
},
|
||||
assets: {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
async: false,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AssetDetail',
|
||||
params: {
|
||||
id: row.id
|
||||
}
|
||||
}
|
||||
}
|
||||
drawer: true,
|
||||
getTitle: ({ row }) => row.assets[0].name,
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AssetDetail',
|
||||
params: { id: row.assets[0].id }
|
||||
})
|
||||
}
|
||||
},
|
||||
nodes: {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
async: false,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AssetDetail',
|
||||
params: {
|
||||
id: row.id
|
||||
}
|
||||
}
|
||||
}
|
||||
drawer: true,
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AssetDetail',
|
||||
query: { tab: 'Basic' },
|
||||
params: { id: row.assets[0].id }
|
||||
})
|
||||
}
|
||||
},
|
||||
secret_strategy: {
|
||||
|
Reference in New Issue
Block a user