mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-08 02:18:44 +00:00
Compare commits
19 Commits
pr@v3@fixe
...
v2.26.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c599a6aa21 | ||
|
|
7f34195ae4 | ||
|
|
b23950aefd | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -1,6 +1,8 @@
|
||||
import empty from '@/layout/empty'
|
||||
import i18n from '@/i18n/i18n'
|
||||
|
||||
const activateMenu = '/console/assets/assets'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'cloud',
|
||||
@@ -20,7 +22,7 @@ export default [
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.CloudSync'),
|
||||
activeMenu: '/console/assets/assets'
|
||||
activeMenu: activateMenu
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -71,6 +73,7 @@ export default [
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.AccountDetail'),
|
||||
activeMenu: activateMenu,
|
||||
permissions: ['xpack.view_account']
|
||||
}
|
||||
}
|
||||
@@ -121,7 +124,8 @@ export default [
|
||||
name: 'SyncInstanceTaskDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('xpack.Cloud.SyncInstanceTaskDetail')
|
||||
title: i18n.t('xpack.Cloud.SyncInstanceTaskDetail'),
|
||||
activeMenu: activateMenu
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -38,6 +38,7 @@ export default {
|
||||
},
|
||||
tableConfig: {
|
||||
url: `/api/v1/xpack/cloud/sync-instance-tasks/${this.object.id}/instances/`,
|
||||
hasSelection: false,
|
||||
columns: [
|
||||
'instance_id',
|
||||
{
|
||||
|
||||
@@ -58,10 +58,7 @@ export default {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
permissions: 'xpack.view_syncinstancedetail',
|
||||
route: 'SyncInstanceTaskDetail',
|
||||
routeQuery: {
|
||||
activeTab: 'detail'
|
||||
}
|
||||
route: 'SyncInstanceTaskDetail'
|
||||
}
|
||||
},
|
||||
history_count: {
|
||||
|
||||
@@ -37,7 +37,8 @@ import DetailCard from '@/components/DetailCard'
|
||||
import QuickActions from '@/components/QuickActions'
|
||||
import UserConfirmDialog from '@/components/UserConfirmDialog'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import store from '@/store'
|
||||
import { getProfile } from '@/api/users'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ProfileInfo',
|
||||
@@ -47,14 +48,9 @@ export default {
|
||||
QuickActions,
|
||||
UserConfirmDialog
|
||||
},
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => store.state.users.profile
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
object: this.userProfile || {},
|
||||
url: `/api/v1/users/profile/`,
|
||||
showPasswordDialog: false,
|
||||
currentEdit: '',
|
||||
@@ -160,7 +156,7 @@ export default {
|
||||
attrs: {
|
||||
disabled: true,
|
||||
name: 'site_msg',
|
||||
model: this.object.receive_backends.indexOf('site_msg') !== -1
|
||||
model: this.object?.receive_backends.indexOf('site_msg') !== -1
|
||||
},
|
||||
callbacks: {
|
||||
change: this.updateUserReceiveBackends
|
||||
@@ -171,7 +167,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'email',
|
||||
model: this.object.receive_backends.indexOf('email') !== -1
|
||||
model: this.object?.receive_backends.indexOf('email') !== -1
|
||||
},
|
||||
callbacks: {
|
||||
change: this.updateUserReceiveBackends
|
||||
@@ -182,7 +178,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'wecom',
|
||||
model: this.object.receive_backends.indexOf('wecom') !== -1
|
||||
model: this.object?.receive_backends.indexOf('wecom') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_WECOM,
|
||||
callbacks: {
|
||||
@@ -194,7 +190,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'dingtalk',
|
||||
model: this.object.receive_backends.indexOf('dingtalk') !== -1
|
||||
model: this.object?.receive_backends.indexOf('dingtalk') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_DINGTALK,
|
||||
callbacks: {
|
||||
@@ -206,7 +202,7 @@ export default {
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
name: 'feishu',
|
||||
model: this.object.receive_backends.indexOf('feishu') !== -1
|
||||
model: this.object?.receive_backends.indexOf('feishu') !== -1
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_FEISHU,
|
||||
callbacks: {
|
||||
@@ -217,6 +213,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userProfile: state => state.users.profile
|
||||
}),
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
@@ -299,6 +298,12 @@ export default {
|
||||
return url
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getProfile().then(res => {
|
||||
this.object = res
|
||||
this.$store.commit('users/SET_PROFILE', res)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
updateUserReceiveBackends(val) {
|
||||
this.$axios.patch(
|
||||
|
||||
@@ -60,6 +60,7 @@ export default {
|
||||
actions: {
|
||||
prop: 'id',
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('orgs.change_organization'),
|
||||
canDelete: function({ row }) {
|
||||
return !row.is_default && vm.$hasPerm('orgs.delete_organization')
|
||||
},
|
||||
|
||||
@@ -39,9 +39,10 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('terminal.change_endpoint'),
|
||||
updateRoute: 'EndpointUpdate',
|
||||
cloneRoute: 'EndpointCreate',
|
||||
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001'
|
||||
canDelete: ({ row }) => row.id !== '00000000-0000-0000-0000-000000000001' && this.$hasPerm('terminal.delete_endpoint')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
canUpdate: this.$hasPerm('terminal.change_endpointrule'),
|
||||
updateRoute: 'EndpointRuleUpdate',
|
||||
cloneRoute: 'EndpointRuleCreate'
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
hasDelete: hasDelete,
|
||||
canUpdate: this.$hasPerm('users.change_user'),
|
||||
extraActions: [
|
||||
{
|
||||
title: this.$t('users.Remove'),
|
||||
|
||||
Reference in New Issue
Block a user