mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-04 00:16:32 +00:00
fix: 修复v2.9 bugs (#739)
* fix: 修复资产列表协议组显示的问题 * fix: 全局组织批量更新用户禁止更新用户组 * fix: 修复网关无法克隆的Bug * fix: 修复平台列表更新bug * fix: 修复翻译问题 * fix: 修复更新管理用户账户秘钥的问题 Co-authored-by: Orange <orangemtony@gmail.com>
This commit is contained in:
@@ -1,51 +1,52 @@
|
|||||||
<template><div>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
|
<div>
|
||||||
<Dialog v-if="showMFADialog" width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" :show-confirm="false" :show-cancel="false" :destroy-on-close="true">
|
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
|
||||||
<div v-if="MFAConfirmed">
|
<Dialog v-if="showMFADialog" width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" :show-confirm="false" :show-cancel="false" :destroy-on-close="true">
|
||||||
<el-form label-position="right" label-width="80px" :model="MFAInfo">
|
<div v-if="MFAConfirmed">
|
||||||
|
<el-form label-position="right" label-width="80px" :model="MFAInfo">
|
||||||
|
<el-form-item :label="this.$t('assets.Hostname')">
|
||||||
|
<el-input v-model="MFAInfo.hostname" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="this.$t('assets.Username')">
|
||||||
|
<el-input v-model="MFAInfo.username" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="this.$t('assets.Password')">
|
||||||
|
<el-input v-model="MFAInfo.password" type="password" show-password />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<el-row v-else :gutter="20">
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="line-height: 34px;text-align: center">MFA</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-input v-model="MFAInput" />
|
||||||
|
<span class="help-tips help-block">{{ $t('common.MFARequireForSecurity') }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button size="mini" type="primary" style="line-height:20px " @click="MFAConfirm">{{ this.$t('common.Confirm') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
|
||||||
|
<el-form label-position="right" label-width="80px" :model="dialogInfo">
|
||||||
<el-form-item :label="this.$t('assets.Hostname')">
|
<el-form-item :label="this.$t('assets.Hostname')">
|
||||||
<el-input v-model="MFAInfo.hostname" disabled />
|
<el-input v-model="dialogInfo.hostname" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('assets.Username')">
|
<el-form-item :label="this.$t('assets.Username')">
|
||||||
<el-input v-model="MFAInfo.username" disabled />
|
<el-input v-model="dialogInfo.username" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('assets.Password')">
|
<el-form-item :label="this.$t('assets.Password')">
|
||||||
<el-input v-model="MFAInfo.password" type="password" show-password />
|
<el-input v-model="dialogInfo.password" type="password" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="this.$t('assets.sshkey')">
|
||||||
|
<input type="file" @change="Onchange">
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</Dialog>
|
||||||
<el-row v-else :gutter="20">
|
</div>
|
||||||
<el-col :span="4">
|
|
||||||
<div style="line-height: 34px;text-align: center">MFA</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="14">
|
|
||||||
<el-input v-model="MFAInput" />
|
|
||||||
<span class="help-tips help-block">{{ $t('common.MFARequireForSecurity') }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button size="mini" type="primary" style="line-height:20px " @click="MFAConfirm">{{ this.$t('common.Confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</Dialog>
|
|
||||||
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
|
|
||||||
<el-form label-position="right" label-width="80px" :model="dialogInfo">
|
|
||||||
<el-form-item :label="this.$t('assets.Hostname')">
|
|
||||||
<el-input v-model="dialogInfo.hostname" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="this.$t('assets.Username')">
|
|
||||||
<el-input v-model="dialogInfo.username" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="this.$t('assets.Password')">
|
|
||||||
<el-input v-model="dialogInfo.password" type="password" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="this.$t('assets.sshkey')">
|
|
||||||
<input type="file" @change="Onchange">
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -111,7 +112,7 @@ export default {
|
|||||||
username: '',
|
username: '',
|
||||||
hostname: '',
|
hostname: '',
|
||||||
password: '',
|
password: '',
|
||||||
key: ''
|
private_key: ''
|
||||||
},
|
},
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
@@ -316,7 +317,7 @@ export default {
|
|||||||
username: '',
|
username: '',
|
||||||
hostname: '',
|
hostname: '',
|
||||||
password: '',
|
password: '',
|
||||||
key: ''
|
private_key: ''
|
||||||
}
|
}
|
||||||
this.showDialog = false
|
this.showDialog = false
|
||||||
this.$refs.ListTable.reloadTable()
|
this.$refs.ListTable.reloadTable()
|
||||||
@@ -326,7 +327,7 @@ export default {
|
|||||||
// TODO 校验文件类型
|
// TODO 校验文件类型
|
||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
reader.onload = function() {
|
reader.onload = function() {
|
||||||
vm.dialogInfo.key = this.result
|
vm.dialogInfo.private_key = this.result
|
||||||
}
|
}
|
||||||
reader.readAsText(
|
reader.readAsText(
|
||||||
e.target.files[0]
|
e.target.files[0]
|
||||||
@@ -340,8 +341,8 @@ export default {
|
|||||||
if (this.dialogInfo.password !== '') {
|
if (this.dialogInfo.password !== '') {
|
||||||
data.password = this.dialogInfo.password
|
data.password = this.dialogInfo.password
|
||||||
}
|
}
|
||||||
if (this.dialogInfo.key !== '') {
|
if (this.dialogInfo.private_key !== '') {
|
||||||
data.key = this.dialogInfo.key
|
data.private_key = this.dialogInfo.private_key
|
||||||
}
|
}
|
||||||
this.$axios.post(
|
this.$axios.post(
|
||||||
`/api/v1/assets/asset-users/`,
|
`/api/v1/assets/asset-users/`,
|
||||||
@@ -356,7 +357,7 @@ export default {
|
|||||||
username: '',
|
username: '',
|
||||||
hostname: '',
|
hostname: '',
|
||||||
password: '',
|
password: '',
|
||||||
key: ''
|
private_key: ''
|
||||||
}
|
}
|
||||||
this.showDialog = false
|
this.showDialog = false
|
||||||
this.$refs.ListTable.reloadTable()
|
this.$refs.ListTable.reloadTable()
|
||||||
|
@@ -600,6 +600,10 @@
|
|||||||
"RemoteAppPermissionCreate": "Remote apps permission create",
|
"RemoteAppPermissionCreate": "Remote apps permission create",
|
||||||
"RemoteAppPermissionDetail": "Remote apps permissions detail",
|
"RemoteAppPermissionDetail": "Remote apps permissions detail",
|
||||||
"RemoteAppPermissionUpdate": "Remote app permission update",
|
"RemoteAppPermissionUpdate": "Remote app permission update",
|
||||||
|
"ApplicationDetail": "Application detail",
|
||||||
|
"ApplicationPermissionCreate": "Application permission create",
|
||||||
|
"ApplicationPermissionDetail": "Application permission detail",
|
||||||
|
"ApplicationPermissionUpdate": "Application permission update",
|
||||||
"RemoteAppUpdate": "Remote app update",
|
"RemoteAppUpdate": "Remote app update",
|
||||||
"ReplayStorageUpdate": "Replay storage update",
|
"ReplayStorageUpdate": "Replay storage update",
|
||||||
"SessionDetail": "Sessions detail",
|
"SessionDetail": "Sessions detail",
|
||||||
|
@@ -122,6 +122,11 @@ export default {
|
|||||||
},
|
},
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true
|
||||||
},
|
},
|
||||||
|
protocols: {
|
||||||
|
formatter: function(row) {
|
||||||
|
return <span> {row.protocols.toString()} </span>
|
||||||
|
}
|
||||||
|
},
|
||||||
ip: {
|
ip: {
|
||||||
sortable: 'custom',
|
sortable: 'custom',
|
||||||
width: '140px'
|
width: '140px'
|
||||||
|
@@ -85,7 +85,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
onClone: function({ row, col }) {
|
||||||
|
const cloneRoute = {
|
||||||
|
name: 'GatewayCreate',
|
||||||
|
query: {
|
||||||
|
domain: this.object.id,
|
||||||
|
clone_from: row.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$router.push(cloneRoute)
|
||||||
|
}.bind(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericCreateUpdatePage :fields="fields" :initial="initial" :fields-meta="fieldsMeta" :url="url" :perform-submit="performSubmit.bind(this)" />
|
<GenericCreateUpdatePage :fields="fields" :initial="initial" :fields-meta="fieldsMeta" :url="url" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -17,65 +17,48 @@ export default {
|
|||||||
charset: 'utf8'
|
charset: 'utf8'
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
[this.$t('common.Basic'), ['name', 'base', 'charset', 'security', 'console', 'comment']]
|
[this.$t('common.Basic'), ['name', 'base', 'charset', 'meta', 'comment']]
|
||||||
],
|
],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
security: {
|
meta: {
|
||||||
type: 'select',
|
fields: ['security', 'console'],
|
||||||
label: 'RDP security',
|
fieldsMeta: {
|
||||||
options: [{
|
security: {
|
||||||
label: 'RDP',
|
prop: 'meta.security',
|
||||||
value: 'rdp'
|
type: 'select',
|
||||||
|
label: 'RDP security',
|
||||||
|
options: [{
|
||||||
|
label: 'RDP',
|
||||||
|
value: 'rdp'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'NLA',
|
||||||
|
value: 'nla'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'TLS',
|
||||||
|
value: 'tls'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Any',
|
||||||
|
value: 'any'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
console: {
|
||||||
|
type: 'select',
|
||||||
|
label: 'RDP console',
|
||||||
|
options: [{
|
||||||
|
label: this.$t('common.Yes'),
|
||||||
|
value: 'true'
|
||||||
|
}, {
|
||||||
|
label: this.$t('common.No'),
|
||||||
|
value: 'false'
|
||||||
|
}]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: 'NLA',
|
|
||||||
value: 'nla'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'TLS',
|
|
||||||
value: 'tls'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Any',
|
|
||||||
value: 'any'
|
|
||||||
}],
|
|
||||||
hidden: form => form.base !== 'Windows'
|
|
||||||
},
|
|
||||||
console: {
|
|
||||||
type: 'select',
|
|
||||||
label: 'RDP console',
|
|
||||||
options: [{
|
|
||||||
label: '是',
|
|
||||||
value: 'true'
|
|
||||||
}, {
|
|
||||||
label: '否',
|
|
||||||
value: 'false'
|
|
||||||
}],
|
|
||||||
hidden: form => form.base !== 'Windows'
|
hidden: form => form.base !== 'Windows'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
performSubmit: function(formdata) {
|
|
||||||
var postData = {}
|
|
||||||
if (formdata.base === 'Windows') {
|
|
||||||
postData.meta = {}
|
|
||||||
postData.meta.security = formdata.security
|
|
||||||
postData.meta.console = (formdata.console === 'true')
|
|
||||||
}
|
|
||||||
postData.name = formdata.name
|
|
||||||
postData.base = formdata.base
|
|
||||||
postData.charset = formdata.charset
|
|
||||||
postData.comment = formdata.comment || ''
|
|
||||||
|
|
||||||
const params = this.$route.params
|
|
||||||
if (params.id) {
|
|
||||||
return this.$axios.put(
|
|
||||||
`${this.url}${params.id}/`, postData
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return this.$axios.post(
|
|
||||||
this.url, postData
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
url: '/api/v1/assets/platforms/'
|
url: '/api/v1/assets/platforms/'
|
||||||
}
|
}
|
||||||
|
@@ -187,7 +187,7 @@ export default {
|
|||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
groups: {
|
groups: {
|
||||||
label: this.$t('users.UserGroups'),
|
label: this.$t('users.UserGroups'),
|
||||||
hidden: () => false,
|
hidden: () => vm.currentOrgIsRoot,
|
||||||
el: {
|
el: {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
ajax: {
|
ajax: {
|
||||||
|
Reference in New Issue
Block a user