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