Skip to content

Commit

Permalink
Merge branch 'pam' of github.com:jumpserver/lina into pam
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jan 8, 2025
2 parents dd75e16 + 84c78f9 commit a7378d2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

<script>
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
export default {
name: 'AccountBackupExecutionInfo',
components: {
AutoDetailCard
AutoDetailCard,
TwoCol
},
props: {
object: {
Expand All @@ -19,48 +21,15 @@ export default {
}
},
data() {
this.isEmail = this.object.snapshot.backup_type === 'email'
return {
url: `/api/v1/accounts/account-backup-plan-executions/${this.object.id}/`,
detailFields: [
'id',
{
key: this.$t('TimeDelta'),
value: this.object.timedelta.toFixed(2) + 's'
key: this.$t('DisplayName'),
value: this.object.snapshot.name
},
'date_start', 'is_success', 'reason',
{
key: this.$t('Recipient') + ' A',
value: this.object.snapshot.recipients_part_one,
formatter: (item, val) => {
const recipientA = this.isEmail ? Object.values(val).map(item => item[0].split('(')[0]).join(', ') : '-'
return <span>{recipientA}</span>
}
},
{
key: this.$t('Recipient') + ' B',
value: this.object.snapshot.recipients_part_two,
formatter: (item, val) => {
const recipientB = this.isEmail ? Object.values(val).map(item => item[0].split('(')[0]).join(', ') : '-'
return <span>{recipientB}</span>
}
},
{
key: this.$t('RecipientServer') + ' A',
value: this.object.snapshot.obj_recipients_part_one,
formatter: (item, val) => {
const recipientServerA = this.isEmail ? Object.values(val).map(item => item[0]).join(', ') : '-'
return <span>{recipientServerA}</span>
}
},
{
key: this.$t('RecipientServer') + ' B',
value: this.object.snapshot.obj_recipients_part_two,
formatter: (item, val) => {
const recipientServerB = this.isEmail ? Object.values(val).map(item => item[0]).join(', ') : '-'
return <span>{recipientServerB}</span>
}
}
'date_start', 'date_finished', 'duration', 'status'
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { GenericDetailPage } from '@/layout/components'
import AccountBackupExecutionInfo from './AccountBackupExecutionInfo.vue'
export default {
name: 'AccountBackupExecutionDetail',
components: {
GenericDetailPage,
AccountBackupExecutionInfo
Expand All @@ -19,9 +20,9 @@ export default {
return {
execution: { id: '' },
config: {
url: '/api/v1/accounts/account-backup-plan-executions',
activeMenu: 'AccountBackupExecutionInfo',
actions: {
detailApiUrl: `/api/v1/accounts/account-backup-plan-executions/${this.$route.params.id}/`,
hasUpdate: false,
hasDelete: false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

<script>
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
export default {
name: 'AccountChangeSecretExecutionInfo',
components: {
TwoCol,
AutoDetailCard
},
props: {
Expand All @@ -20,7 +22,7 @@ export default {
},
data() {
return {
url: `/api/v1/accounts/change-secret-executions/${this.object.id}`,
url: `/api/v1/accounts/change-secret-executions/${this.object.id}/`,
detailFields: [
'id',
{
Expand Down
4 changes: 3 additions & 1 deletion src/views/accounts/AccountPush/AccountPushDetail/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@

<script>
import { GenericDetailPage } from '@/layout/components'
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
import AccountPushInfo from './AccountPushInfo.vue'
export default {
components: {
TwoCol,
GenericDetailPage,
AccountPushInfo
},
data() {
return {
plan: { name: '', username: '', comment: '' },
config: {
titlePrefix: this.$t('AccountCheckDetail'),
titlePrefix: this.$t('AccountPushDetail'),
activeMenu: 'AccountPushInfo',
url: '/api/v1/accounts/push-account-automations',
submenu: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},
data() {
return {
url: `/api/v1/accounts/push-account-executions/${this.object.id}`,
url: `/api/v1/accounts/push-account-executions/${this.object.id}/`,
detailFields: [
'id',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
formatterArgs: {
getTitle: ({ row }) => row.snapshot.name,
getRoute: ({ row }) => ({
name: 'AccountCheckDetail',
name: 'AccountPushDetail',
params: { id: row.automation }
})
},
Expand Down

0 comments on commit a7378d2

Please sign in to comment.