mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 16:32:28 +00:00
Merge pull request #3259 from jumpserver/pr@dev@perf_protocol_setting
perf: 修改账号配置
This commit is contained in:
@@ -67,7 +67,7 @@ export default {
|
||||
[this.$t('accounts.AccountTemplate'), ['template']],
|
||||
[this.$t('common.Basic'), ['name', 'username', 'privileged', 'su_from', 'su_from_username']],
|
||||
[this.$t('assets.Secret'), [
|
||||
'secret_type', 'secret', 'ssh_key', 'token',
|
||||
'secret_type', 'password', 'ssh_key', 'token',
|
||||
'access_key', 'passphrase', 'api_key'
|
||||
]],
|
||||
[this.$t('common.Other'), ['push_now', 'params', 'on_invalid', 'is_active', 'comment']]
|
||||
@@ -173,7 +173,7 @@ export default {
|
||||
return this.platform || this.asset || this.addTemplate
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
password: {
|
||||
label: this.$t('assets.Password'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => formValue.secret_type !== 'password' || this.addTemplate
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
hidden: (formValue) => formValue.secret_type !== 'access_key' || this.addTemplate
|
||||
},
|
||||
api_key: {
|
||||
id: 'access_key',
|
||||
id: 'api_key',
|
||||
label: this.$t('assets.ApiKey'),
|
||||
component: UploadSecret,
|
||||
hidden: (formValue) => formValue.secret_type !== 'api_key' || this.addTemplate
|
||||
@@ -300,11 +300,10 @@ export default {
|
||||
})
|
||||
},
|
||||
confirm(form) {
|
||||
const secretType = form.secret_type || ''
|
||||
if (secretType !== 'password') {
|
||||
form.secret = form[secretType]
|
||||
}
|
||||
const secretType = form.secret_type || 'password'
|
||||
form.secret = form[secretType]
|
||||
form.secret = this.encryptPassword ? encryptPassword(form.secret) : form.secret
|
||||
|
||||
if (!form.secret) {
|
||||
delete form['secret']
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@
|
||||
|
||||
<script>
|
||||
import { AutoDataForm, Dialog } from '@/components'
|
||||
import JsonEditor from '@/components/FormFields/JsonEditor.vue'
|
||||
|
||||
export default {
|
||||
name: 'ProtocolSetting',
|
||||
@@ -66,7 +67,22 @@ export default {
|
||||
],
|
||||
fieldsMeta: {
|
||||
setting: {
|
||||
fields: '__all__'
|
||||
fields: '__all__',
|
||||
fieldsMeta: {
|
||||
username_selector: {
|
||||
hidden: (formValue) => formValue['autofill'] !== 'basic'
|
||||
},
|
||||
password_selector: {
|
||||
hidden: (formValue) => formValue['autofill'] !== 'basic'
|
||||
},
|
||||
submit_selector: {
|
||||
hidden: (formValue) => formValue['autofill'] !== 'basic'
|
||||
},
|
||||
script: {
|
||||
component: JsonEditor,
|
||||
hidden: (formValue) => formValue['autofill'] !== 'script'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
src/styles/icons/chatgpt.png
Normal file
BIN
src/styles/icons/chatgpt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@@ -292,6 +292,10 @@
|
||||
background: url('./icons/website.png') no-repeat center left transparent;
|
||||
}
|
||||
|
||||
.ztree li span.button.chatgpt_ico_docu {
|
||||
background: url('./icons/chatgpt.png') no-repeat center left transparent;
|
||||
}
|
||||
|
||||
.ztree li span.button.clickhouse_ico_docu {
|
||||
background: url('./icons/clickhouse.png') no-repeat center left transparent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user