mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 23:18:17 +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": {
|
||||
"AppOps": "Task center",
|
||||
"Ticket": "Ticket",
|
||||
"TaskList": "Task list",
|
||||
"Announcement": "Announcement",
|
||||
|
@ -1524,6 +1524,7 @@
|
||||
}
|
||||
},
|
||||
"setting": {
|
||||
"AppOps": "タスクセンター",
|
||||
"Ticket": "チケット",
|
||||
"TaskList": "タスクリスト",
|
||||
"Announcement": "公告",
|
||||
|
@ -1521,6 +1521,7 @@
|
||||
"PublishStatus": "发布状态"
|
||||
},
|
||||
"setting": {
|
||||
"AppOps": "任务中心",
|
||||
"Ticket": "工单",
|
||||
"TaskList": "任务列表",
|
||||
"Announcement": "公告",
|
||||
|
@ -20,15 +20,18 @@ export default {
|
||||
[
|
||||
this.$t('common.Basic'),
|
||||
[
|
||||
'FORGOT_PASSWORD_URL',
|
||||
'LOGIN_REDIRECT_MSG_ENABLED'
|
||||
'FORGOT_PASSWORD_URL', 'LOGIN_REDIRECT_MSG_ENABLED'
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -33,21 +33,23 @@ export default {
|
||||
encryptedFields: ['AUTH_LDAP_BIND_PASSWORD'],
|
||||
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'),
|
||||
[
|
||||
'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'),
|
||||
[
|
||||
'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>
|
||||
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||
<TabPage v-if="!loading" :active-menu.sync="activeMenu" :submenu="submenu">
|
||||
<keep-alive>
|
||||
<component :is="activeMenu" />
|
||||
</keep-alive>
|
||||
@ -43,35 +43,38 @@ export default {
|
||||
extraBackends = [
|
||||
{
|
||||
title: this.$t('setting.OIDC'),
|
||||
name: 'OIDC'
|
||||
name: 'OIDC',
|
||||
key: 'AUTH_OPENID'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.SAML2'),
|
||||
name: 'SAML2'
|
||||
name: 'SAML2',
|
||||
key: 'AUTH_SAML2'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.OAuth2'),
|
||||
name: 'OAuth2'
|
||||
name: 'OAuth2',
|
||||
key: 'AUTH_OAUTH2'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.WeCom'),
|
||||
name: 'WeCom'
|
||||
name: 'WeCom',
|
||||
key: 'AUTH_WECOM'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.DingTalk'),
|
||||
name: 'DingTalk'
|
||||
name: 'DingTalk',
|
||||
key: 'AUTH_DINGTALK'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.FeiShu'),
|
||||
name: 'FeiShu'
|
||||
name: 'FeiShu',
|
||||
key: 'AUTH_FEISHU'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.Radius'),
|
||||
name: 'Radius'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.SSO'),
|
||||
name: 'SSO'
|
||||
name: 'Radius',
|
||||
key: 'AUTH_RADIUS'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -85,11 +88,13 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.Ldap'),
|
||||
name: 'LDAP'
|
||||
name: 'LDAP',
|
||||
key: 'AUTH_LDAP'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.CAS'),
|
||||
name: 'CAS'
|
||||
name: 'CAS',
|
||||
key: 'AUTH_CAS'
|
||||
},
|
||||
...extraBackends
|
||||
]
|
||||
@ -101,11 +106,27 @@ export default {
|
||||
}
|
||||
},
|
||||
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: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang='scss' scoped>
|
||||
>>> .el-tabs__item .fa {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -26,8 +26,7 @@ export default {
|
||||
fields: [
|
||||
[
|
||||
this.$t('common.BasicInfo'), [
|
||||
'SITE_URL', // 'USER_GUIDE_URL',
|
||||
'GLOBAL_ORG_DISPLAY_NAME'
|
||||
'SITE_URL' // 'USER_GUIDE_URL',
|
||||
]
|
||||
],
|
||||
[this.$t('xpack.NavHelp'), [
|
||||
@ -38,18 +37,14 @@ export default {
|
||||
SITE_URL: {
|
||||
rules: [rules.Required]
|
||||
},
|
||||
GLOBAL_ORG_DISPLAY_NAME: {
|
||||
hidden: () => !this.hasValidLicense()
|
||||
},
|
||||
|
||||
HELP_DOCUMENT_URL: {
|
||||
label: this.$t('xpack.helpDocument'),
|
||||
helpText: this.$t('xpack.helpDocumentTip'),
|
||||
hidden: () => !this.hasValidLicense()
|
||||
helpText: this.$t('xpack.helpDocumentTip')
|
||||
},
|
||||
HELP_SUPPORT_URL: {
|
||||
label: this.$t('xpack.helpSupport'),
|
||||
helpText: this.$t('xpack.helpSupportTip'),
|
||||
hidden: () => !this.hasValidLicense()
|
||||
helpText: this.$t('xpack.helpSupportTip')
|
||||
}
|
||||
},
|
||||
successUrl: { name: 'Basic' },
|
||||
@ -60,8 +55,8 @@ export default {
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
},
|
||||
hasValidLicense() {
|
||||
return this.$store.getters.hasValidLicense
|
||||
noValidLicense() {
|
||||
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 Vault from './Vault.vue'
|
||||
import Ticket from './Ticket.vue'
|
||||
import Ops from './Ops.vue'
|
||||
|
||||
export default {
|
||||
name: 'Feature',
|
||||
components: { TabPage, Announcement, Vault, Ticket },
|
||||
components: { TabPage, Announcement, Vault, Ticket, Ops },
|
||||
data() {
|
||||
return {
|
||||
activeMenu: 'Basic',
|
||||
@ -35,6 +36,10 @@ export default {
|
||||
{
|
||||
title: this.$t('setting.Ticket'),
|
||||
name: 'Ticket'
|
||||
},
|
||||
{
|
||||
title: this.$t('setting.AppOps'),
|
||||
name: 'Ops'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,9 +1,19 @@
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import { GenericCreateUpdateForm, GenericListPage } from '@/layout/components'
|
||||
import { Dialog } from '@/components'
|
||||
|
||||
const performDelete = function({ row, col }) {
|
||||
const id = row.id
|
||||
@ -12,11 +22,23 @@ const performDelete = function({ row, col }) {
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
GenericListPage
|
||||
GenericCreateUpdateForm,
|
||||
GenericListPage,
|
||||
Dialog
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
visible: false,
|
||||
form: {
|
||||
url: '/api/v1/settings/setting/?category=basic',
|
||||
fields: ['GLOBAL_ORG_DISPLAY_NAME'],
|
||||
fieldsMeta: {
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
},
|
||||
tableConfig: {
|
||||
url: '/api/v1/orgs/orgs/',
|
||||
permissions: {
|
||||
@ -81,6 +103,15 @@ export default {
|
||||
},
|
||||
headerActions: {
|
||||
canCreate: this.$hasPerm('orgs.add_organization'),
|
||||
extraActions: [
|
||||
{
|
||||
title: this.$t('common.Setting'),
|
||||
icon: 'el-icon-setting',
|
||||
callback: () => {
|
||||
this.visible = true
|
||||
}
|
||||
}
|
||||
],
|
||||
hasExport: false,
|
||||
hasImport: false,
|
||||
hasMoreActions: false
|
||||
|
Loading…
Reference in New Issue
Block a user