diff --git a/src/router/audit/sessions.js b/src/router/audit/sessions.js
index c84ae812f..5675ec732 100644
--- a/src/router/audit/sessions.js
+++ b/src/router/audit/sessions.js
@@ -34,7 +34,7 @@ export default [
{
path: 'command',
name: 'CommandList',
- component: () => import('@/views/sessions/CommandList'),
+ component: () => import('@/views/sessions/CommandList/index'),
meta: {
title: i18n.t('route.Commands'),
permissions: ['terminal.view_command']
diff --git a/src/router/console/sessions.js b/src/router/console/sessions.js
index 6997519c3..bec33ed55 100644
--- a/src/router/console/sessions.js
+++ b/src/router/console/sessions.js
@@ -26,7 +26,7 @@ export default [
{
path: 'commands',
name: 'CommandList',
- component: () => import('@/views/sessions/CommandList'),
+ component: () => import('@/views/sessions/CommandList/index'),
meta: { title: i18n.t('route.Commands'), permissions: [] }
},
{
diff --git a/src/views/assets/Asset/AssetDetail/AssetCommand.vue b/src/views/assets/Asset/AssetDetail/AssetCommand.vue
new file mode 100644
index 000000000..fda0e783d
--- /dev/null
+++ b/src/views/assets/Asset/AssetDetail/AssetCommand.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/assets/Asset/AssetDetail/AssetSession.vue b/src/views/assets/Asset/AssetDetail/AssetSession.vue
new file mode 100644
index 000000000..88e747568
--- /dev/null
+++ b/src/views/assets/Asset/AssetDetail/AssetSession.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/assets/Asset/AssetDetail/index.vue b/src/views/assets/Asset/AssetDetail/index.vue
index 293e7d0cf..5462c2d2a 100644
--- a/src/views/assets/Asset/AssetDetail/index.vue
+++ b/src/views/assets/Asset/AssetDetail/index.vue
@@ -16,6 +16,8 @@ import { GenericDetailPage, TabPage } from '@/layout/components'
import Detail from './Detail.vue'
import Account from './Account.vue'
import PermUserList from './PermUser.vue'
+import AssetSession from './AssetSession.vue'
+import AssetCommand from './AssetCommand.vue'
export default {
name: 'AssetListDetail',
@@ -24,7 +26,9 @@ export default {
TabPage,
Detail,
Account,
- PermUserList
+ PermUserList,
+ AssetSession,
+ AssetCommand
},
data() {
return {
@@ -45,6 +49,16 @@ export default {
title: this.$t('assets.PermUserList'),
name: 'PermUserList',
hidden: () => !this.$hasPerm('perms.view_assetpermission')
+ },
+ {
+ title: this.$t('route.SessionList'),
+ name: 'AssetSession',
+ hidden: () => !this.$hasPerm('terminal.view_session')
+ },
+ {
+ title: this.$t('route.Commands'),
+ name: 'AssetCommand',
+ hidden: () => !this.$hasPerm('terminal.view_command')
}
],
hasRightSide: true,
diff --git a/src/views/sessions/CommandList.vue b/src/views/sessions/CommandList/BaseList.vue
similarity index 92%
rename from src/views/sessions/CommandList.vue
rename to src/views/sessions/CommandList/BaseList.vue
index 5f58fed44..72fc2b419 100644
--- a/src/views/sessions/CommandList.vue
+++ b/src/views/sessions/CommandList/BaseList.vue
@@ -1,6 +1,6 @@
-
diff --git a/src/views/sessions/SessionList/BaseList.vue b/src/views/sessions/SessionList/BaseList.vue
index 9d6794342..2e8bb6764 100644
--- a/src/views/sessions/SessionList/BaseList.vue
+++ b/src/views/sessions/SessionList/BaseList.vue
@@ -20,6 +20,18 @@ export default {
extraActions: {
type: Array,
default: () => []
+ },
+ columnsShow: {
+ type: Object,
+ default: () => {
+ return {
+ min: ['id', 'actions'],
+ default: [
+ 'id', 'user', 'asset', 'account', 'remote_addr', 'protocol',
+ 'command_amount', 'date_start', 'duration', 'actions'
+ ]
+ }
+ }
}
},
data() {
@@ -28,13 +40,7 @@ export default {
url: this.url,
columnsExtra: ['index', 'duration'],
columnsExclude: ['terminal'],
- columnsShow: {
- min: ['id', 'actions'],
- default: [
- 'id', 'user', 'asset', 'account', 'remote_addr', 'protocol',
- 'command_amount', 'date_start', 'duration', 'actions'
- ]
- },
+ columnsShow: this.columnsShow,
columnsMeta: {
id: {
prop: 'id',
diff --git a/src/views/users/User/UserDetail/UserSession.vue b/src/views/users/User/UserDetail/UserSession.vue
index b3334a1d1..1fa0f1016 100644
--- a/src/views/users/User/UserDetail/UserSession.vue
+++ b/src/views/users/User/UserDetail/UserSession.vue
@@ -1,18 +1,18 @@
-
+