mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-14 04:45:42 +00:00
Merge pull request #3346 from jumpserver/pr@dev@perf_setting
perf: 再次修改设置
This commit is contained in:
commit
26fac22b82
@ -1529,6 +1529,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"AppOps": "Task center",
|
||||||
"Ticket": "Ticket",
|
"Ticket": "Ticket",
|
||||||
"TaskList": "Task list",
|
"TaskList": "Task list",
|
||||||
"Announcement": "Announcement",
|
"Announcement": "Announcement",
|
||||||
|
@ -1524,6 +1524,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"AppOps": "タスクセンター",
|
||||||
"Ticket": "チケット",
|
"Ticket": "チケット",
|
||||||
"TaskList": "タスクリスト",
|
"TaskList": "タスクリスト",
|
||||||
"Announcement": "公告",
|
"Announcement": "公告",
|
||||||
|
@ -1521,6 +1521,7 @@
|
|||||||
"PublishStatus": "发布状态"
|
"PublishStatus": "发布状态"
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"AppOps": "任务中心",
|
||||||
"Ticket": "工单",
|
"Ticket": "工单",
|
||||||
"TaskList": "任务列表",
|
"TaskList": "任务列表",
|
||||||
"Announcement": "公告",
|
"Announcement": "公告",
|
||||||
|
@ -20,15 +20,18 @@ export default {
|
|||||||
[
|
[
|
||||||
this.$t('common.Basic'),
|
this.$t('common.Basic'),
|
||||||
[
|
[
|
||||||
'FORGOT_PASSWORD_URL',
|
'FORGOT_PASSWORD_URL', 'LOGIN_REDIRECT_MSG_ENABLED'
|
||||||
'LOGIN_REDIRECT_MSG_ENABLED'
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
},
|
||||||
submitMethod() {
|
submitMethod() {
|
||||||
return 'patch'
|
return 'patch'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -33,21 +33,23 @@ export default {
|
|||||||
encryptedFields: ['AUTH_LDAP_BIND_PASSWORD'],
|
encryptedFields: ['AUTH_LDAP_BIND_PASSWORD'],
|
||||||
fields: [
|
fields: [
|
||||||
[
|
[
|
||||||
this.$t('setting.LDAPServerInfo'),
|
this.$t('common.Basic'),
|
||||||
[
|
[
|
||||||
'AUTH_LDAP_SERVER_URI', 'AUTH_LDAP_BIND_DN', 'AUTH_LDAP_BIND_PASSWORD'
|
'AUTH_LDAP', 'AUTH_LDAP_SERVER_URI',
|
||||||
|
'AUTH_LDAP_BIND_DN', 'AUTH_LDAP_BIND_PASSWORD'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
this.$t('setting.LDAPUser'),
|
this.$t('setting.LDAPUser'),
|
||||||
[
|
[
|
||||||
'AUTH_LDAP_SEARCH_OU', 'AUTH_LDAP_SEARCH_FILTER', 'AUTH_LDAP_USER_ATTR_MAP'
|
'AUTH_LDAP_SEARCH_OU', 'AUTH_LDAP_SEARCH_FILTER',
|
||||||
|
'AUTH_LDAP_USER_ATTR_MAP'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
this.$t('common.Other'),
|
this.$t('common.Other'),
|
||||||
[
|
[
|
||||||
'AUTH_LDAP_CONNECT_TIMEOUT', 'AUTH_LDAP_SEARCH_PAGED_SIZE', 'AUTH_LDAP'
|
'AUTH_LDAP_CONNECT_TIMEOUT', 'AUTH_LDAP_SEARCH_PAGED_SIZE'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
<TabPage v-if="!loading" :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="activeMenu" />
|
<component :is="activeMenu" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
@ -43,35 +43,38 @@ export default {
|
|||||||
extraBackends = [
|
extraBackends = [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.OIDC'),
|
title: this.$t('setting.OIDC'),
|
||||||
name: 'OIDC'
|
name: 'OIDC',
|
||||||
|
key: 'AUTH_OPENID'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.SAML2'),
|
title: this.$t('setting.SAML2'),
|
||||||
name: 'SAML2'
|
name: 'SAML2',
|
||||||
|
key: 'AUTH_SAML2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.OAuth2'),
|
title: this.$t('setting.OAuth2'),
|
||||||
name: 'OAuth2'
|
name: 'OAuth2',
|
||||||
|
key: 'AUTH_OAUTH2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.WeCom'),
|
title: this.$t('setting.WeCom'),
|
||||||
name: 'WeCom'
|
name: 'WeCom',
|
||||||
|
key: 'AUTH_WECOM'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.DingTalk'),
|
title: this.$t('setting.DingTalk'),
|
||||||
name: 'DingTalk'
|
name: 'DingTalk',
|
||||||
|
key: 'AUTH_DINGTALK'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.FeiShu'),
|
title: this.$t('setting.FeiShu'),
|
||||||
name: 'FeiShu'
|
name: 'FeiShu',
|
||||||
|
key: 'AUTH_FEISHU'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.Radius'),
|
title: this.$t('setting.Radius'),
|
||||||
name: 'Radius'
|
name: 'Radius',
|
||||||
},
|
key: 'AUTH_RADIUS'
|
||||||
{
|
|
||||||
title: this.$t('setting.SSO'),
|
|
||||||
name: 'SSO'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -85,11 +88,13 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.Ldap'),
|
title: this.$t('setting.Ldap'),
|
||||||
name: 'LDAP'
|
name: 'LDAP',
|
||||||
|
key: 'AUTH_LDAP'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('setting.CAS'),
|
title: this.$t('setting.CAS'),
|
||||||
name: 'CAS'
|
name: 'CAS',
|
||||||
|
key: 'AUTH_CAS'
|
||||||
},
|
},
|
||||||
...extraBackends
|
...extraBackends
|
||||||
]
|
]
|
||||||
@ -101,11 +106,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.$axios.get('/api/v1/settings/setting/?category=auth').then(res => {
|
||||||
|
for (const item of this.submenu) {
|
||||||
|
const key = item.key
|
||||||
|
if (!key) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (res[key]) {
|
||||||
|
item.icon = 'fa-check-circle text-primary'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang='scss' scoped>
|
||||||
|
>>> .el-tabs__item .fa {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -26,8 +26,7 @@ export default {
|
|||||||
fields: [
|
fields: [
|
||||||
[
|
[
|
||||||
this.$t('common.BasicInfo'), [
|
this.$t('common.BasicInfo'), [
|
||||||
'SITE_URL', // 'USER_GUIDE_URL',
|
'SITE_URL' // 'USER_GUIDE_URL',
|
||||||
'GLOBAL_ORG_DISPLAY_NAME'
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[this.$t('xpack.NavHelp'), [
|
[this.$t('xpack.NavHelp'), [
|
||||||
@ -38,18 +37,14 @@ export default {
|
|||||||
SITE_URL: {
|
SITE_URL: {
|
||||||
rules: [rules.Required]
|
rules: [rules.Required]
|
||||||
},
|
},
|
||||||
GLOBAL_ORG_DISPLAY_NAME: {
|
|
||||||
hidden: () => !this.hasValidLicense()
|
|
||||||
},
|
|
||||||
HELP_DOCUMENT_URL: {
|
HELP_DOCUMENT_URL: {
|
||||||
label: this.$t('xpack.helpDocument'),
|
label: this.$t('xpack.helpDocument'),
|
||||||
helpText: this.$t('xpack.helpDocumentTip'),
|
helpText: this.$t('xpack.helpDocumentTip')
|
||||||
hidden: () => !this.hasValidLicense()
|
|
||||||
},
|
},
|
||||||
HELP_SUPPORT_URL: {
|
HELP_SUPPORT_URL: {
|
||||||
label: this.$t('xpack.helpSupport'),
|
label: this.$t('xpack.helpSupport'),
|
||||||
helpText: this.$t('xpack.helpSupportTip'),
|
helpText: this.$t('xpack.helpSupportTip')
|
||||||
hidden: () => !this.hasValidLicense()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
successUrl: { name: 'Basic' },
|
successUrl: { name: 'Basic' },
|
||||||
@ -60,8 +55,8 @@ export default {
|
|||||||
submitMethod() {
|
submitMethod() {
|
||||||
return 'patch'
|
return 'patch'
|
||||||
},
|
},
|
||||||
hasValidLicense() {
|
noValidLicense() {
|
||||||
return this.$store.getters.hasValidLicense
|
return !this.$store.getters.hasValidLicense
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
54
src/views/settings/Feature/Ops.vue
Normal file
54
src/views/settings/Feature/Ops.vue
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm v-bind="config" @submitSuccess="submitSuccess" />
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
|
import { IBox } from '@/components'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Ops',
|
||||||
|
components: {
|
||||||
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
config: {
|
||||||
|
fields: [
|
||||||
|
[this.$t('common.Basic'), [
|
||||||
|
'SECURITY_COMMAND_EXECUTION', 'SECURITY_COMMAND_BLACKLIST'
|
||||||
|
]]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
},
|
||||||
|
successUrl: { name: 'Settings', params: { activeMenu: 'Basic' }},
|
||||||
|
url: '/api/v1/settings/setting/?category=ops',
|
||||||
|
hasReset: false,
|
||||||
|
submitMethod() {
|
||||||
|
return 'patch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitSuccess(res) {
|
||||||
|
this.$emit('input', !!res[this.enableField])
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -11,10 +11,11 @@ import TabPage from '@/layout/components/TabPage/index.vue'
|
|||||||
import Announcement from './Announcement.vue'
|
import Announcement from './Announcement.vue'
|
||||||
import Vault from './Vault.vue'
|
import Vault from './Vault.vue'
|
||||||
import Ticket from './Ticket.vue'
|
import Ticket from './Ticket.vue'
|
||||||
|
import Ops from './Ops.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Feature',
|
name: 'Feature',
|
||||||
components: { TabPage, Announcement, Vault, Ticket },
|
components: { TabPage, Announcement, Vault, Ticket, Ops },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeMenu: 'Basic',
|
activeMenu: 'Basic',
|
||||||
@ -35,6 +36,10 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('setting.Ticket'),
|
title: this.$t('setting.Ticket'),
|
||||||
name: 'Ticket'
|
name: 'Ticket'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.AppOps'),
|
||||||
|
name: 'Ops'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericListPage :header-actions="headerActions" :table-config="tableConfig" />
|
<div>
|
||||||
|
<GenericListPage :header-actions="headerActions" :table-config="tableConfig" />
|
||||||
|
<Dialog
|
||||||
|
:show-buttons="false"
|
||||||
|
:title="$tc('common.Setting')"
|
||||||
|
:visible.sync="visible"
|
||||||
|
>
|
||||||
|
<GenericCreateUpdateForm v-bind="form" @submitSuccess="visible=false" />
|
||||||
|
</Dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericListPage } from '@/layout/components'
|
import { GenericCreateUpdateForm, GenericListPage } from '@/layout/components'
|
||||||
|
import { Dialog } from '@/components'
|
||||||
|
|
||||||
const performDelete = function({ row, col }) {
|
const performDelete = function({ row, col }) {
|
||||||
const id = row.id
|
const id = row.id
|
||||||
@ -12,11 +22,23 @@ const performDelete = function({ row, col }) {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GenericListPage
|
GenericCreateUpdateForm,
|
||||||
|
GenericListPage,
|
||||||
|
Dialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const vm = this
|
const vm = this
|
||||||
return {
|
return {
|
||||||
|
visible: false,
|
||||||
|
form: {
|
||||||
|
url: '/api/v1/settings/setting/?category=basic',
|
||||||
|
fields: ['GLOBAL_ORG_DISPLAY_NAME'],
|
||||||
|
fieldsMeta: {
|
||||||
|
},
|
||||||
|
submitMethod() {
|
||||||
|
return 'patch'
|
||||||
|
}
|
||||||
|
},
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/orgs/orgs/',
|
url: '/api/v1/orgs/orgs/',
|
||||||
permissions: {
|
permissions: {
|
||||||
@ -81,6 +103,15 @@ export default {
|
|||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
canCreate: this.$hasPerm('orgs.add_organization'),
|
canCreate: this.$hasPerm('orgs.add_organization'),
|
||||||
|
extraActions: [
|
||||||
|
{
|
||||||
|
title: this.$t('common.Setting'),
|
||||||
|
icon: 'el-icon-setting',
|
||||||
|
callback: () => {
|
||||||
|
this.visible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
hasExport: false,
|
hasExport: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasMoreActions: false
|
hasMoreActions: false
|
||||||
|
Loading…
Reference in New Issue
Block a user