mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 02:31:43 +00:00
Merge branch 'dev' of github.com:jumpserver/lina into dev
This commit is contained in:
@@ -119,8 +119,8 @@ export default {
|
|||||||
).then(() => {
|
).then(() => {
|
||||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||||
this.zTree.removeNode(currentNode)
|
this.zTree.removeNode(currentNode)
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
// this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onRename: function(event, treeId, treeNode, isCancel) {
|
onRename: function(event, treeId, treeNode, isCancel) {
|
||||||
|
@@ -65,7 +65,11 @@ export default {
|
|||||||
.replace('详情', '')
|
.replace('详情', '')
|
||||||
this.$log.debug('Object is: ', obj)
|
this.$log.debug('Object is: ', obj)
|
||||||
const objectName = this.getObjectName(obj)
|
const objectName = this.getObjectName(obj)
|
||||||
return `${objectType}: ${objectName}`
|
let title = `${objectType}: ${objectName}`
|
||||||
|
if (title.length > 80) {
|
||||||
|
title = title.slice(0, 80) + '...'
|
||||||
|
}
|
||||||
|
return title
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goBack: {
|
goBack: {
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
import DetailCard from '@/components/DetailCard'
|
import DetailCard from '@/components/DetailCard'
|
||||||
import RelationCard from '@/components/RelationCard'
|
import RelationCard from '@/components/RelationCard'
|
||||||
import QuickActions from '@/components/QuickActions'
|
import QuickActions from '@/components/QuickActions'
|
||||||
import LabelCard from '@/components/LabelCard'
|
import LabelCard from './components/LabelCard'
|
||||||
import { toSafeLocalDateStr } from '@/utils/common'
|
import { toSafeLocalDateStr } from '@/utils/common'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<IBox fa="fa-info-circle" :title="title" v-bind="$attrs">
|
<IBox fa="fa-info-circle" :title="title" v-bind="$attrs">
|
||||||
<div class="quick-actions">
|
<div class="quick-actions">
|
||||||
<p v-if="iTag.length === 0">{{ $t('common.Nothing') }}</p>
|
<p v-if="iLabels.length === 0">{{ $t('common.Nothing') }}</p>
|
||||||
<el-tag v-for="i in iTag" :key="i" type="info">{{ i }}</el-tag>
|
<el-tag v-for="i in iLabels" :key="i.name + i.value" type="info">{{ i.name }}: {{ i.value }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</IBox>
|
</IBox>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,17 +30,14 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
iTag: []
|
iLabels: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$axios.get(`/api/v1/assets/labels/`).then(res => {
|
this.$axios.get(`/api/v1/assets/labels/`).then(res => {
|
||||||
if (this.labels === []) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
for (const i in res) {
|
for (const i in res) {
|
||||||
if (this.labels.indexOf(res[i].id) > -1) {
|
if (this.labels.indexOf(res[i].id) > -1) {
|
||||||
this.iTag.push(res[i].name)
|
this.iLabels.push(res[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
@@ -143,6 +143,11 @@ export default {
|
|||||||
name: 'AssetCreate',
|
name: 'AssetCreate',
|
||||||
query: this.$route.query
|
query: this.$route.query
|
||||||
},
|
},
|
||||||
|
searchConfig: {
|
||||||
|
options: [
|
||||||
|
{ label: this.$t('assets.Label'), value: 'label' }
|
||||||
|
]
|
||||||
|
},
|
||||||
extraMoreActions: [
|
extraMoreActions: [
|
||||||
{
|
{
|
||||||
name: 'DeactiveSelected',
|
name: 'DeactiveSelected',
|
||||||
|
@@ -83,8 +83,7 @@ export default {
|
|||||||
headerActions: {
|
headerActions: {
|
||||||
hasLeftActions: false,
|
hasLeftActions: false,
|
||||||
hasImport: false,
|
hasImport: false,
|
||||||
hasExport: false,
|
hasExport: false
|
||||||
tagSearch: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
|
@@ -22,17 +22,6 @@ export default {
|
|||||||
url: `/api/v1/perms/asset-permissions/?user_id=${this.object.id}`,
|
url: `/api/v1/perms/asset-permissions/?user_id=${this.object.id}`,
|
||||||
hasSelection: false,
|
hasSelection: false,
|
||||||
hasTree: true,
|
hasTree: true,
|
||||||
tagSearch: [
|
|
||||||
{ label: this.$t('common.Name'), key: 'name' },
|
|
||||||
{ label: this.$t('common.isValid'), key: 'is_valid' },
|
|
||||||
{ label: this.$t('users.Username'), key: 'username' },
|
|
||||||
{ label: this.$t('users.UserGroups'), key: 'user_group' },
|
|
||||||
{ label: this.$t('assets.IP'), key: 'ip' },
|
|
||||||
{ label: this.$t('assets.Hostname'), key: 'hostname' },
|
|
||||||
{ label: this.$t('assets.Node'), key: 'node' },
|
|
||||||
{ label: this.$t('assets.SystemUser'), key: 'system_user' },
|
|
||||||
{ label: '继承(先占位)', key: 'all=0' }
|
|
||||||
],
|
|
||||||
columns: [
|
columns: [
|
||||||
'name', 'users_amount', 'user_groups_amount', 'assets_amount',
|
'name', 'users_amount', 'user_groups_amount', 'assets_amount',
|
||||||
'nodes_amount', 'system_users_amount', 'is_active', 'actions'
|
'nodes_amount', 'system_users_amount', 'is_active', 'actions'
|
||||||
|
Reference in New Issue
Block a user