mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-30 12:55:37 +00:00
commit
c6cde723ec
@ -29,7 +29,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
assetUserUrl: `/api/v1/assets/accounts/?asset_id=${this.object.id}&latest=1`,
|
||||
assetUserUrl: `/api/v1/assets/accounts/?asset=${this.object.id}`,
|
||||
quickActions: [
|
||||
{
|
||||
title: this.$t('assets.TestAssetsConnective'),
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
callbacks: {
|
||||
click: function() {
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/accounts/tasks/?asset_id=${this.object.id}&latest=1`,
|
||||
`/api/v1/assets/accounts/tasks/?asset=${this.object.id}`,
|
||||
{ action: 'test' }
|
||||
).then(res => {
|
||||
window.open(`/#/ops/celery/task/${res.task}/log/`, '', 'width=900,height=600')
|
@ -9,14 +9,14 @@
|
||||
<script>
|
||||
import { GenericDetailPage, TabPage } from '@/layout/components'
|
||||
import Detail from './Detail.vue'
|
||||
import AssetUserList from './AssetUserList.vue'
|
||||
import Account from './Account.vue'
|
||||
export default {
|
||||
name: 'AssetListDetail',
|
||||
components: {
|
||||
GenericDetailPage,
|
||||
TabPage,
|
||||
Detail,
|
||||
AssetUserList
|
||||
Account
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -29,8 +29,8 @@ export default {
|
||||
name: 'Detail'
|
||||
},
|
||||
{
|
||||
title: this.$t('assets.AssetUserList'),
|
||||
name: 'AssetUserList'
|
||||
title: this.$t('assets.AccountList'),
|
||||
name: 'Account'
|
||||
}
|
||||
],
|
||||
hasRightSide: true,
|
||||
|
@ -147,8 +147,8 @@ export default {
|
||||
formatter: ChoicesFormatter,
|
||||
formatterArgs: {
|
||||
iconChoices: {
|
||||
ok: 'fa-times text-danger',
|
||||
failed: 'fa-check text-primary',
|
||||
ok: 'fa-check text-primary',
|
||||
failed: 'fa-times text-danger',
|
||||
unknown: 'fa-circle text-warning'
|
||||
},
|
||||
hasTips: true,
|
||||
|
@ -24,16 +24,18 @@ function getFields() {
|
||||
},
|
||||
rules: [Object.assign({}, Required)],
|
||||
hidden: (form) => {
|
||||
if (['mysql', 'postgresql', 'mariadb', 'oracle'].includes(form.protocol)) {
|
||||
this.fieldsMeta.username.rules[0].required = true
|
||||
} else if (['vnc'].includes(form.protocol)) {
|
||||
if (['vnc'].includes(form.protocol)) {
|
||||
this.fieldsMeta.username.rules[0].required = false
|
||||
} else if (form.login_mode === 'manual') {
|
||||
this.fieldsMeta.username.rules[0].required = false
|
||||
} else if (form.username_same_with_user) {
|
||||
this.fieldsMeta.username.rules[0].required = false
|
||||
} else {
|
||||
this.fieldsMeta.username.rules[0].required = !(form.login_mode === 'manual' || form.username_same_with_user)
|
||||
this.fieldsMeta.username.rules[0].required = true
|
||||
}
|
||||
if (form.username_same_with_user) {
|
||||
this.fieldsMeta.username.el.disabled = true
|
||||
form.username = '*'
|
||||
form.username = ''
|
||||
} else {
|
||||
this.fieldsMeta.username.el.disabled = false
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
updateRoute: { name: 'SystemUserUpdate', query: { type: 'admin' }}
|
||||
updateRoute: { name: 'SystemUserUpdate', query: { type: 'admin' }},
|
||||
cloneRoute: { name: 'SystemUserCreate', query: { type: 'admin' }}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user