Merge remote-tracking branch 'origin/feature-audits-pages'

This commit is contained in:
ibuler
2020-05-06 19:24:35 +08:00
4 changed files with 89 additions and 1 deletions

View File

@@ -606,6 +606,17 @@ const cn = {
'securityPasswordSpecialChar': '开启后,用户密码修改、重置必须包含特殊字符'
}
},
audits: {
'username': '用户名',
'type': '类型',
'ip': 'IP',
'city': '城市',
'user_agent': 'Agent',
'mfa': '多因子认证',
'reason': '原因',
'status': '状态',
'datetime': '日期'
},
...zhLocale
}

View File

@@ -420,6 +420,17 @@ const en = {
'securityPasswordSpecialChar': '开启后,用户密码修改、重置必须包含特殊字符'
}
},
audits: {
'username': 'Username',
'type': 'Type',
'ip': 'IP',
'city': 'City',
'user_agent': 'UA',
'mfa': 'MFA',
'reason': 'Reason',
'status': 'Status',
'datetime': 'Date'
},
...enLocale
}

View File

@@ -0,0 +1,66 @@
<template>
<GenericTreeListPage :table-config="tableConfig" :header-actions="headerActions" :tree-setting="treeSetting" />
</template>
<script>
import GenericTreeListPage from '@/layout/components/GenericTreeListPage'
export default {
components: {
GenericTreeListPage
},
data() {
return {
tableConfig: {
url: '/api/v1/audits/login-logs/',
columns: [
{
prop: 'username',
label: this.$t('audits.username')
},
{
prop: 'type',
label: this.$t('audits.type'),
sortable: true
},
{
prop: 'ip',
label: this.$t('audits.ip')
},
{
prop: 'city',
label: this.$t('audits.city')
},
{
prop: 'user_agent',
label: this.$tc('audits.user_agent')
},
{
prop: 'mfa',
label: this.$t('audits.mfa')
},
{
prop: 'reason',
label: this.$t('audits.reason')
},
{
prop: 'status',
label: this.$t('audits.status')
},
{
prop: 'datetime',
label: this.$t('audits.datetime')
}
]
},
headerActions: {
createRoute: 'AssetCreate'
}
}
}
}
</script>
<style>
</style>

View File

@@ -2,7 +2,7 @@ export default [
{
path: 'login-log',
name: 'LoginLog',
component: () => import('@/views/tree/index'),
component: () => import('@/views/audits/LoginLogList.vue'),
meta: { title: 'LoginLog' }
},
{