mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-23 12:07:38 +00:00
@@ -14,7 +14,7 @@
|
|||||||
<slot v-for="item in fields" :slot="`$id:${item.id}`" :name="`$id:${item.id}`" />
|
<slot v-for="item in fields" :slot="`$id:${item.id}`" :name="`$id:${item.id}`" />
|
||||||
|
|
||||||
<el-form-item v-if="hasButtons" class="form-buttons">
|
<el-form-item v-if="hasButtons" class="form-buttons">
|
||||||
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" @click="handleClick(button)">{{ button.title }}</el-button>
|
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" :loading="button.loading" @click="handleClick(button)">{{ button.title }}</el-button>
|
||||||
<el-button v-if="defaultButton && hasReset" size="small" @click="resetForm('form')">{{ $t('common.Reset') }}</el-button>
|
<el-button v-if="defaultButton && hasReset" size="small" @click="resetForm('form')">{{ $t('common.Reset') }}</el-button>
|
||||||
<el-button v-if="defaultButton && hasSaveContinue" size="small" @click="submitForm('form', true)">{{ $t('common.SaveAndAddAnother') }}</el-button>
|
<el-button v-if="defaultButton && hasSaveContinue" size="small" @click="submitForm('form', true)">{{ $t('common.SaveAndAddAnother') }}</el-button>
|
||||||
<el-button v-if="defaultButton" size="small" :loading="isSubmitting" type="primary" @click="submitForm('form')">{{ $t('common.Submit') }}</el-button>
|
<el-button v-if="defaultButton" size="small" :loading="isSubmitting" type="primary" @click="submitForm('form')">{{ $t('common.Submit') }}</el-button>
|
||||||
@@ -101,7 +101,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const form = this.$refs['form']
|
const form = this.$refs['form']
|
||||||
const values = form.getFormValue()
|
const values = form.getFormValue()
|
||||||
callback(values, form)
|
callback(values, form, button)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -154,6 +154,9 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.ConfirmType === 'mfa') {
|
if (this.ConfirmType === 'mfa') {
|
||||||
this.Select = this.Content.filter(item => !item.disabled)[0].name
|
this.Select = this.Content.filter(item => !item.disabled)[0].name
|
||||||
|
if (this.Select === 'sms') {
|
||||||
|
this.smsWidth = 6
|
||||||
|
}
|
||||||
this.HelpText = this.Content.filter(item => !item.disabled)[0].placeholder
|
this.HelpText = this.Content.filter(item => !item.disabled)[0].placeholder
|
||||||
} else if (this.ConfirmType === 'password') {
|
} else if (this.ConfirmType === 'password') {
|
||||||
this.Select = this.$t('setting.password')
|
this.Select = this.$t('setting.password')
|
||||||
|
@@ -309,6 +309,9 @@ export default {
|
|||||||
.msg-detail-txt {
|
.msg-detail-txt {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
&>>> a {
|
||||||
|
color: var(--color-success)!important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
--menu-hover: #293846;
|
--menu-hover: #293846;
|
||||||
--submenu-bg: #1f2d3d;
|
--submenu-bg: #1f2d3d;
|
||||||
--submenu-hover: #001528;
|
--submenu-hover: #001528;
|
||||||
|
--menu-active-text: white;
|
||||||
--menu-active-left: #1ab394;
|
--menu-active-left: #1ab394;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,5 +24,6 @@
|
|||||||
--menu-hover: #293846;
|
--menu-hover: #293846;
|
||||||
--submenu-bg: #1f2d3d;
|
--submenu-bg: #1f2d3d;
|
||||||
--submenu-hover: #001528;
|
--submenu-hover: #001528;
|
||||||
|
--menu-active-text: white;
|
||||||
--menu-active-left: #1ab394;
|
--menu-active-left: #1ab394;
|
||||||
}
|
}
|
||||||
|
@@ -23,15 +23,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.dingTalkTest'),
|
title: this.$t('setting.dingTalkTest'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
|
btn.loading = true
|
||||||
vm.$axios.post(
|
vm.$axios.post(
|
||||||
'/api/v1/settings/dingtalk/testing/',
|
'/api/v1/settings/dingtalk/testing/',
|
||||||
value
|
value
|
||||||
).then(res => {
|
).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$log.error('err occur')
|
vm.$log.error('err occur')
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -25,15 +25,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.feiShuTest'),
|
title: this.$t('setting.feiShuTest'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
|
btn.loading = true
|
||||||
vm.$axios.post(
|
vm.$axios.post(
|
||||||
'/api/v1/settings/feishu/testing/',
|
'/api/v1/settings/feishu/testing/',
|
||||||
value
|
value
|
||||||
).then(res => {
|
).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$log.error('err occur')
|
vm.$log.error('err occur')
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -24,15 +24,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.weComTest'),
|
title: this.$t('setting.weComTest'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
|
btn.loading = true
|
||||||
vm.$axios.post(
|
vm.$axios.post(
|
||||||
'/api/v1/settings/wecom/testing/',
|
'/api/v1/settings/wecom/testing/',
|
||||||
value
|
value
|
||||||
).then(res => {
|
).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$log.error('err occur')
|
vm.$log.error('err occur')
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -79,15 +79,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.emailTest'),
|
title: this.$t('setting.emailTest'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
const testValue = {}
|
const testValue = {}
|
||||||
testValue['EMAIL_FROM'] = value['EMAIL_FROM']
|
testValue['EMAIL_FROM'] = value['EMAIL_FROM']
|
||||||
testValue['EMAIL_RECIPIENT'] = value['EMAIL_RECIPIENT']
|
testValue['EMAIL_RECIPIENT'] = value['EMAIL_RECIPIENT']
|
||||||
|
btn.loading = true
|
||||||
testEmailSetting(value).then(res => {
|
testEmailSetting(value).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
vm.$message.error(res['response']['data']['error'])
|
vm.$message.error(res['response']['data']['error'])
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -77,16 +77,18 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('setting.ldapConnectTest'),
|
title: this.$t('setting.ldapConnectTest'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
if (value['AUTH_LDAP_BIND_PASSWORD'] === undefined) {
|
if (value['AUTH_LDAP_BIND_PASSWORD'] === undefined) {
|
||||||
value['AUTH_LDAP_BIND_PASSWORD'] = ''
|
value['AUTH_LDAP_BIND_PASSWORD'] = ''
|
||||||
}
|
}
|
||||||
|
btn.loading = true
|
||||||
testLdapSetting(value).then(resp => {
|
testLdapSetting(value).then(resp => {
|
||||||
this.$message.success(resp)
|
this.$message.success(resp)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
const response = err.response
|
const response = err.response
|
||||||
this.$message.error(response.data)
|
this.$message.error(response.data)
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -20,15 +20,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('common.Test'),
|
title: this.$t('common.Test'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
|
btn.loading = true
|
||||||
vm.$axios.post(
|
vm.$axios.post(
|
||||||
`/api/v1/settings/alibaba/testing/`,
|
`/api/v1/settings/alibaba/testing/`,
|
||||||
value
|
value
|
||||||
).then(res => {
|
).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$log.error('err occur')
|
vm.$log.error('err occur')
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -20,15 +20,17 @@ export default {
|
|||||||
moreButtons: [
|
moreButtons: [
|
||||||
{
|
{
|
||||||
title: this.$t('common.Test'),
|
title: this.$t('common.Test'),
|
||||||
callback: function(value, form) {
|
loading: false,
|
||||||
|
callback: function(value, form, btn) {
|
||||||
|
btn.loading = true
|
||||||
vm.$axios.post(
|
vm.$axios.post(
|
||||||
`/api/v1/settings/tencent/testing/`,
|
`/api/v1/settings/tencent/testing/`,
|
||||||
value
|
value
|
||||||
).then(res => {
|
).then(res => {
|
||||||
vm.$message.success(res['msg'])
|
vm.$message.success(res['msg'])
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$log.error('err occur')
|
vm.$log.error('err occur')
|
||||||
})
|
}).finally(() => { btn.loading = false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -68,7 +68,7 @@ export default {
|
|||||||
value: this.object.apply_applications,
|
value: this.object.apply_applications,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: function() {
|
url: function() {
|
||||||
const oid = this.object.org_id === '' ? 'DEFAULT' : this.object.org_id
|
const oid = this.object.org_id
|
||||||
return `/api/v1/applications/applications/?oid=${oid}&type=${this.object.apply_type}`
|
return `/api/v1/applications/applications/?oid=${oid}&type=${this.object.apply_type}`
|
||||||
}.bind(this)(),
|
}.bind(this)(),
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
value: this.object.apply_system_users,
|
value: this.object.apply_system_users,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: function() {
|
url: function() {
|
||||||
const oid = this.object.org_id === '' ? 'DEFAULT' : this.object.org_id
|
const oid = this.object.org_id
|
||||||
const protocol = this.object.apply_category === 'remote_app' ? 'rdp' : this.object.apply_type
|
const protocol = this.object.apply_category === 'remote_app' ? 'rdp' : this.object.apply_type
|
||||||
return `/api/v1/assets/system-users/?oid=${oid}&protocol=${protocol}`
|
return `/api/v1/assets/system-users/?oid=${oid}&protocol=${protocol}`
|
||||||
}.bind(this)(),
|
}.bind(this)(),
|
||||||
|
@@ -77,7 +77,7 @@ export default {
|
|||||||
value: this.object.apply_nodes,
|
value: this.object.apply_nodes,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: (function(object) {
|
url: (function(object) {
|
||||||
const oid = object.org_id === '' ? 'DEFAULT' : object.org_id
|
const oid = object.org_id
|
||||||
return `/api/v1/assets/nodes/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
return `/api/v1/assets/nodes/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
||||||
}(this.object)),
|
}(this.object)),
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
value: this.object.apply_assets,
|
value: this.object.apply_assets,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: (function(object) {
|
url: (function(object) {
|
||||||
const oid = object.org_id === '' ? 'DEFAULT' : object.org_id
|
const oid = object.org_id
|
||||||
return `/api/v1/assets/assets/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
return `/api/v1/assets/assets/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
||||||
}(this.object)),
|
}(this.object)),
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
value: this.object.apply_system_users,
|
value: this.object.apply_system_users,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: (function(object) {
|
url: (function(object) {
|
||||||
const oid = object.org_id === '' ? 'DEFAULT' : object.org_id
|
const oid = object.org_id
|
||||||
return `/api/v1/assets/system-users/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
return `/api/v1/assets/system-users/?oid=${oid}&protocol__in=rdp,vnc,ssh,telnet`
|
||||||
}(this.object)),
|
}(this.object)),
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
|
@@ -101,7 +101,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
// it can improve the speed of the first screen, it is recommended to turn on preload
|
// it can improve the speed of the first screen, it is recommended to turn on preload
|
||||||
// config.plugins.delete('preload')
|
config.plugins.delete('preload')
|
||||||
|
|
||||||
// when there are many pages, it will cause too many meaningless requests
|
// when there are many pages, it will cause too many meaningless requests
|
||||||
config.plugins.delete('prefetch')
|
config.plugins.delete('prefetch')
|
||||||
|
Reference in New Issue
Block a user