mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-10 13:45:27 +00:00
commit
b18b05b8fb
@ -58,11 +58,12 @@ export default {
|
||||
}
|
||||
if (this.authInfo.private_key !== '') {
|
||||
data.private_key = this.authInfo.private_key
|
||||
data.passphrase = this.authInfo.passphrase
|
||||
if (this.authInfo.passphrase) data.passphrase = this.authInfo.passphrase
|
||||
}
|
||||
this.$axios.patch(
|
||||
`/api/v1/assets/accounts/${this.account.id}/`,
|
||||
data
|
||||
data,
|
||||
{ disableFlashErrorMsg: true }
|
||||
).then(res => {
|
||||
this.authInfo = { password: '', private_key: '' }
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
|
@ -135,7 +135,7 @@ export default {
|
||||
mfaVerifyRequired: true
|
||||
},
|
||||
searchConfig: {
|
||||
exclude: ['systemuser', 'asset']
|
||||
exclude: ['systemuser', 'app']
|
||||
},
|
||||
hasSearch: true
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="upload-key">
|
||||
<input type="file" @change="onChange">
|
||||
<input ref="upLoadFile" type="file" style="display: none" @change="onChange">
|
||||
<el-button size="mini" @click.native.stop="onUpLoad">
|
||||
{{ this.$t('common.SelectFile') }}
|
||||
</el-button>
|
||||
<span>{{ fileName }}</span>
|
||||
<div v-if="tip !== ''">{{ tip }}</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -21,12 +25,22 @@ export default {
|
||||
default: () => 'string'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileName: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onUpLoad() {
|
||||
this.$refs.upLoadFile.click()
|
||||
},
|
||||
onChange(e) {
|
||||
if (e.target.files.length === 0) {
|
||||
const upLoadFile = e.target.files
|
||||
if (upLoadFile.length === 0) {
|
||||
return
|
||||
}
|
||||
const vm = this
|
||||
this.fileName = upLoadFile[0].name || ''
|
||||
const reader = new FileReader()
|
||||
reader.onload = function() {
|
||||
let result = this.result
|
||||
@ -36,7 +50,7 @@ export default {
|
||||
vm.$emit('input', result)
|
||||
}
|
||||
reader.readAsText(
|
||||
e.target.files[0]
|
||||
upLoadFile[0]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
size="small"
|
||||
class="filter-tag"
|
||||
type="info"
|
||||
:disable-transitions="false"
|
||||
:disable-transitions="true"
|
||||
@close="handleTagClose(k)"
|
||||
@click="handleTagClick(v,k)"
|
||||
>
|
||||
@ -34,6 +34,7 @@
|
||||
@blur="focus = false"
|
||||
@focus="focus = true"
|
||||
@change="handleConfirm"
|
||||
@keyup.enter.native="handleConfirm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -205,6 +206,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
handleConfirm() {
|
||||
if (!this.filterValue) return
|
||||
if (this.filterValue && !this.filterKey) {
|
||||
this.filterKey = 'search'
|
||||
}
|
||||
|
@ -283,8 +283,8 @@ export default {
|
||||
let object = this.object
|
||||
if (!object || Object.keys(object).length === 0) {
|
||||
if (cloneFrom) {
|
||||
this.$log.debug('Clone from: ', cloneFrom)
|
||||
const url = `${this.url}${cloneFrom}/`
|
||||
const [curUrl, query] = this.url.split('?')
|
||||
const url = `${curUrl}${cloneFrom}/${query ? ('?' + query) : ''}`
|
||||
object = await this.getObjectDetail(url)
|
||||
if (object['name']) {
|
||||
object.name = this.$t('common.cloneFrom') + ' ' + object.name
|
||||
|
@ -22,7 +22,7 @@ export default {
|
||||
tableConfig: {
|
||||
url: `/api/v1/xpack/change-auth-plan/app-plan-execution-subtask/?plan_execution_id=${this.object.id}`,
|
||||
columns: [
|
||||
'app_display', 'system_user_display', 'is_success', 'reason', 'timedelta', 'date_start', 'actions'
|
||||
'app_display', 'system_user_display', 'is_success', 'timedelta', 'date_start', 'reason_display', 'actions'
|
||||
],
|
||||
columnsMeta: {
|
||||
app_display: {
|
||||
@ -35,6 +35,9 @@ export default {
|
||||
return <router-link to={ to } >{ row.app_display }</router-link>
|
||||
}
|
||||
},
|
||||
reason_display: {
|
||||
label: this.$t('xpack.AccountBackupPlan.Reason')
|
||||
},
|
||||
system_user_display: {
|
||||
label: this.$t('xpack.ChangeAuthPlan.SystemUser')
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ export default {
|
||||
tableConfig: {
|
||||
url: `/api/v1/xpack/change-auth-plan/plan-execution-subtask/?plan_execution_id=${this.object.id}`,
|
||||
columns: [
|
||||
'username', 'asset', 'is_success', 'reason', 'timedelta', 'date_start', 'actions'
|
||||
'username', 'asset', 'is_success', 'timedelta', 'date_start', 'reason_display', 'actions'
|
||||
],
|
||||
columnsMeta: {
|
||||
asset: {
|
||||
@ -42,6 +42,9 @@ export default {
|
||||
return row.timedelta.toFixed(2) + 's'
|
||||
}
|
||||
},
|
||||
reason_display: {
|
||||
label: this.$t('xpack.AccountBackupPlan.Reason')
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
hasDelete: false,
|
||||
|
@ -18,7 +18,7 @@ export default {
|
||||
tableConfig: {
|
||||
url: '/api/v1/audits/login-logs/',
|
||||
columns: [
|
||||
'username', 'type', 'backend', 'ip', 'city',
|
||||
'username', 'type', 'backend_display', 'ip', 'city',
|
||||
'user_agent', 'mfa', 'reason_display', 'status', 'datetime'
|
||||
],
|
||||
columnsMeta: {
|
||||
|
@ -17,7 +17,7 @@ export default {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: '/api/v1/audits/operate-logs/',
|
||||
columns: ['user', 'action', 'resource_type', 'resource', 'remote_addr', 'datetime'],
|
||||
columns: ['user', 'action_display', 'resource_type_display', 'resource', 'remote_addr', 'datetime'],
|
||||
columnsMeta: {
|
||||
user: {
|
||||
showOverflowTooltip: true
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
remote_addr: {
|
||||
width: '140px'
|
||||
},
|
||||
action: {
|
||||
action_display: {
|
||||
width: '90px'
|
||||
}
|
||||
},
|
||||
|
@ -70,6 +70,7 @@ export default {
|
||||
return { label: item.name + '(' + item.username + ')', value: item.id }
|
||||
}
|
||||
},
|
||||
showHasMore: false,
|
||||
hasObjectsId: this.object.users,
|
||||
showHasObjects: false,
|
||||
performAdd: (items) => {
|
||||
|
Loading…
Reference in New Issue
Block a user