mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 09:43:32 +00:00
feat: 修改session命令
This commit is contained in:
@@ -100,7 +100,7 @@ export async function generatePageRoutes({ to, from, next }) {
|
|||||||
// note: roles must be a object array! such as: ['admin'] or ,['developer','editor']
|
// note: roles must be a object array! such as: ['admin'] or ,['developer','editor']
|
||||||
// 不能改名 current_org_roles, 里面返回的就是这个
|
// 不能改名 current_org_roles, 里面返回的就是这个
|
||||||
const currentRole = store.getters.currentRole
|
const currentRole = store.getters.currentRole
|
||||||
console.log('Current org role: ', currentRole, rolec.getRolesDisplay(currentRole))
|
// console.log('Current org role: ', currentRole, rolec.getRolesDisplay(currentRole))
|
||||||
|
|
||||||
// generate accessible routes map based on roles
|
// generate accessible routes map based on roles
|
||||||
const accessRoutes = await store.dispatch('permission/generateRoutes', currentRole)
|
const accessRoutes = await store.dispatch('permission/generateRoutes', currentRole)
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
import { GenericListPage } from '@/layout/components'
|
import { GenericListPage } from '@/layout/components'
|
||||||
import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
|
import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
|
||||||
import { OutputExpandFormatter } from './formatters'
|
import { OutputExpandFormatter } from './formatters'
|
||||||
import { DetailFormatter, BooleanFormatter } from '@/components/ListTable/formatters'
|
import { DetailFormatter } from '@/components/ListTable/formatters'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -34,33 +34,17 @@ export default {
|
|||||||
prop: 'output',
|
prop: 'output',
|
||||||
formatter: OutputExpandFormatter
|
formatter: OutputExpandFormatter
|
||||||
},
|
},
|
||||||
input: {
|
|
||||||
label: this.$t('sessions.command')
|
|
||||||
},
|
|
||||||
risk_level: {
|
risk_level: {
|
||||||
label: this.$t('sessions.riskLevel'),
|
label: this.$t('sessions.riskLevel'),
|
||||||
formatter: BooleanFormatter,
|
formatter: (row, col, cellValue) => {
|
||||||
formatterArgs: {
|
const display = row.risk_level_display
|
||||||
hasTips: true,
|
if (cellValue === 0) {
|
||||||
tips(val) {
|
return display
|
||||||
switch (val) {
|
} else {
|
||||||
case 0:
|
return <span class='text-danger'> { display } </span>
|
||||||
return vm.$t('sessions.riskLevels.common')
|
|
||||||
default:
|
|
||||||
return vm.$t('sessions.riskLevels.common')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
user: {
|
|
||||||
label: this.$t('sessions.user')
|
|
||||||
},
|
|
||||||
asset: {
|
|
||||||
label: this.$t('sessions.asset')
|
|
||||||
},
|
|
||||||
system_user: {
|
|
||||||
label: this.$t('sessions.systemUser')
|
|
||||||
},
|
|
||||||
session: {
|
session: {
|
||||||
label: this.$t('sessions.session'),
|
label: this.$t('sessions.session'),
|
||||||
formatter: DetailFormatter,
|
formatter: DetailFormatter,
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<pre style="border: none; background: none; white-space: pre-wrap">
|
<pre style="border: none; background: none; white-space: pre-wrap;padding: 10px 20px">
|
||||||
{{ '$ '+ row.input }}
|
{{ '$ '+ row.input }}
|
||||||
<br>
|
<br>
|
||||||
{{ row.output }}
|
{{ row.output }}
|
||||||
</pre>
|
</pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user