mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-08 10:33:57 +00:00
Compare commits
5 Commits
pr@dev@fea
...
v2.14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df254b4df8 | ||
|
|
45fddd8b34 | ||
|
|
1243b920fc | ||
|
|
ee3f15ea0a | ||
|
|
76b53ddddf |
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="asset-select-dialog">
|
||||
<Select2 ref="select2" v-bind="select2Config" @input="onInputChange" @focus.stop="handleFocus" v-on="$listeners" />
|
||||
<Select2
|
||||
ref="select2"
|
||||
v-model="select2Config.value"
|
||||
v-bind="select2Config"
|
||||
@input="onInputChange"
|
||||
@focus.stop="handleFocus"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
<Dialog
|
||||
v-if="dialogVisible"
|
||||
:title="this.$t('assets.Assets')"
|
||||
|
||||
@@ -114,7 +114,8 @@ export default {
|
||||
},
|
||||
iValue: {
|
||||
set(val) {
|
||||
if (!val) {
|
||||
const noValue = !this.value || this.value.length === 0
|
||||
if (noValue && !this.initialized) {
|
||||
return
|
||||
}
|
||||
this.$emit('input', val)
|
||||
|
||||
@@ -458,9 +458,3 @@ a {
|
||||
.el-table-filter__list-item:hover {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
|
||||
.el-dialog__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: '/api/v1/audits/login-logs/',
|
||||
columns: ['username', 'type', 'backend', 'ip', 'city', 'user_agent', 'mfa', 'reason', 'status', 'datetime'],
|
||||
columns: ['username', 'type', 'backend', 'ip', 'city', 'user_agent', 'mfa', 'reason_display', 'status', 'datetime'],
|
||||
columnsMeta: {
|
||||
username: {
|
||||
showOverflowTooltip: true
|
||||
|
||||
@@ -79,18 +79,9 @@ export default {
|
||||
{
|
||||
title: this.$t('setting.emailTest'),
|
||||
callback: function(value, form) {
|
||||
if (value['EMAIL_HOST_PASSWORD'] === undefined) {
|
||||
value['EMAIL_HOST_PASSWORD'] = ''
|
||||
}
|
||||
if (value['EMAIL_USE_SSL'] === undefined) {
|
||||
value['EMAIL_USE_SSL'] = false
|
||||
}
|
||||
if (value['EMAIL_USE_TLS'] === undefined) {
|
||||
value['EMAIL_USE_TLS'] = false
|
||||
}
|
||||
if (value['EMAIL_FROM'] === undefined) {
|
||||
value['EMAIL_FROM'] = value['EMAIL_HOST_USER']
|
||||
}
|
||||
const testValue = {}
|
||||
testValue['EMAIL_FROM'] = value['EMAIL_FROM']
|
||||
testValue['EMAIL_RECIPIENT'] = value['EMAIL_RECIPIENT']
|
||||
testEmailSetting(value).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch(res => {
|
||||
@@ -100,26 +91,18 @@ export default {
|
||||
}
|
||||
],
|
||||
cleanFormValue(data) {
|
||||
if (!data['EMAIL_HOST_PASSWORD']) {
|
||||
delete data['EMAIL_HOST_PASSWORD']
|
||||
}
|
||||
if (!data['EMAIL_USE_SSL']) {
|
||||
data['EMAIL_USE_SSL'] = false
|
||||
}
|
||||
if (!data['EMAIL_USE_TLS']) {
|
||||
data['EMAIL_USE_TLS'] = false
|
||||
}
|
||||
if (!data['EMAIL_FROM']) {
|
||||
data['EMAIL_FROM'] = data['EMAIL_HOST_USER']
|
||||
}
|
||||
Object.keys(data).forEach(
|
||||
const submitValue = {}
|
||||
submitValue['EMAIL_RECIPIENT'] = data['EMAIL_RECIPIENT']
|
||||
submitValue['EMAIL_FROM'] = data['EMAIL_FROM']
|
||||
submitValue['EMAIL_SUBJECT_PREFIX'] = data['EMAIL_SUBJECT_PREFIX']
|
||||
Object.keys(submitValue).forEach(
|
||||
function(key) {
|
||||
if (data[key] === null) {
|
||||
delete data[key]
|
||||
if (submitValue[key] === null) {
|
||||
delete submitValue[key]
|
||||
}
|
||||
}
|
||||
)
|
||||
return data
|
||||
return submitValue
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
|
||||
Reference in New Issue
Block a user