mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 16:32:28 +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']
|
||||
// 不能改名 current_org_roles, 里面返回的就是这个
|
||||
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
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes', currentRole)
|
||||
|
@@ -6,7 +6,7 @@
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import { getDaysAgo, toSafeLocalDateStr } from '@/utils/common'
|
||||
import { OutputExpandFormatter } from './formatters'
|
||||
import { DetailFormatter, BooleanFormatter } from '@/components/ListTable/formatters'
|
||||
import { DetailFormatter } from '@/components/ListTable/formatters'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -34,33 +34,17 @@ export default {
|
||||
prop: 'output',
|
||||
formatter: OutputExpandFormatter
|
||||
},
|
||||
input: {
|
||||
label: this.$t('sessions.command')
|
||||
},
|
||||
risk_level: {
|
||||
label: this.$t('sessions.riskLevel'),
|
||||
formatter: BooleanFormatter,
|
||||
formatterArgs: {
|
||||
hasTips: true,
|
||||
tips(val) {
|
||||
switch (val) {
|
||||
case 0:
|
||||
return vm.$t('sessions.riskLevels.common')
|
||||
default:
|
||||
return vm.$t('sessions.riskLevels.common')
|
||||
}
|
||||
formatter: (row, col, cellValue) => {
|
||||
const display = row.risk_level_display
|
||||
if (cellValue === 0) {
|
||||
return display
|
||||
} else {
|
||||
return <span class='text-danger'> { display } </span>
|
||||
}
|
||||
}
|
||||
},
|
||||
user: {
|
||||
label: this.$t('sessions.user')
|
||||
},
|
||||
asset: {
|
||||
label: this.$t('sessions.asset')
|
||||
},
|
||||
system_user: {
|
||||
label: this.$t('sessions.systemUser')
|
||||
},
|
||||
session: {
|
||||
label: this.$t('sessions.session'),
|
||||
formatter: DetailFormatter,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<pre style="border: none; background: none; white-space: pre-wrap">
|
||||
{{ '$ '+ row.input }}
|
||||
<br>
|
||||
{{ row.output }}
|
||||
<pre style="border: none; background: none; white-space: pre-wrap;padding: 10px 20px">
|
||||
{{ '$ '+ row.input }}
|
||||
<br>
|
||||
{{ row.output }}
|
||||
</pre>
|
||||
</template>
|
||||
|
||||
|
Reference in New Issue
Block a user