mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-18 14:57:26 +00:00
Merge branch 'dev' of github.com:jumpserver/lina into dev
This commit is contained in:
commit
2beb4b89da
@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-link class="detail" :type="col.type || 'success'" @click="dialogVisible=true">{{ iTitle }}</el-link>
|
||||||
|
<Dialog width="60%" :visible.sync="dialogVisible" :title="dialogTitle" :show-cancel="true" :show-confirm="false" @cancel="onCancel">
|
||||||
|
<DetailCard :items="detailCardItems" :title="detailTitle" />
|
||||||
|
</Dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DetailCard from '@/components/DetailCard'
|
||||||
|
import Dialog from '@/components/Dialog'
|
||||||
|
import BaseFormatter from './base'
|
||||||
|
export default {
|
||||||
|
name: 'DialogDetailFormatter',
|
||||||
|
components: {
|
||||||
|
DetailCard,
|
||||||
|
Dialog
|
||||||
|
},
|
||||||
|
extends: BaseFormatter,
|
||||||
|
props: {
|
||||||
|
formatterArgsDefault: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {
|
||||||
|
getDetailItems({ col, row, cellValue }) {
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
getTitle({ col, row, cellValue }) {
|
||||||
|
return cellValue
|
||||||
|
},
|
||||||
|
getDetailTitle({ col, row, cellValue }) {
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
getDialogTile({ col, row, cellValue }) {
|
||||||
|
return cellValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const formatterArgs = Object.assign(this.formatterArgsDefault, this.col.formatterArgs)
|
||||||
|
return {
|
||||||
|
formatterArgs: formatterArgs,
|
||||||
|
iTitle: formatterArgs.getTitle({ col: this.col, row: this.row, cellValue: this.cellValue }),
|
||||||
|
dialogTitle: formatterArgs.getDialogTile({ col: this.col, row: this.row, cellValue: this.cellValue }),
|
||||||
|
dialogVisible: false,
|
||||||
|
detailCardItems: formatterArgs.getDetailItems({ col: this.col, row: this.row, cellValue: this.cellValue }),
|
||||||
|
detailTitle: formatterArgs.getDetailTitle({ col: this.col, row: this.row, cellValue: this.cellValue })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onCancel() {
|
||||||
|
this.dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -7,6 +7,7 @@ import DeleteActionFormatter from './DeleteActionFormatter'
|
|||||||
import DateFormatter from './DateFormatter'
|
import DateFormatter from './DateFormatter'
|
||||||
import SystemUserFormatter from './GrantedSystemUsersShowFormatter'
|
import SystemUserFormatter from './GrantedSystemUsersShowFormatter'
|
||||||
import ShowKeyFormatter from '@/components/ListTable/formatters/ShowKeyFormatter'
|
import ShowKeyFormatter from '@/components/ListTable/formatters/ShowKeyFormatter'
|
||||||
|
import DialogDetailFormatter from './DialogDetailFormatter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
DetailFormatter,
|
DetailFormatter,
|
||||||
@ -17,7 +18,8 @@ export default {
|
|||||||
DeleteActionFormatter,
|
DeleteActionFormatter,
|
||||||
DateFormatter,
|
DateFormatter,
|
||||||
SystemUserFormatter,
|
SystemUserFormatter,
|
||||||
ShowKeyFormatter
|
ShowKeyFormatter,
|
||||||
|
DialogDetailFormatter
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@ -29,5 +31,6 @@ export {
|
|||||||
DeleteActionFormatter,
|
DeleteActionFormatter,
|
||||||
DateFormatter,
|
DateFormatter,
|
||||||
SystemUserFormatter,
|
SystemUserFormatter,
|
||||||
ShowKeyFormatter
|
ShowKeyFormatter,
|
||||||
|
DialogDetailFormatter
|
||||||
}
|
}
|
||||||
|
@ -650,6 +650,9 @@
|
|||||||
"DeleteNode": "删除节点",
|
"DeleteNode": "删除节点",
|
||||||
"RenameNode": "重命名节点"
|
"RenameNode": "重命名节点"
|
||||||
},
|
},
|
||||||
|
"audits": {
|
||||||
|
"View": "查看"
|
||||||
|
},
|
||||||
"users": {
|
"users": {
|
||||||
"SSHKey": "SSH公钥",
|
"SSHKey": "SSH公钥",
|
||||||
"TermsAndConditions": "条款和条件",
|
"TermsAndConditions": "条款和条件",
|
||||||
|
@ -272,6 +272,9 @@
|
|||||||
"Weekly": "Weekly",
|
"Weekly": "Weekly",
|
||||||
"TimesWeekUnit": "times/week"
|
"TimesWeekUnit": "times/week"
|
||||||
},
|
},
|
||||||
|
"audits": {
|
||||||
|
"View": "查看"
|
||||||
|
},
|
||||||
"ops": {
|
"ops": {
|
||||||
"ID": "ID",
|
"ID": "ID",
|
||||||
"No": "No",
|
"No": "No",
|
||||||
|
@ -17,7 +17,7 @@ export default {
|
|||||||
handleCommand(command) {
|
handleCommand(command) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'support':
|
case 'support':
|
||||||
window.open('https://jinshuju.net/f/sQ91MK', '_blank')
|
window.open('http://www.jumpserver.org/support/', '_blank')
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
window.open('http://docs.jumpserver.org', '_blank')
|
window.open('http://docs.jumpserver.org', '_blank')
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GenericTreeListPage from '@/layout/components/GenericTreeListPage/index'
|
import GenericTreeListPage from '@/layout/components/GenericTreeListPage/index'
|
||||||
import { DetailFormatter, ActionsFormatter, SystemUserFormatter } from '@/components/ListTable/formatters'
|
import { ActionsFormatter, SystemUserFormatter, DialogDetailFormatter } from '@/components/ListTable/formatters'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GenericTreeListPage
|
GenericTreeListPage
|
||||||
@ -36,7 +36,36 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'hostname',
|
prop: 'hostname',
|
||||||
label: this.$t('assets.Hostname'),
|
label: this.$t('assets.Hostname'),
|
||||||
formatter: DetailFormatter,
|
formatter: DialogDetailFormatter,
|
||||||
|
formatterArgs: {
|
||||||
|
getDialogTile: function({ col, row, cellValue }) {
|
||||||
|
return this.$t('assets.AssetDetail')
|
||||||
|
}.bind(this),
|
||||||
|
getDetailItems: function({ col, row, cellValue }) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Hostname'),
|
||||||
|
value: row.hostname
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.ip'),
|
||||||
|
value: row.ip
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Protocols'),
|
||||||
|
value: row.protocols.join(', ')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Platform'),
|
||||||
|
value: row.platform
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Domain'),
|
||||||
|
value: row.domain
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}.bind(this)
|
||||||
|
},
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import GenericListPage from '@/layout/components/GenericListPage'
|
import GenericListPage from '@/layout/components/GenericListPage'
|
||||||
import { getDaysAgo } from '@/utils/common'
|
import { getDaysAgo } from '@/utils/common'
|
||||||
|
import { DetailFormatter, DisplayFormatter } from '@/components/ListTable/formatters'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -12,7 +13,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
const dateFrom = getDaysAgo(1, now)
|
const dateFrom = getDaysAgo(7, now).toISOString()
|
||||||
const dateTo = now.toISOString()
|
const dateTo = now.toISOString()
|
||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
@ -22,12 +23,33 @@ export default {
|
|||||||
'is_success', 'date_start'
|
'is_success', 'date_start'
|
||||||
],
|
],
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
|
hosts: {
|
||||||
|
formatter: DetailFormatter,
|
||||||
|
formatterArgs: {
|
||||||
|
getTitle: ({ cellValue }) => {
|
||||||
|
return cellValue.length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
user: {
|
||||||
|
formatter: DisplayFormatter
|
||||||
|
},
|
||||||
|
run_as: {
|
||||||
|
formatter: DisplayFormatter
|
||||||
|
},
|
||||||
is_finished: {
|
is_finished: {
|
||||||
width: '100px'
|
width: '100px'
|
||||||
},
|
},
|
||||||
is_success: {
|
is_success: {
|
||||||
width: '100px'
|
width: '100px'
|
||||||
},
|
},
|
||||||
|
result: {
|
||||||
|
width: '80px',
|
||||||
|
formatter: (row) => {
|
||||||
|
const label = this.$t('audits.View')
|
||||||
|
return <el-link Type='success'>{ label }</el-link>
|
||||||
|
}
|
||||||
|
},
|
||||||
date_start: {
|
date_start: {
|
||||||
width: '160px'
|
width: '160px'
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,8 @@ export default {
|
|||||||
this.dialogLicenseImport = true
|
this.dialogLicenseImport = true
|
||||||
},
|
},
|
||||||
consultAction: function() {
|
consultAction: function() {
|
||||||
const url = 'https://jinshuju.net/f/sQ91MK'
|
const url = 'http://www.jumpserver.org/support/'
|
||||||
window.open(url)
|
window.open(url, '_blank')
|
||||||
},
|
},
|
||||||
importLicense() {
|
importLicense() {
|
||||||
if (this.licenseFile['file'] === undefined) {
|
if (this.licenseFile['file'] === undefined) {
|
||||||
|
@ -17,6 +17,10 @@ export default {
|
|||||||
[this.$t('common.Others'), ['comment']]
|
[this.$t('common.Others'), ['comment']]
|
||||||
],
|
],
|
||||||
url: '/api/v1/xpack/gathered-user/tasks/',
|
url: '/api/v1/xpack/gathered-user/tasks/',
|
||||||
|
initial: {
|
||||||
|
is_periodic: true,
|
||||||
|
interval: null
|
||||||
|
},
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
crontab: {
|
crontab: {
|
||||||
helpTips: this.$t('common.CrontabHelpTips')
|
helpTips: this.$t('common.CrontabHelpTips')
|
||||||
|
@ -136,7 +136,7 @@ export default {
|
|||||||
this.dialogLicenseImport = true
|
this.dialogLicenseImport = true
|
||||||
},
|
},
|
||||||
consultAction: function() {
|
consultAction: function() {
|
||||||
const url = 'https://jinshuju.net/f/sQ91MK'
|
const url = 'http://www.jumpserver.org/support/'
|
||||||
window.open(url)
|
window.open(url)
|
||||||
},
|
},
|
||||||
importLicense() {
|
importLicense() {
|
||||||
|
@ -42,7 +42,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
label: this.$t('xpack.USER'),
|
label: this.$t('xpack.User'),
|
||||||
el: {
|
el: {
|
||||||
value: [],
|
value: [],
|
||||||
ajax: {
|
ajax: {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<h1 />
|
<h2>hello</h2>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'CloudCenter'
|
name: 'Vault'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -32,27 +32,27 @@ export default {
|
|||||||
path: '',
|
path: '',
|
||||||
component: () => import('@/views/xpack/GatheredUser/GatheredUserList'),
|
component: () => import('@/views/xpack/GatheredUser/GatheredUserList'),
|
||||||
name: 'GatherUserList',
|
name: 'GatherUserList',
|
||||||
meta: { title: i18n.t('xpack.GatherUserList') }
|
meta: { title: i18n.t('xpack.GatherUserList'), activeMenu: '/xpack/gathered-users' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'gathered-users/tasks',
|
path: 'gathered-users/tasks',
|
||||||
component: () => import('@/views/xpack/GatheredUser/TaskList'),
|
component: () => import('@/views/xpack/GatheredUser/TaskList'),
|
||||||
name: 'GatherUserTaskList',
|
name: 'GatherUserTaskList',
|
||||||
meta: { title: i18n.t('xpack.GatherUserTaskList') },
|
meta: { title: i18n.t('xpack.GatherUserTaskList'), activeMenu: '/xpack/gathered-users' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'gathered-users/tasks/create',
|
path: 'gathered-users/tasks/create',
|
||||||
component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'),
|
component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'),
|
||||||
name: 'GatherUserTaskCreate',
|
name: 'GatherUserTaskCreate',
|
||||||
meta: { title: i18n.t('xpack.GatherUserTaskCreate') },
|
meta: { title: i18n.t('xpack.GatherUserTaskCreate'), activeMenu: '/xpack/gathered-users' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'gathered-users/tasks/update',
|
path: 'gathered-users/tasks/:id/update',
|
||||||
component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'),
|
component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'),
|
||||||
name: 'GatherUserTaskUpdate',
|
name: 'GatherUserTaskUpdate',
|
||||||
meta: { title: i18n.t('xpack.GatherUserTaskUpdate'), action: 'update' },
|
meta: { title: i18n.t('xpack.GatherUserTaskUpdate'), action: 'update', activeMenu: '/xpack/gathered-users' },
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user