mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-23 00:58:03 +00:00
Merge branch 'pam' of github.com:jumpserver/lina into pam
This commit is contained in:
commit
175b819e8e
@ -242,8 +242,7 @@ export default [
|
|||||||
title: i18n.t('ExecutionDetail'),
|
title: i18n.t('ExecutionDetail'),
|
||||||
permissions: ['accounts.view_pushaccountexecution']
|
permissions: ['accounts.view_pushaccountexecution']
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'account-backup',
|
path: 'account-backup',
|
||||||
|
@ -21,20 +21,13 @@ export default {
|
|||||||
RecordViewSecret,
|
RecordViewSecret,
|
||||||
GenericListTable
|
GenericListTable
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
object: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
const vm = this
|
const vm = this
|
||||||
return {
|
return {
|
||||||
secretUrl: '',
|
secretUrl: '',
|
||||||
showViewSecretDialog: false,
|
showViewSecretDialog: false,
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: `/api/v1/accounts/change-secret-records/?execution_id=${this.object.id}`,
|
url: '/api/v1/accounts/change-secret-records/',
|
||||||
columns: [
|
columns: [
|
||||||
'asset', 'account', 'date_finished', 'is_success', 'error', 'actions'
|
'asset', 'account', 'date_finished', 'is_success', 'error', 'actions'
|
||||||
],
|
],
|
||||||
@ -157,6 +150,10 @@ export default {
|
|||||||
{
|
{
|
||||||
value: 'failed',
|
value: 'failed',
|
||||||
label: this.$t('Failed')
|
label: this.$t('Failed')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('Execution'),
|
||||||
|
value: 'execution_id'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,6 @@ export default {
|
|||||||
title: this.$t('Basic'),
|
title: this.$t('Basic'),
|
||||||
name: 'AccountChangeSecretExecutionInfo',
|
name: 'AccountChangeSecretExecutionInfo',
|
||||||
hidden: () => !this.$hasPerm('accounts.view_changesecretexecution')
|
hidden: () => !this.$hasPerm('accounts.view_changesecretexecution')
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('TaskList'),
|
|
||||||
name: 'AccountChangeSecretRecord',
|
|
||||||
hidden: () => !this.$hasPerm('accounts.view_changesecretrecord')
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
getTitle: this.getExecutionTitle
|
getTitle: this.getExecutionTitle
|
||||||
|
@ -12,13 +12,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
GenericListTable
|
GenericListTable
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
object: {
|
|
||||||
type: Object,
|
|
||||||
required: false,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
@ -35,7 +28,7 @@ export default {
|
|||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
automation: {
|
automation: {
|
||||||
label: this.$t('TaskID'),
|
label: this.$t('ExecutionID'),
|
||||||
formatter: function(row) {
|
formatter: function(row) {
|
||||||
return <span>{row.automation}</span>
|
return <span>{row.automation}</span>
|
||||||
}
|
}
|
||||||
@ -105,6 +98,20 @@ export default {
|
|||||||
callback: function({ row }) {
|
callback: function({ row }) {
|
||||||
window.open(`/api/v1/accounts/change-secret-executions/${row.id}/report/`)
|
window.open(`/api/v1/accounts/change-secret-executions/${row.id}/report/`)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'record',
|
||||||
|
title: this.$t('Record'),
|
||||||
|
can: this.$hasPerm('accounts.view_changesecretrecord'),
|
||||||
|
callback: function({ row }) {
|
||||||
|
return this.$router.push({
|
||||||
|
name: 'AccountChangeSecretList',
|
||||||
|
query: {
|
||||||
|
tab: 'ChangeSecretRecord',
|
||||||
|
execution_id: row.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,14 @@ export default {
|
|||||||
component: () => import(
|
component: () => import(
|
||||||
'@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'
|
'@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('RecordList'),
|
||||||
|
name: 'ChangeSecretRecord',
|
||||||
|
hidden: () => !this.$hasPerm('accounts.view_changesecretrecord'),
|
||||||
|
component: () => import(
|
||||||
|
'@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<RecordViewSecret
|
||||||
|
v-if="showViewSecretDialog"
|
||||||
|
:url="secretUrl"
|
||||||
|
:visible.sync="showViewSecretDialog"
|
||||||
|
/>
|
||||||
|
<GenericListTable :header-actions="headerActions" :table-config="tableConfig" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import GenericListTable from '@/layout/components/GenericListTable/index.vue'
|
||||||
|
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||||
|
import RecordViewSecret from '@/components/Apps/ChangeSecret/RecordViewSecret.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AccountPushRecord',
|
||||||
|
components: {
|
||||||
|
RecordViewSecret,
|
||||||
|
GenericListTable
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
object: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
secretUrl: '',
|
||||||
|
showViewSecretDialog: false,
|
||||||
|
tableConfig: {
|
||||||
|
url: '/api/v1/accounts/push-account-records/',
|
||||||
|
columns: [
|
||||||
|
'asset', 'account', 'date_finished', 'is_success', 'error'
|
||||||
|
],
|
||||||
|
columnsMeta: {
|
||||||
|
asset: {
|
||||||
|
label: this.$t('Asset'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
formatterArgs: {
|
||||||
|
can: this.$hasPerm('assets.view_asset'),
|
||||||
|
getTitle({ row }) {
|
||||||
|
return row.asset.name
|
||||||
|
},
|
||||||
|
getRoute({ row }) {
|
||||||
|
return {
|
||||||
|
name: 'AssetDetail',
|
||||||
|
params: { id: row.asset.id }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
account: {
|
||||||
|
label: this.$t('Username'),
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
formatterArgs: {
|
||||||
|
can: this.$hasPerm('accounts.view_account'),
|
||||||
|
getTitle({ row }) {
|
||||||
|
return row.account.username
|
||||||
|
},
|
||||||
|
getRoute({ row }) {
|
||||||
|
return {
|
||||||
|
name: 'AssetAccountDetail',
|
||||||
|
params: { id: row.account.id }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
is_success: {
|
||||||
|
label: this.$t('Success'),
|
||||||
|
formatter: (row) => {
|
||||||
|
if (row.status === 'pending') {
|
||||||
|
return <i Class='fa fa fa-spinner fa-spin'/>
|
||||||
|
}
|
||||||
|
if (row.is_success) {
|
||||||
|
return <i Class='fa fa-check text-primary'/>
|
||||||
|
}
|
||||||
|
return <i Class='fa fa-times text-danger'/>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasSearch: true,
|
||||||
|
hasRefresh: true,
|
||||||
|
hasLeftActions: true,
|
||||||
|
hasRightActions: true,
|
||||||
|
hasExport: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasCreate: false,
|
||||||
|
hasBulkDelete: false,
|
||||||
|
hasBulkUpdate: false,
|
||||||
|
searchConfig: {
|
||||||
|
exclude: ['id', 'status', 'execution'],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: this.$t('Asset'),
|
||||||
|
value: 'asset_name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('Accounts'),
|
||||||
|
value: 'account_username'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'status',
|
||||||
|
label: this.$t('Status'),
|
||||||
|
type: 'choice',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
default: true,
|
||||||
|
value: 'success',
|
||||||
|
label: this.$t('Success')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'failed',
|
||||||
|
label: this.$t('Failed')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('Execution'),
|
||||||
|
value: 'execution_id'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -12,13 +12,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
GenericListTable
|
GenericListTable
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
object: {
|
|
||||||
type: Object,
|
|
||||||
required: false,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
@ -35,7 +28,7 @@ export default {
|
|||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
automation: {
|
automation: {
|
||||||
label: this.$t('TaskID'),
|
label: this.$t('ExecutionID'),
|
||||||
formatter: function(row) {
|
formatter: function(row) {
|
||||||
return <span>{row.automation}</span>
|
return <span>{row.automation}</span>
|
||||||
}
|
}
|
||||||
@ -91,7 +84,6 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'detail',
|
name: 'detail',
|
||||||
title: this.$t('Detail'),
|
title: this.$t('Detail'),
|
||||||
type: 'info',
|
|
||||||
can: this.$hasPerm('accounts.view_pushaccountexecution'),
|
can: this.$hasPerm('accounts.view_pushaccountexecution'),
|
||||||
callback: function({ row }) {
|
callback: function({ row }) {
|
||||||
return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }})
|
return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }})
|
||||||
@ -100,11 +92,24 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'report',
|
name: 'report',
|
||||||
title: this.$t('Report'),
|
title: this.$t('Report'),
|
||||||
type: 'success',
|
|
||||||
can: this.$hasPerm('accounts.view_pushaccountexecution'),
|
can: this.$hasPerm('accounts.view_pushaccountexecution'),
|
||||||
callback: function({ row }) {
|
callback: function({ row }) {
|
||||||
window.open(`/api/v1/accounts/push-account-executions/${row.id}/report/`)
|
window.open(`/api/v1/accounts/push-account-executions/${row.id}/report/`)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'record',
|
||||||
|
title: this.$t('Record'),
|
||||||
|
can: this.$hasPerm('accounts.view_pushsecretrecord'),
|
||||||
|
callback: function({ row }) {
|
||||||
|
return this.$router.push({
|
||||||
|
name: 'AccountPushList',
|
||||||
|
query: {
|
||||||
|
tab: 'AccountPushRecord',
|
||||||
|
execution_id: row.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,14 @@ export default {
|
|||||||
name: 'AccountPushExecutionList',
|
name: 'AccountPushExecutionList',
|
||||||
hidden: !this.$hasPerm('accounts.view_pushaccountexecution'),
|
hidden: !this.$hasPerm('accounts.view_pushaccountexecution'),
|
||||||
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue')
|
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('RecordList'),
|
||||||
|
name: 'AccountPushRecord',
|
||||||
|
hidden: () => !this.$hasPerm('accounts.view_pushsecretrecord'),
|
||||||
|
component: () => import(
|
||||||
|
'@/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,8 @@ export default {
|
|||||||
this.accountConfig.connectable = data.total_connectivity_ok_accounts
|
this.accountConfig.connectable = data.total_connectivity_ok_accounts
|
||||||
|
|
||||||
// TODO 额外两个字段
|
// TODO 额外两个字段
|
||||||
// this.accountConfig.privilegedAccount = data.total_privileged_accounts
|
this.accountConfig.privilegedAccount = data.total_privileged_accounts
|
||||||
// this.accountConfig.regularAccount = data.total_regular_accounts
|
this.accountConfig.regularAccount = data.total_regular_accounts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,11 @@ export default {
|
|||||||
total_weak_password_accounts: '.',
|
total_weak_password_accounts: '.',
|
||||||
total_long_time_change_password_accounts: '.',
|
total_long_time_change_password_accounts: '.',
|
||||||
total_leaked_password_accounts: '.',
|
total_leaked_password_accounts: '.',
|
||||||
total_repeated_password_accounts: '.'
|
total_repeated_password_accounts: '.',
|
||||||
|
total_password_expired_accounts: '.',
|
||||||
|
total_no_admin_account_accounts: '.',
|
||||||
|
total_password_error_accounts: '.',
|
||||||
|
total_new_found_accounts: '.'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -83,16 +87,32 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Unmanaged'
|
title: this.$t('Unmanaged'),
|
||||||
|
body: {
|
||||||
|
count: this.counter.total_new_found_accounts,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Password expiration'
|
title: this.$t('Password expiration'),
|
||||||
|
body: {
|
||||||
|
count: this.counter.total_password_expired_accounts,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Wrong password'
|
title: this.$t('Error password'),
|
||||||
|
body: {
|
||||||
|
count: this.counter.total_password_error_accounts,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'No admin'
|
title: this.$t('No admin'),
|
||||||
|
body: {
|
||||||
|
count: this.counter.total_no_admin_account_accounts,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ $text-color: #646A73;
|
|||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
|
||||||
.total-section {
|
.total-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -67,12 +67,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.summary-container {
|
.summary-container {
|
||||||
|
|
||||||
.account-secret-summary,
|
.account-secret-summary,
|
||||||
.asset-proportion-summary,
|
.asset-proportion-summary,
|
||||||
.risk-summary,
|
.risk-summary,
|
||||||
.mission-summery {
|
.mission-summery {
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-secret-summary,
|
.account-secret-summary,
|
||||||
|
@ -95,14 +95,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
extensions: ['.vue', '.js', '.json']
|
extensions: ['.vue', '.js', '.json']
|
||||||
},
|
},
|
||||||
plugins: [
|
|
||||||
new CompressionWebpackPlugin({
|
|
||||||
algorithm: 'gzip',
|
|
||||||
test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源
|
|
||||||
threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩)
|
|
||||||
minRatio: 0.8 // 只有压缩率比这个值小的资源才会被处理
|
|
||||||
})
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
// it can improve the speed of the first screen, it is recommended to turn on preload
|
// it can improve the speed of the first screen, it is recommended to turn on preload
|
||||||
@ -153,6 +145,21 @@ module.exports = {
|
|||||||
config => config.devtool('cheap-source-map')
|
config => config.devtool('cheap-source-map')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
config
|
||||||
|
.when(process.env.NODE_ENV === 'production', config => {
|
||||||
|
config
|
||||||
|
.plugin('CompressionWebpackPlugin')
|
||||||
|
.use(CompressionWebpackPlugin, [
|
||||||
|
{
|
||||||
|
algorithm: 'gzip',
|
||||||
|
test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源
|
||||||
|
threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩)
|
||||||
|
minRatio: 0.8, // 只有压缩率比这个值小的资源才会被处理
|
||||||
|
cache: false
|
||||||
|
}
|
||||||
|
])
|
||||||
|
})
|
||||||
|
|
||||||
config
|
config
|
||||||
.when(process.env.NODE_ENV !== 'development',
|
.when(process.env.NODE_ENV !== 'development',
|
||||||
config => {
|
config => {
|
||||||
|
Loading…
Reference in New Issue
Block a user