mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
merge: with remote
This commit is contained in:
@@ -32,7 +32,7 @@ export default {
|
||||
form: this.account || { },
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name', 'username', 'privileged']],
|
||||
[this.$t('assets.Secret'), ['secret_type', 'password', 'ssh_key', 'token', 'api_key', 'passphrase']],
|
||||
[this.$t('assets.Secret'), ['secret_type', 'secret', 'ssh_key', 'token', 'api_key', 'passphrase']],
|
||||
[this.$t('common.Other'), ['push_now', 'comment']]
|
||||
],
|
||||
defaultPrivilegedAccounts: ['root', 'administrator'],
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
password: {
|
||||
secret: {
|
||||
label: this.$t('assets.Password'),
|
||||
component: UpdateToken,
|
||||
hidden: (formValue) => formValue.secret_type !== 'password'
|
||||
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
visible: false,
|
||||
width: '60%',
|
||||
tableConfig: {
|
||||
url: `/api/v1/assets/accounts-historys?id=${this.account.id}`,
|
||||
url: `/api/v1/assets/account-secrets/${this.account.id}/histories/`,
|
||||
columns: [
|
||||
'name', 'version', 'password', 'date_created'
|
||||
],
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('accounts.HistoryPassword'),
|
||||
can: this.$hasPerm('assets.change_assetaccountsecret') && !this.$store.getters.currentOrgIsRoot,
|
||||
can: this.$hasPerm('assets.view_accountsecret') && !this.$store.getters.currentOrgIsRoot,
|
||||
callback: ({ row }) => {
|
||||
vm.account = row
|
||||
vm.showPasswordHistoryDialog = false
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
hasMoreActions: true,
|
||||
hasCreate: false,
|
||||
hasImport: true,
|
||||
hasExport: this.$hasPerm('assets.view_assetaccountsecret'),
|
||||
hasExport: this.$hasPerm('assets.view_account'),
|
||||
exportOptions: {
|
||||
url: this.exportUrl,
|
||||
mfaVerifyRequired: true
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
{
|
||||
prop: 'protocols',
|
||||
formatter: function(row) {
|
||||
return <span> {row.protocols.toString()} </span>
|
||||
return <span> {row.protocols?.toString()} </span>
|
||||
},
|
||||
label: this.$t('assets.Protocols')
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@ export default {
|
||||
return this.$t('common.Update')
|
||||
}
|
||||
},
|
||||
showInput: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
@@ -39,13 +43,13 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow: false,
|
||||
isShow: this.showInput,
|
||||
curValue: this.value
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$route.path.indexOf('/create') !== -1) {
|
||||
this.isShow = true
|
||||
if (this.$route.path.indexOf('/update') !== -1) {
|
||||
this.isShow = false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
},
|
||||
cellValue: {
|
||||
type: [String, Number],
|
||||
default: null
|
||||
default: ''
|
||||
},
|
||||
hasShow: {
|
||||
type: Boolean,
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
methods: {
|
||||
switchShowValue() {
|
||||
const value = this.value || this.cellValue
|
||||
return '******' + value.replace(/[\s\S]/g, '')
|
||||
return value ? '******' + value.replace(/[\s\S]/g, '') : ''
|
||||
},
|
||||
onShow() {
|
||||
const { currentValue, switchShowValue } = this
|
||||
|
||||
Reference in New Issue
Block a user