mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
Merge branch 'pam' of github.com:jumpserver/lina into pam
This commit is contained in:
@@ -20,7 +20,7 @@ export default [
|
||||
component: () => import('@/views/sessions/SessionList/index.vue'),
|
||||
name: 'AccountSessionList',
|
||||
meta: {
|
||||
title: i18n.t('AccountSessions'),
|
||||
title: i18n.t('SessionList'),
|
||||
permissions: []
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export default [
|
||||
component: () => import('@/views/accounts/AccountActivity/AccountActivityList.vue'),
|
||||
name: 'AccountActivityList',
|
||||
meta: {
|
||||
title: i18n.t('AccountActivity'),
|
||||
title: i18n.t('Activity'),
|
||||
permissions: ['audits.view_operatelog']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ export default [
|
||||
name: 'AccountChangeSecretList',
|
||||
meta: {
|
||||
menuTitle: i18n.t('ChangeSecret'),
|
||||
title: i18n.t('AccountChangeSecret'),
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
@@ -143,7 +143,7 @@ export default [
|
||||
name: 'AccountChangeSecretDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('AccountChangeSecret'),
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
@@ -296,8 +296,7 @@ export default [
|
||||
component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/index.vue'),
|
||||
name: 'AccountBackupDetail',
|
||||
meta: {
|
||||
title: i18n.t('AccountBackupDetail'),
|
||||
activeMenu: '/console/accounts/automations'
|
||||
title: i18n.t('AccountBackupDetail')
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
|
||||
@@ -20,18 +20,14 @@ export default {
|
||||
return {
|
||||
plan: { name: '', comment: '' },
|
||||
config: {
|
||||
url: `/api/v1/accounts/account-backup-plans/`,
|
||||
url: `/api/v1/accounts/account-backup-plans`,
|
||||
activeMenu: 'AccountBackupInfo',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('Basic'),
|
||||
name: 'AccountBackupInfo'
|
||||
}
|
||||
],
|
||||
actions: {
|
||||
detailApiUrl: `/api/v1/accounts/account-backup-plans/`,
|
||||
deleteSuccessRoute: 'AccountBackupList'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,17 +24,30 @@ export default {
|
||||
tableConfig: {
|
||||
url: '/api/v1/accounts/account-backup-plan-executions/',
|
||||
columns: [
|
||||
'automation', 'trigger',
|
||||
'automation', 'backup_name', 'trigger',
|
||||
'date_start', 'date_finished', 'duration', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
default: [
|
||||
'automation', 'trigger',
|
||||
'automation', 'backup_name', 'trigger',
|
||||
'date_start', 'date_finished', 'duration', 'actions'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
automation: {
|
||||
label: this.$t('ID'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountBackupExecutionDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountBackupExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_backupaccountexecution')
|
||||
}
|
||||
},
|
||||
backup_name: {
|
||||
label: this.$t('DisplayName'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
@@ -67,15 +80,6 @@ export default {
|
||||
openTaskPage(row['id'])
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'detail',
|
||||
title: this.$t('Detail'),
|
||||
type: 'info',
|
||||
can: this.$hasPerm('accounts.view_backupaccountexecution'),
|
||||
callback: function({ row }) {
|
||||
return this.$router.push({ name: 'AccountBackupExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'report',
|
||||
title: this.$t('Report'),
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GenericListTable } from '@/layout/components'
|
||||
import { ArrayFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import { GenericListTable } from '@/layout/components'
|
||||
|
||||
export default {
|
||||
name: 'AccountBackupList',
|
||||
@@ -46,13 +46,7 @@ export default {
|
||||
name: {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountBackupDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountBackupDetail',
|
||||
params: { id: row.id },
|
||||
query: { type: 'pam' }
|
||||
}),
|
||||
drawer: true
|
||||
route: 'AccountBackupDetail'
|
||||
}
|
||||
},
|
||||
types: {
|
||||
|
||||
@@ -28,9 +28,16 @@ export default {
|
||||
},
|
||||
columnsMeta: {
|
||||
automation: {
|
||||
label: this.$t('ExecutionID'),
|
||||
formatter: function(row) {
|
||||
return <span>{row.automation}</span>
|
||||
label: this.$t('ID'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountChangeSecretExecutionDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountChangeSecretExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_changesecretexecution')
|
||||
}
|
||||
},
|
||||
change_secret_name: {
|
||||
@@ -81,15 +88,6 @@ export default {
|
||||
openTaskPage(row['id'])
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'detail',
|
||||
title: this.$t('Detail'),
|
||||
type: 'info',
|
||||
can: this.$hasPerm('accounts.view_changesecretexecution'),
|
||||
callback: function({ row }) {
|
||||
return this.$router.push({ name: 'AccountChangeSecretExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'report',
|
||||
title: this.$t('Report'),
|
||||
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
component: () => import('@/views/dashboard/ChangeSecret')
|
||||
},
|
||||
{
|
||||
title: this.$t('AccountChangeSecret'),
|
||||
title: this.$t('ChangeSecret'),
|
||||
name: 'AccountChangeSecretList',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation'),
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue')
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: this.$t('RecordList'),
|
||||
title: this.$t('AccountRecord'),
|
||||
name: 'ChangeSecretRecord',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretrecord'),
|
||||
component: () => import(
|
||||
|
||||
@@ -35,9 +35,15 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
automation: {
|
||||
label: this.$t('TaskID'),
|
||||
formatter: function(row) {
|
||||
return <span>{row.automation}</span>
|
||||
label: this.$t('ID'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountDiscoverExecutionDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountDiscoverExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
drawer: true
|
||||
}
|
||||
},
|
||||
account_gather_name: {
|
||||
@@ -52,7 +58,8 @@ export default {
|
||||
}),
|
||||
drawer: true
|
||||
},
|
||||
id: ({ row }) => row.automation
|
||||
id: ({ row }) => row.automation,
|
||||
can: this.$hasPerm('accounts.view_gatheraccountsexecution')
|
||||
},
|
||||
timedelta: {
|
||||
label: this.$t('TimeDelta'),
|
||||
@@ -78,15 +85,6 @@ export default {
|
||||
openTaskPage(row['id'])
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'detail',
|
||||
title: this.$t('Detail'),
|
||||
type: 'info',
|
||||
callback: ({ row }) => {
|
||||
this.handleDetailCallback(row)
|
||||
return this.$router.push({ name: 'AccountDiscoverExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'report',
|
||||
title: this.$t('Report'),
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
|
||||
<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
|
||||
},
|
||||
@@ -28,7 +26,7 @@ export default {
|
||||
{
|
||||
title: this.$t('Basic'),
|
||||
name: 'AccountPushInfo',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation')
|
||||
hidden: () => !this.$hasPerm('accounts.view_pushaccountautomation')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<GenericListTable ref="listTable" :header-actions="headerActions" :table-config="tableConfig" />
|
||||
<GenericListTable
|
||||
ref="listTable"
|
||||
:detail-drawer="detailDrawer"
|
||||
:header-actions="headerActions"
|
||||
:table-config="tableConfig"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -14,6 +19,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailDrawer: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'),
|
||||
tableConfig: {
|
||||
url: '/api/v1/accounts/push-account-executions',
|
||||
columns: [
|
||||
@@ -28,9 +34,16 @@ export default {
|
||||
},
|
||||
columnsMeta: {
|
||||
automation: {
|
||||
label: this.$t('ExecutionID'),
|
||||
formatter: function(row) {
|
||||
return <span>{row.automation}</span>
|
||||
label: this.$t('ID'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
route: 'AccountPushExecutionDetail',
|
||||
getRoute: ({ row }) => ({
|
||||
name: 'AccountPushExecutionDetail',
|
||||
params: { id: row.id }
|
||||
}),
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_pushaccountexecution')
|
||||
}
|
||||
},
|
||||
push_user_name: {
|
||||
@@ -81,14 +94,6 @@ export default {
|
||||
openTaskPage(row['id'])
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'detail',
|
||||
title: this.$t('Detail'),
|
||||
can: this.$hasPerm('accounts.view_pushaccountexecution'),
|
||||
callback: function({ row }) {
|
||||
return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'report',
|
||||
title: this.$t('Report'),
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('RecordList'),
|
||||
title: this.$t('AccountRecord'),
|
||||
name: 'AccountPushRecord',
|
||||
hidden: () => !this.$hasPerm('accounts.view_pushsecretrecord'),
|
||||
component: () => import(
|
||||
|
||||
@@ -5,13 +5,10 @@
|
||||
</div>
|
||||
|
||||
<div class="total-section">
|
||||
<!-- {{ $t('Total accounts') }} -->
|
||||
<div class="sub-title"> Total accounts </div>
|
||||
<div class="total-account"> {{ config.total }} </div>
|
||||
|
||||
<div class="week-add">
|
||||
<!-- {{ $t('WeekAdd') }} 英文内容替换为 New this week -->
|
||||
<div class="week-add-title"> New this week: </div>
|
||||
<div class="week-add-title"> {{ $t('WeekAdd') }} </div>
|
||||
<div class="week-add-value"> + {{ config.weekAdd }} </div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +51,7 @@ export default {
|
||||
key: 'privileged'
|
||||
},
|
||||
{
|
||||
label: this.$t('Reset secret'),
|
||||
label: this.$t('ResetSecret'),
|
||||
key: 'resetSecret'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,12 +40,15 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentLanguage: 'python',
|
||||
currentLanguage: 'curl',
|
||||
readme: '',
|
||||
code: '',
|
||||
languages: [
|
||||
{ label: 'cURL', value: 'curl' },
|
||||
{ label: 'Python', value: 'python' },
|
||||
{ label: 'Go', value: 'go' }
|
||||
{ label: 'Go', value: 'go' },
|
||||
{ label: 'Java', value: 'java' },
|
||||
{ label: 'Node.js', value: 'node' }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -73,7 +76,15 @@ export default {
|
||||
const url = `/api/v1/accounts/integration-applications/sdks/?language=${this.currentLanguage}`
|
||||
this.$axios.get(url).then(res => {
|
||||
this.readme = res.readme
|
||||
this.code = `\`\`\`${this.currentLanguage}\n${res.code}\n\`\`\``
|
||||
const highlightMapper = {
|
||||
'curl': 'bash',
|
||||
'python': 'python',
|
||||
'go': 'go',
|
||||
'java': 'java',
|
||||
'node': 'javascript'
|
||||
}
|
||||
const language = highlightMapper[this.currentLanguage] || 'bash'
|
||||
this.code = `\`\`\`${language}\n${res.code}\n\`\`\``
|
||||
this.$nextTick(() => {
|
||||
this.highlightCode()
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
component: () => import('./AccountCheckTaskList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('Executions'),
|
||||
title: this.$t('ExecutionList'),
|
||||
name: 'AccountCheckExecution',
|
||||
hidden: !this.$hasPerm('accounts.view_checkaccountautomation'),
|
||||
component: () => import('./AccountCheckExecutionList.vue')
|
||||
|
||||
Reference in New Issue
Block a user