mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
[Update] 增加远程应用列表组件
This commit is contained in:
@@ -263,7 +263,7 @@ const cn = {
|
||||
'remote_app_detail': '远程应用详情',
|
||||
'update_remote_app': '更新远程应用',
|
||||
'name': '名称',
|
||||
'app_type': '应用类型',
|
||||
'appType': '应用类型',
|
||||
'asset': '资产',
|
||||
'action': '操作',
|
||||
'update': '更新',
|
||||
|
@@ -175,14 +175,14 @@ export const constantRoutes = [
|
||||
children: [
|
||||
{
|
||||
path: 'remote-apps',
|
||||
name: 'remoteAppList',
|
||||
component: () => import('@/views/tree/index'),
|
||||
name: 'RemoteAppList',
|
||||
component: () => import('@/views/applications/RemoteAppList'),
|
||||
meta: { title: 'RemoteApp' }
|
||||
},
|
||||
{
|
||||
path: 'database-apps',
|
||||
name: 'DatabaseAppList',
|
||||
component: () => import('@/views/tree/index'),
|
||||
component: () => import('@/views/applications/DatabaseAppList'),
|
||||
meta: { title: 'DatabaseApp' }
|
||||
}
|
||||
]
|
||||
|
64
src/views/applications/DatabaseAppList.vue
Normal file
64
src/views/applications/DatabaseAppList.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericListPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showTree: true,
|
||||
tableConfig: {
|
||||
url: '/api/v1/applications/database-apps/',
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('applications.name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'DatabaseAppDetail'
|
||||
},
|
||||
{
|
||||
prop: 'get_type_display',
|
||||
label: this.$t('applications.appType')
|
||||
},
|
||||
{
|
||||
prop: 'host',
|
||||
label: this.$t('applications.host')
|
||||
},
|
||||
{
|
||||
prop: 'port',
|
||||
label: this.$t('applications.port')
|
||||
},
|
||||
{
|
||||
prop: 'database',
|
||||
label: this.$t('applications.database')
|
||||
},
|
||||
{
|
||||
prop: 'comment',
|
||||
label: this.$t('applications.comment')
|
||||
}
|
||||
],
|
||||
tableActions: {
|
||||
hasEdit: true,
|
||||
editRoute: '404'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasDelete: false,
|
||||
hasUpdate: false,
|
||||
createRoute: 'DatabaseAppCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
56
src/views/applications/RemoteAppList.vue
Normal file
56
src/views/applications/RemoteAppList.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GenericListPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showTree: true,
|
||||
tableConfig: {
|
||||
url: '/api/v1/applications/remote-apps/',
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('applications.name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'RemoteAppDetail'
|
||||
},
|
||||
{
|
||||
prop: 'get_type_display',
|
||||
label: this.$t('applications.appType')
|
||||
},
|
||||
{
|
||||
prop: 'asset_info',
|
||||
label: this.$t('applications.asset')
|
||||
},
|
||||
{
|
||||
prop: 'comment',
|
||||
label: this.$t('applications.comment')
|
||||
}
|
||||
],
|
||||
tableActions: {
|
||||
hasEdit: true,
|
||||
editRoute: '404'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasDelete: false,
|
||||
hasUpdate: false,
|
||||
createRoute: 'RemoteAppCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@@ -32,7 +32,7 @@ export default {
|
||||
label: this.$t('assets.systemUser')
|
||||
},
|
||||
{
|
||||
prop: '',
|
||||
prop: 'comment',
|
||||
label: this.$t('assets.comment')
|
||||
}
|
||||
],
|
||||
|
@@ -21,14 +21,14 @@ export default {
|
||||
label: this.$t('assets.name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'CommandFilterDetail'
|
||||
route: 'PlatformDetail'
|
||||
},
|
||||
{
|
||||
prop: 'base',
|
||||
label: this.$t('assets.BasePlatform')
|
||||
},
|
||||
{
|
||||
prop: '',
|
||||
prop: 'comment',
|
||||
label: this.$t('assets.comment')
|
||||
}
|
||||
],
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
headerActions: {
|
||||
hasDelete: false,
|
||||
hasUpdate: false,
|
||||
createRoute: 'CommandFilterCreate'
|
||||
createRoute: 'PlatformCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user