mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-07 18:08:50 +00:00
Compare commits
8 Commits
pr@dev@fix
...
v2.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45d294ac93 | ||
|
|
3bb6549d75 | ||
|
|
eeb1b85d8a | ||
|
|
06535c8493 | ||
|
|
9487ec3f4c | ||
|
|
a5ac9f627a | ||
|
|
1f5869b4cc | ||
|
|
7902604952 |
@@ -19,7 +19,9 @@ export default {
|
||||
return {
|
||||
initial: {
|
||||
type: appTypeMeta.name,
|
||||
path: pathInitial
|
||||
attrs: {
|
||||
path: pathInitial
|
||||
}
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name', 'type']],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<GenericCreateUpdatePage v-bind="$data" />
|
||||
<GenericCreateUpdatePage v-bind="$data" :perform-submit="performSubmit" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -94,6 +94,19 @@ export default {
|
||||
updateSuccessNextRoute: { name: 'AssetList' },
|
||||
createSuccessNextRoute: { name: 'AssetList' }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUrl() {
|
||||
const params = this.$route.params
|
||||
let url = this.url
|
||||
if (params.id) {
|
||||
url = `${url}${params.id}/`
|
||||
}
|
||||
return url
|
||||
},
|
||||
performSubmit(validValues) {
|
||||
return this.$axios['patch'](this.getUrl(), validValues)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name', 'login_mode', 'username', 'username_same_with_user', 'priority', 'protocol']],
|
||||
[this.$t('assets.AutoPush'), ['auto_push']],
|
||||
[this.$t('assets.AutoPush'), ['auto_push', 'system_groups']],
|
||||
[this.$t('common.Auth'), ['update_password', 'password', 'ad_domain']],
|
||||
[this.$t('common.Other'), ['comment']]
|
||||
],
|
||||
@@ -133,6 +133,11 @@ export default {
|
||||
}
|
||||
return !form.update_password
|
||||
}
|
||||
},
|
||||
system_groups: {
|
||||
label: this.$t('assets.LinuxUserAffiliateGroup'),
|
||||
hidden: (item) => ['ssh', 'rdp'].indexOf(item.protocol) === -1 || !item.auto_push || item.username_same_with_user,
|
||||
helpText: this.$t('assets.GroupsHelpMessage')
|
||||
}
|
||||
},
|
||||
url: '/api/v1/assets/system-users/',
|
||||
|
||||
@@ -115,7 +115,6 @@ export default {
|
||||
name: 'K8S',
|
||||
title: 'K8S',
|
||||
type: 'primary',
|
||||
has: this.$store.getters.hasValidLicense,
|
||||
group: this.$t('assets.OtherProtocol')
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
:create-success-next-route="successUrl"
|
||||
:update-success-next-route="successUrl"
|
||||
:has-detail-in-msg="false"
|
||||
:after-get-form-value="afterGetFormValue"
|
||||
:perform-submit="performSubmit"
|
||||
/>
|
||||
</template>
|
||||
@@ -59,6 +60,10 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
afterGetFormValue(validValues) {
|
||||
validValues.meta.HOSTS = validValues.meta.HOSTS.toString()
|
||||
return validValues
|
||||
},
|
||||
performSubmit(validValues) {
|
||||
const method = this.getMethod()
|
||||
validValues.meta.HOSTS = validValues.meta.HOSTS.split(',').map(item => (item.trim()))
|
||||
|
||||
@@ -10,6 +10,7 @@ import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import UserPassword from '@/components/UserPassword'
|
||||
import RoleCheckbox from '@/views/users/User/components/RoleCheckbox'
|
||||
import rules from '@/components/DataForm/rules'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -109,6 +110,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['currentOrgIsRoot'])
|
||||
},
|
||||
mounted() {
|
||||
if (this.currentOrgIsRoot) {
|
||||
this.fieldsMeta.groups.el.disabled = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cleanFormValue(value) {
|
||||
const method = this.getMethod()
|
||||
|
||||
Reference in New Issue
Block a user